pgnvd changing LD_LIBRARY_PATH

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.

This is a bug in the rcfiles. If you have write access to the install directory, you can fix it by hand, or we can send an updated ‘pgnvdrc’ file.

At the bottom of the file pgnvdrc (in the install/bin directory), there is a line

export LD_LIBRARY_PATH=$NVVMLIBDIR:$NEWLIB;

change NEWLIB to NEWLDLIB; NEWLDLIB is defined above to get the existing value of LD_LIBRARY_PATH, and this export line will prepend the NVVMLIBDIR directory to that path. We are sorry for this, are embarrassed that our internal testing never caught this.

No worries, it happens.

Do I get a t-shirt for finding a bug ? :)

I can fix the pgnvdrc file on my end for this release.

Hi,

I’m not sure if my issue is related to this bug:

If I compile a OpenACC sample and then I use the ldd comand, I have the next output:

openACC$ ldd nbody_openacc
linux-vdso.so.1 => (0x00007fff835ff000)
libcudart.so.6.5 => /opt/pgi/linux86-64/2014/cuda/6.5/lib64/libcudart.so.6.5 (0x00007f522e93e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f522e71b000)
libnuma.so => /opt/pgi/linux86-64/14.9/lib/libnuma.so (0x00007f522e61a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f522e3fd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f522e100000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f522dd41000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f522da41000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f522d82a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f522ebc1000)


But I want the executable links the cudart library with the cuda one located in /usr/local/cuda. Is it possible?

Thanks

We corrected the problem in 14.10.