I am using PGI programming for some days only and I am still learning a lot from each page I am reading about it. Yet, I am stuck on a question which I do not find the answer:
I would like to improve the computing efficiency of a fortran application I am developing through parallelization of the code on GPU. However, the loop I intend to parallelize include a function call which is itself calling a function. From what I have read until now, such a loop appears not to be parallelizable and that’s exactly the compiler warning message I received: “Accelerator region ignored -> function/procedure calls are not supported” (Here is the compiler comand I used: pgfortran -plmex.f90 -zbsubs.f -machine.f90 -ta=nvidia -Minfo=accel -Minline -Mipa=inline, so I consider inlining) … unfortunately but not really surprisingly…
… until I have read this post https://forums.developer.nvidia.com/t/accelerator-region-ignored-for-global-variable/132021/1 in which the code presents a loop with function and then a subroutine calls, but for which parallelization seems to work. I also succeded to compile it on my machine.
Why is it working here, is it a particular case?
And more generally, is there a way to circumvent problems of loop parallelization when it contains function or procedure call?
Sorry for this, may be, basic question and many thanks in advance for helping me!