Difference between revisions of "PGI: PGI and OpenACC"

From Define Wiki
Jump to navigation Jump to search
(Created page with "== 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/p...")
 
Line 5: Line 5:
  
 
The flags are in the last output line. Example:
 
The flags are in the last output line. Example:
 
 
  pgicc/pgfortran -ta=tesla:cc35
 
  pgicc/pgfortran -ta=tesla:cc35
  
Line 12: Line 11:
  
 
== Issues met ==
 
== Issues met ==
 +
 +
# After trying to compile a Fortran code I got the following error:
 +
/tmp/pgaccTlnihVRmAnZx.gpu(244): error: expression must have class type

Revision as of 12:47, 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

  1. After trying to compile a Fortran code I got the following error:
/tmp/pgaccTlnihVRmAnZx.gpu(244): error: expression must have class type