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

PIO build problem

I have posted this over in the Porting forum but it seems no one is watching that area anymore, since there are many unanswered posts.  I'm hoping to get a reply here.I am trying to port CESM 1.2.2 to a linux system.  As far as I can tell, I have set all the necessary variables for the build to find the NETCDF libraries, but I am still getting an error in the PIO build that it can't find the NETCDF Fortran libraries.Am I missing somewhere that I have to define a path or something?Is it possible I need to install a different version of netcdf?I'm attaching my Macros file and PIO build log.Thanks!
 

jedwards

CSEG and Liaisons
Staff member
You need the fortran library of netcdf as well as the c library.  missing: NETCDF_Fortran_LIBRARY
 
I believe I have that.  The netcdf libraries installed are:zzbthoma@master:~> l /usr/lib64/*netcdf*
/usr/lib64/libnetcdf.a             /usr/lib64/libnetcdff.a      /usr/lib64/libnetcdff.so.5.3.1*
/usr/lib64/libnetcdf_c++.so@       /usr/lib64/libnetcdff.la*    /usr/lib64/libnetcdf.so@
/usr/lib64/libnetcdf_c++.so.4@     /usr/lib64/libnetcdff.so@    /usr/lib64/libnetcdf.so.7@
/usr/lib64/libnetcdf_c++.so.4.2.0  /usr/lib64/libnetcdff.so.5@  /usr/lib64/libnetcdf.so.7.2.0* In my Macros file I have:SLIBS+=-L/usr/lib64/NETCDF_PATH:= /usr/lib64/
 

jedwards

CSEG and Liaisons
Staff member
Ah - I see the problem.  NETCDF_PATH is expected to be a root directory below which you would have a lib and an include directory,you are trying to set it to a lib64 directory - where are the include files expected to be found?You may need to make some links in your filesystem to satisfy this requirement.
 
I was able to get it to build by making sure the include and lib files were in $NETCDF_PATH/lib and $NETCDF_PATH/includeEven though the build was successful, it did not run succsssfully, giving this error:"cesm.exe: error while loading shared libraries: libnetcdf.so.7: cannot open shared object file: No such file or directory"So I think there may be some problem with the netcdf install on my system. Thanks for your help!
 
My sysadmin reinstalled netcdf on our system, with the files in /usr/lib64/lib and /usr/lib64/includeI set NETCDF_PATH= /usr/lib64/ in my Macros file.The build completes, but when I try to run the model I get this error:"cesm.exe: error while loading shared libraries: libnetcdf.so.11: cannot open shared object file: No such file or directory"The file libnetcdf.so.11 is in /usr/lib64/lib/Any ideas on how to solve this?Thanks! 
 
Top