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! 
 
Back
Top