Running executables on other machines

Hi All,

I recently installed the Community Edition 19.4 on all of our linux machines (4 with Xeons and two with AMD chips of the Piledriver variety). I have noted elsewhere on this forum the difficulties compiling my large codes that use OpenMP. The PGI user support team was kind enough to send me a PIN number for a license so that I could install the previous Community Edition. Since it appears that this license would only be for a single machine, I am doing some tests to make sure codes compiled on the oldest box with a Xeon processor will run on the other three. I am getting errors like these:

error while loading shared libraries: libpgf90rtl.so: cannot open shared object file: No such file or directory

This occurred when I tried to run the executable (compiled on the oldest machine) on the newest machine. I get a similar error on the second newest machine:

error while loading shared libraries: libpgkomp.so: cannot open shared object file: No such file or directory

All of these machines have the Community Edition 19.4 installed, and all of the shared object files exist on all of the machines in the default paths.

Is there a compiler flag I need to use to allow the code to be portable? I don’t know if this is related, but when I try the “-Bstatic” option

pgfortran -Mextend -fast -Mfprelaxed -mcmodel=medium -Bstatic -o

I get

/usr/bin/ld: cannot find -lpthread

To be clear, these tests were done using the 19.4 version of the Community Edition, which seems to work as long as OpenMP is not used.

Jerry

Hi Jerry,

Can you check where the loader is trying to resolve the shared objects from? (i.e. run the “ldd” command on your executable).

While we do set the RPATH during link, some times the loader can’t find the share object when the exe is moved to a different system. In these cases, try setting the LD_LIBRARY_PATH environment to point to the PGI lib directory.

I don’t know if this is related, but when I try the “-Bstatic” option

There’s a few system libraries that don’t have static versions. Instead, try using “-Bstatic_pgi” so the PGI runtime will be statically linked but not the system libraries. Also since you are using the medium memory model, all static libraries need to be compiled with position independent code (PIC) enabled so if you are linking any of your own static libraries, be sure to compile them with “-fPIC”.

For more details, please see: PGI Compiler User's Guide Version 19.4 for x86 and NVIDIA Processors

Hope this helps,
Mat

Hi Mat,

Setting the LD_LIBRARY_PATH did the trick. So code compiled on the oldest system runs on the newest system.

By the way, I tried to run the code that was compiled on the newest system (Intel(R) Xeon(R) W-2155 CPU @ 3.30GHz) on one of the older systems (Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz). I get a one line message that says “Illegal instruction”. I assume this means this means the executable is trying to use a feature that is not available on the older CPU?

Jerry

I assume this means this means the executable is trying to use a feature that is not available on the older CPU?

Correct. By default, we target the processor you’re building on so may include hardware instructions that are not available on older architectures.

Consider compiling with the “-tp” (target processor) switch setting the architecture to the oldest processor you’re planning on using. You can also use “-tp px” which will run on any generic x86 based system, but may disable some optimizations so it’s better to use a specific hardware if known.

-Mat