Error while using -mcmodel=medium...any workaround?

Hi,

I am currently compiling a code on the head node of a cluster and trying to run it on the slave (this is a serial code). I am using the option -mcmodel=medium since I am working with large arrays. The code runs fine on the head. But when I using a pbscript to submit the job on a slave, it exits with the following error.

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

Even if I log into the slave and submit the job locally (on the slave) I still get the same error. I included the path to this library in $PATH on the slave - still does not work (The directory where this library resides is mounted on the slave) Is there any workaround for this problem? I have read some posts on the issue with static libraries but did not get an answer to my specific question.

Thanks!
Madhu

Hi Madhu,

You need to set your environment’s LD_LIBRARY_PATH to the directory containing the PGI shared runtime libraries. When using PBS, this is typically done by submitting a wrapper script to PBS to set-up and then run your application. For example:

setenv LD_LIBRARY_PATH /usr/pgi/linux86-64/6.0/libso
my_app

If your nodes don’t have access to the shared libraries, then you’ll need to install them either locally or on a network mount.

Hope this helps,
Mat

Hi Mat,

Thanks !
It worked!

-Madhu