Hi, I’m looking for a way to compile and execute code for another machine, in which I can’t install anything. Both are Linux with x86 processors, and I’m using PGI with openACC directives 12.10. I want to use something like statically-linked libraries, or what I need to execute a PGI compiled binary in other system, without installing anything on it?
Thanks for your time.
Hi valenbg,
You wont be able to compile a completely static binary, but can add the flag “-Bstatic_pgi” so that at least the PGI run time is statically linked.
For the OS, this should be fine if the two systems have the same GLIBC version, or the target system’s GLIBC is newer than the build system. Older systems wont be able to run newer GLIBC versions.
You will need the NVIDIA driver installed on the target system in order to run an OpenACC code on an NVIDIA gpu. However, we wrap up multiple compute capability targets in a single binary so you don’t need to worry if the CC of the device varies between systems. You can also compile with “-ta=nvidia,host” so that a host version of the OpenACC sections are created. The binary will then still run on a system without a GPU, albeit slower.
For the host side generated code, you can either compile to a particular target architecture (see “pgfortran -help -tp” for a list of target systems), or you can string any number of targets on the same “-tp” option to create a Unified Binary. This will ensure that the code will run on most x86 target architectures.
Hope this helps,
Mat
I’m having this problem when compiling with this options:
pgcc -acc -ta=nvidia,host -Bstatic_pgi -Minfo=all main.c
When I try to execute the generated binary (in the same computer), it shows me this error:
./a.out: error while loading shared libraries: libnuma.so: cannot open shared object file: No such file or directory
./a.out: error while loading shared libraries: libnuma.so: cannot open shared object file: No such file or directory
Sorry, forgot that one. We link with the OpenMP libraries by default in order to support core binding. At link, you can add the flag “-nomp” or “-mp=nonuma” to not link in the NUMA libraries.
- Mat
It finally seems to work with the “-mp=nonuma” flag, although with the “-nomp” flag it shows an error about calls to the pthread library. Thank you so much for your feedback.