Difference between revisions of "PGI: PGI and OpenACC"
Jump to navigation
Jump to search
| (2 intermediate revisions by the same user not shown) | |||
| Line 12: | Line 12: | ||
== Issues met == | == Issues met == | ||
| − | + | * After trying to compile a Fortran code I got this error: | |
| + | |||
| + | PGF90-S-0021-Label field of continuation line is not blank | ||
| + | |||
| + | '''Solution''': | ||
| + | |||
| + | Add the -Mpreprocess compiler flag | ||
| + | |||
| + | * After trying to compile a Fortran code I got the following error: | ||
| + | |||
/tmp/pgaccTlnihVRmAnZx.gpu(244): error: expression must have class type | /tmp/pgaccTlnihVRmAnZx.gpu(244): error: expression must have class type | ||
| − | + | ||
| − | + | '''Solution''': | |
| + | |||
| + | There was an OpenACC directive that was causing the problem, which was commented out: | ||
| + | !$ACC parallel present(alpha,nitcg) | ||
| + | alpha=0 | ||
| + | nitcg=nitcg+1 | ||
| + | !$ACC end parallel | ||
| + | |||
| + | * After compiling the code, this runtime error appeared: | ||
| + | |||
| + | call to cuModuleGetFunction returned error 500: Not found | ||
| + | |||
| + | '''Solution''': | ||
| + | |||
| + | Change the -ta compiler flag to: | ||
| + | -ta=tesla:nordc,cc35 | ||
Latest revision as of 12:55, 19 December 2014
Compiling the code with OpenACC support
In order to find the correct flags for the compiler run:
pgaccelinfo
The flags are in the last output line. Example:
pgicc/pgfortran -ta=tesla:cc35
Note: Don't forget to add the OpenACC flags to the linker:
pgicc/pgfortran -acc -acclibs
Issues met
- After trying to compile a Fortran code I got this error:
PGF90-S-0021-Label field of continuation line is not blank
Solution:
Add the -Mpreprocess compiler flag
- After trying to compile a Fortran code I got the following error:
/tmp/pgaccTlnihVRmAnZx.gpu(244): error: expression must have class type
Solution:
There was an OpenACC directive that was causing the problem, which was commented out:
!$ACC parallel present(alpha,nitcg)
alpha=0
nitcg=nitcg+1
!$ACC end parallel
- After compiling the code, this runtime error appeared:
call to cuModuleGetFunction returned error 500: Not found
Solution:
Change the -ta compiler flag to:
-ta=tesla:nordc,cc35