Main menu

Navigation

PIO build problem

6 posts / 0 new
Last post
brian.thomas@...
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!

Brian C. Thomas
Professor of Physics and Astronomy
Washburn University, Topeka, KS

jedwards

You need the fortran library of netcdf as well as the c library.  missing: NETCDF_Fortran_LIBRARY

CESM Software Engineer

brian.thomas@...

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/

Brian C. Thomas
Professor of Physics and Astronomy
Washburn University, Topeka, KS

jedwards

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.

CESM Software Engineer

brian.thomas@...

I was able to get it to build by making sure the include and lib files were in $NETCDF_PATH/lib and $NETCDF_PATH/include

Even 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!

Brian C. Thomas
Professor of Physics and Astronomy
Washburn University, Topeka, KS

brian.thomas@...

My sysadmin reinstalled netcdf on our system, with the files in /usr/lib64/lib and /usr/lib64/include

I 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!

 

Brian C. Thomas
Professor of Physics and Astronomy
Washburn University, Topeka, KS

Log in or register to post comments

Who's new

  • jwolff
  • tinna.gunnarsdo...
  • sarthak2235@...
  • eolivares@...
  • shubham.gandhi@...