Jhayes2118
Jhayes2118

Reputation: 842

IS Offloading Fortran to GPU with nvfortran on older GPU possible (CC61)

I am trying to use OpenMP to offload fortran code to a nvidia GPU using the Nvidia HPC SDK (https://developer.nvidia.com/hpc-sdk) and its nvfortran compiler.

The documentation (https://docs.nvidia.com/hpc-sdk/compilers/hpc-compilers-user-guide/index.html#openmp-use) for the current version states that to use the GPU features, you must have a GPU with compute capability greater than 7.0 (V100 generation of GPUs)/ My GPU has Compute capability of 6.1. Is there a way to get the compiler to make use of my older GPU (Quadro P2200)?

Compiler error message :

~/source/arunprasaada/Youtube_Tutorials/Fortran_OpenMP/Hello$ nvfortran ./arr_add.f95 -mp=gpu 
nvfortran-Fatal-OpenMP GPU Offload is available only on systems with NVIDIA GPUs with compute capability '>= cc70'

Quote from the documentation:

Use the -⁠mp compiler switch to enable processing of OpenMP directives and pragmas. The most important sub-options to -⁠mp are the following:

Are there other approaches for compiling fortran which can use OpenMP + Fortran to offload to GPUs that would support my gpu? I am hoping not to have to buy a newer GPU in this time of crazy prices and low supply.

Upvotes: 0

Views: 514

Answers (1)

owainkenway
owainkenway

Reputation: 345

Unfortunately this is not an option - the Nvidia compiler's support of OpenMP off-loading was new with the V100 (compute capability > 7.0) and the Nvidia compiler cannot support older GPUs.

You may be able to get the GNU GCC/Gfortran compiler to work as that has support for OpenMP and OpenACC offloading (but I've not gotten good performance out of that on anything - our cluster has a mix of P100s, V100s and A100s).

OpenACC is supported more and is similar to OpenMP so one option is to go that route with your code if you can't get a new card.

Upvotes: 0

Related Questions