I installed a pgi workstation with c/c++/fortran on a cluster but locally within my own account. I had both cuda and mpich1 installed. I also set the environment variables (like PATH, LIBRARY_PATH, and LD_LIBRARY_PATH) according to the install.txt.
Then I download the source code from this website (http://www.pgroup.com/lit/articles/insider/v2n1a4.htm) and compile them. The CPU version and ACC version comiples and runs well, but the CUDA version can’t compile, with the error message:
“/usr/bin/ld: cannot find -lcuda.”
Given that the makefile is somewhat complex, I tried a single file and compile it with:
pgfortran -Mcuda(or cuda5.0) filename
but the error is still there.
I guess it’s because the linker can’t find the library “libcuda.so”. I then looked for the file in all the lib/, lib64/, libso/ files that I can think of, however, I can only find something like “libcudafor.so”, “libcudafor4.so”, “libcudafor4.a” etc. I even tried to create a symbolic link “libcuda.so” to “libcudafor.so”, this time the link error goes way, but there are other errors like “__rangdomgpu_entry” unresolved/unreference etc. (don’t remember exactly the error message), and I guess it’s because I am linking to the wrong library.
So, my question is, why is this error happening? BTW, I am running on Linux (CentOS release 6.3 (Final) – just realized this weird distro) with x86_64.