Hi,
I am trying to compile a simple OpenACC test program. I am getting the following error :
pgcc -acc test.c -o test.out -Minfo=all -v
…
/software-gpu/compilers/pgi/14.9/linux86-64/14.9/bin/pgnvd -reloc /tmp/pgaccP7-S7z0qXnnr.gpu -computecap=20 -ptx /tmp/pgacc57-SRZulbBUC.ptx -o /tmp/pgaccb7-SdrBgjZbK.bin -cuda6.0
/software6/compilers/gcc/4.8.3/libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/cc1plus: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
PGC-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (test.c: 1)
PGC/x86-64 Linux 14.9-0: compilation aborted
pgcc-Fatal-ccompile completed with exit code 1
I then go one step deeper and run
/software-gpu/compilers/pgi/14.9/linux86-64/14.9/bin/pgnvd -reloc /tmp/pgaccP7-S7z0qXnnr.gpu -computecap=20 -ptx /tmp/pgacc57-SRZulbBUC.ptx -o /tmp/pgaccb7-SdrBgjZbK.bin -cuda6.0 -v
I get :
Export LD_LIBRARY_PATH=/software-gpu/compilers/pgi/14.9/linux86-64/2014/cuda/6.0/nvvm/lib64:
/software6/compilers/gcc/4.8/bin/gcc -E -C -x c++ -m64 /tmp/pgaccP7-S7z0qXnnr.gpu -D__CUDA_ARCH__=200 -D__PGI_M64 -I/software-gpu/compilers/pgi/14.9/linux86-64/2014/cuda/6.0/include -I/software-gpu/compilers/pgi/14.9/linux86-64/2014/cuda/6.0/include/cudart -I/software-gpu/compilers/pgi/14.9/linux86-64/14.9/include_acc -D__CUDACC__ -DCUDA_DOUBLE_MATH_FUNCTIONS -DCUDA_PREC_DIV -DCUDA_PREC_SQRT -D__PGICUDA50 -DV6_0 -o /tmp/pgnvdoaaTQ_Sy4on1.nv0
/software6/compilers/gcc/4.8.3/libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/cc1plus: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
pgnvd-Fatal-prepro1 completed with exit code 1
Because pgnvd redefines the LD_LIBRARY_PATH, cc1plus cannot work because it does not find its dynamic library libmpc.so.3.
Why does pgnvd do that, and how do I change this behavior ?
Edit : I have the most recent version of the PGI compilers with OpenACC.