Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

SCAM can't find libpgmp libraries on CGD systems

rneale

Rich Neale
CAM Project Scientist
Staff member
I am trying to build and run SCAM from cesm1_3_beta02 on cgd systems (logan, harmon). Running the cam executable fails as it cannot find the library shared object libpgmp.so. Do I need to get this library installed (I don't know what it's for, something parallel I'm guessing) or can I run w/o it?
Thanks!
Rich
 

jet

Member
Hi Rich: You need to add a directory path to your LD_LIBRARY_PATH variable.  When the Portland Group compiler was upgraded the dynamic libraries were split out into a new directory. For instance if the error you are seeing at runtime is a missing library (libpgmp or libpghpf or something like that) then you need to find out where that library exists on your system and add that directory to the LD_LIBRARY_PATH.ex.

1111> locate libpgmp.so
/usr/local/pgi-pgcc-pghf-13.10/linux86-64/13.10/REDIST/libpgmp.so
/usr/local/pgi-pgcc-pghf-13.10/linux86-64/13.10/libso/libpgmp.so
/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/REDIST/libpgmp.so
/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/libso/libpgmp.so

If you are using the 14.1 version of portland group compiler then the command to add the directory is:

setenv LD_LIBRARY_PATH=/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/libso:${LD_LIBRARY_PATH}
You want to put the new directory first in the directory path because often times the existing LD_LIBRARY_PATH will contain a pointer to /usr/local/lib higher up in the path and the executable will then pick up the wrong dynamic library.   You can use the ldd command to see what dynamic libraries are being loaded by the executable
ldd cam

You should see a print out of all resolved libraries.  If it is showing you something like

        libpgmp.so => not found
        libpgf90.so => not found
        libpgf90_rpm1.so => not found
then you are missing a directory entry in your LD_LIBRARY_PATH

The path could also say something like libpgmp.so =>/usr/local/lib

Which although it found a library in /usr/local/lib it most likely isn't the one you need for running.  If it is the wrong library the model will fail during the run when it tries to make a netcdf call to open a file. jt
cleardot.gif
 

jet

Member
Hi Rich: You need to add a directory path to your LD_LIBRARY_PATH variable.  When the Portland Group compiler was upgraded the dynamic libraries were split out into a new directory. For instance if the error you are seeing at runtime is a missing library (libpgmp or libpghpf or something like that) then you need to find out where that library exists on your system and add that directory to the LD_LIBRARY_PATH.ex.

1111> locate libpgmp.so
/usr/local/pgi-pgcc-pghf-13.10/linux86-64/13.10/REDIST/libpgmp.so
/usr/local/pgi-pgcc-pghf-13.10/linux86-64/13.10/libso/libpgmp.so
/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/REDIST/libpgmp.so
/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/libso/libpgmp.so

If you are using the 14.1 version of portland group compiler then the command to add the directory is:

setenv LD_LIBRARY_PATH=/usr/local/pgi-pgcc-pghf-14.1/linux86-64/14.1/libso:${LD_LIBRARY_PATH}
You want to put the new directory first in the directory path because often times the existing LD_LIBRARY_PATH will contain a pointer to /usr/local/lib higher up in the path and the executable will then pick up the wrong dynamic library.   You can use the ldd command to see what dynamic libraries are being loaded by the executable
ldd cam

You should see a print out of all resolved libraries.  If it is showing you something like

        libpgmp.so => not found
        libpgf90.so => not found
        libpgf90_rpm1.so => not found
then you are missing a directory entry in your LD_LIBRARY_PATH

The path could also say something like libpgmp.so =>/usr/local/lib

Which although it found a library in /usr/local/lib it most likely isn't the one you need for running.  If it is the wrong library the model will fail during the run when it tries to make a netcdf call to open a file. jt
cleardot.gif
 

jet

Member
Hi Rich:
Brian stopped by and let me know that the CGD machines now support the modules utlity that manage a user's environment variables.  It is an excellent way of keeping all these paths and environment variables consistent.  You can find further information on the Modules web page http://modules.sourceforge.net/ or by typing module helpFor your particular case where you need to have your environment set up correctly for the PGI compiler you would find the appropriate module to load by typing module availAnd then load the appropriate module ...module load compiler/pgi/14.1Our systems's group let me know that when any compiler is loaded, the appropriate netcdf libraries that can be used with that compiler are loaded at the same time.Lastly, you should take some time to look at the entire list of available modules and clean up your startup scripts (ex .login, .cshrc, etc.) by removing any commands which are directly modifying environment variables for the listed modules.  Its much cleaner and safer to execute module load commands in your startup scripts for any packages you want loaded by default.jt
 

jet

Member
Hi Rich:
Brian stopped by and let me know that the CGD machines now support the modules utlity that manage a user's environment variables.  It is an excellent way of keeping all these paths and environment variables consistent.  You can find further information on the Modules web page http://modules.sourceforge.net/ or by typing module helpFor your particular case where you need to have your environment set up correctly for the PGI compiler you would find the appropriate module to load by typing module availAnd then load the appropriate module ...module load compiler/pgi/14.1Our systems's group let me know that when any compiler is loaded, the appropriate netcdf libraries that can be used with that compiler are loaded at the same time.Lastly, you should take some time to look at the entire list of available modules and clean up your startup scripts (ex .login, .cshrc, etc.) by removing any commands which are directly modifying environment variables for the listed modules.  Its much cleaner and safer to execute module load commands in your startup scripts for any packages you want loaded by default.jt
 
Top