Warning-CUDALIB is not set

Q. I get the following error when trying to compile using the PGI accelerator compilers:

make f1.exe
pgfortran -o f1.exe f1.f90 -ta=nvidia -Minfo=accel -fast
pgfortran-Warning-CUDALIB is not set in the pgfortran rcfiles; -ta=analysis assumed

pgfortran-Warning-CUDALIB is not properly set to a directory in the pgfortran rcfiles; -ta=analysis assumed

main:
     37, Generating copyin(a(1:n))
         Generating copyout(r(1:n))
     38, Loop is parallelizable
         Accelerator kernel generated
         38, !$acc do parallel, vector(256)

A. You must set the location of your CUDA software in the $PGI/linux86-64//bin/sitenvrc file before running the accelerator compilers.

For example:

cat sitenvrc
set NVOPEN64DIR=/opt/cuda/open64/lib;
set CUDADIR=/opt/cuda/bin;
set CUDALIB=/opt/cuda/lib;

Full details can be found in the PGI Installation Guide http://www.pgroup.com/doc/pgiwsinstall.pdf in the section titled “Accelerator Installation and Licensing”

Hi,
I’m working on a windows 7 system, nvidia, Cuda version 2.3 (capability 1.2) and PGI Workstation 10.1 32-Bit.
Compiling any pgi acc code on that machine I get the error message described above. An executable file is created and runnable though, however I want this warning to vanish. I already tried to create the “sitenvrc” in …\win32\10.1\bin with the corresponding lines. Didn’t help.
I think, it might have something to do with our CUDA installation which we made before the PGI installation and that we refused to install CUDA WITH Pgi. But I don’t know. Can anybody help?

Hi xray,

As of 10.0, you no longer need create a ‘sitenvrc’ file since we now ship all needed CUDA components. However, even if you have another version of CUDA already installed, to use CUDA Fortran or the PGI Accelerator model, you must install the version of CUDA that ships with the compilers. Please reinstall your PGI package and include the CUDA components.

Thanks,
Mat

Thanks for your answer. I will try what you’ve suggested.

I have the same error as listed above.
I installed the cuda libraries as instructed during installation. I also installed cygwin as suggested by the setup wizard. I have the latest 3.1 cuda developer driver installed from Nvidia. Another version of the CUDA toolkit is installed in c:\cuda for use with microsoft visual studio.
My system is windows 7 x64 home premium.

I am currently evaluating the pg software under a two week trial. I would prefer to use the pgi accelerator model rather than straight cuda with MSVSC++. I downloaded the Fortran/C/C++ workstation+gpu compiler. Please advise.

Hi jpell,

You should only see this message if you have not installed the NVIDA CUDA Toolkits that accompany the PGI installation and/or if you have added a sitenvrc file that sets CUDALIB.

If you have created sitenvrc file, please remove it since it is not longer needed.

I installed the cuda libraries as instructed during installation

Can you double check this? (i.e. dir “C:\Program Files\PGI\win64\2010\cuda”).

Thanks,
Mat

I’ve double checked. Here are the subfolders under that path.


C:\Program Files\PGI\win64\2010\cuda\2.3
C:\Program Files\PGI\win64\2010\cuda\2.3\bin
C:\Program Files\PGI\win64\2010\cuda\2.3\include
C:\Program Files\PGI\win64\2010\cuda\2.3\lib
C:\Program Files\PGI\win64\2010\cuda\2.3\open64


C:\Program Files\PGI\win64\2010\cuda\3.1
C:\Program Files\PGI\win64\2010\cuda\3.1\bin
C:\Program Files\PGI\win64\2010\cuda\3.1\include
C:\Program Files\PGI\win64\2010\cuda\3.1\lib
C:\Program Files\PGI\win64\2010\cuda\3.1\open64


Perhaps there is an issue with a PATH environment variable ?

The problem is fixed.

I needed to:
Uninstall the entire program.
Then reboot.
Then do a reinstall.
Upon reinstalling I did not select “Install Cygwin”.

There must have been a conflict between Cygwin and Windows on my system.

Now for some accelerator tests…