PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

pgnvd changing LD_LIBRARY_PATH

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mboisson



Joined: 19 Dec 2013
Posts: 4

PostPosted: Thu Sep 18, 2014 11:20 am    Post subject: pgnvd changing LD_LIBRARY_PATH Reply with quote

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.
Back to top
View user's profile
Michael Wolfe



Joined: 19 Jan 2010
Posts: 44

PostPosted: Fri Sep 19, 2014 9:46 am    Post subject: Reply with quote

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.
Back to top
View user's profile
mboisson



Joined: 19 Dec 2013
Posts: 4

PostPosted: Tue Sep 23, 2014 6:55 am    Post subject: Reply with quote

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.
Back to top
View user's profile
Adriancsg



Joined: 22 Sep 2014
Posts: 3

PostPosted: Wed Oct 08, 2014 1:55 am    Post subject: Reply with quote

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
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 639

PostPosted: Tue Oct 28, 2014 9:56 am    Post subject: The rc file is fixed in 14.10 - TPR 20860 is fixed Reply with quote

We corrected the problem in 14.10.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group