Hey guys
I’m having a problem during the make stage. My code (about 1 hundred *.cc and *.h files in multiple folders) compiles and runs correctly with GCC/G++, MPICC/MPIC++, or PGCC/PGC++. This is without any “-acc” tags in the compiler command and without using any gpu/pragma code. There are 2 loops that are tagged with pragmas for Openmp.
However, when I add “-acc” to the PGCC/PGC++ compiler command (because I want to use my gpu), I get an error about 50% through the make process. The only thing that I’ve changed is adding “-acc” to the compiler command - I made no changes to the code. If I add both “-acc” to the compiler command and a “pragma acc kernels” on a code loop, I get the same error. So, I’m guessing the tags are not the problem.
This is the error:
/usr/bin/ld: cannot find /tmp/pgcudafat8ped0PgFc9t6.o: No such file or directory
Further, that error message is surrounded by about 20 of these errors:
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o(.debug_info): relocation 0 has invalid symbol index 7
…
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o(.debug_ranges): relocation 0 has invalid symbol index 4
…
/usr/lib/x86_64-linux-gnu/crti.o: In function _init': /build/eglibc-ripdx6/eglibc-2.19/csu/../sysdeps/x86_64/crti.S:64: multiple definition of
_init’
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o(.debug_info): relocation 0 has invalid symbol index 7
…
/usr/lib/x86_64-linux-gnu/crti.o:/build/eglibc-ripdx6/eglibc-2.19/csu/…/sysdeps/x86_64/crti.S:64: first defined here
/usr/lib/x86_64-linux-gnu/crti.o: In function _fini': (.fini+0x0): multiple definition of
_fini’
/usr/lib/x86_64-linux-gnu/crti.o:(.fini+0x0): first defined here
/usr/bin/ld: cannot find /tmp/pgcudafatKKXhS0yCAEkG.o: No such file or directory
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o:(.data.rel+0x0): multiple definition of __dso_handle' /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o:(.data.rel+0x0): first defined here /usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o:(.tm_clone_table+0x0): multiple definition of
TMC_END’
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o:(.tm_clone_table+0x0): first defined here
I find that these 20 errors go away if I remove any repeated library paths in my compiler command (I.e., having 2 entries of “-L/usr/lib”). Does the PGI compiler become sensitive to repeated library paths when “-acc” is added to the compiler command? It doesn’t seem to be bothered by repeats until “-acc” is used.
However, I do not know how to get rid of the “tmp/pgcuda…no such file or directory” error. What do you think?
_ABOUT MY SYSTEM:
- Ubuntu 14.04
- NVS 4200m GPU 512mb memory with NVIDIA 384 driver
- Intel I7 processor
- PGI Community 17.10
- Compile command is “-acc -ta=tesla:cuda8.0,cc20,time”. I’ve tried it without the -ta part also (meaning only having the “-acc” part), but the same error happens.
- Personal amount of C/C++/compiled languages knowledge? … minimal. I’m a Python/R guy.
- My PGI and CUDA installations and environment appear to be ok because I was able to run the code in this tutorial: https://devblogs.nvidia.com/openacc-example-part-1/_
Immediately before failing and producing the error message, the last commands shown in the terminal are a bunch of linking commands. Two of the commands are large. There are about 50 *.o files and paths in one command.
Again, all of this compiles fine in both GCC/G++, MPICC/MPIC++, and PGCC/PGC++. The problem happens when I add “-acc” to the compiler command.
Thanks for any help or direction you can give me![/url]