Install Pnetcdf Fortran Libraries with OpenMP

I have downloaded a climate model which needs the pnetcdf Fortran libraries as well as OpenMP.

I had already installed package:
libnetcdf-fortran_4_5_3-gnu-openmpi4-hpc
in which there is fortran library
libnetcdff.so.7
I’ve also installed packages:
libpnetcdf4-openmpi4
libpnetcdf_1_12_2-gnu-openmpi4-hpc
which both contain the basic c parallel netcdf library
libpnetcdf.so.4

However the program needs libpnetcdff.so… .

The web page “SUSE Package Hub - openSUSE-2020-1779” indicates that pnetcdff was once part of netcdf-fortran. I’ve hunted through all the packages involving netcdf and openmpi but found no clues. So where is libpnetcdff now?

Any help appreciated.

David Webb.

pnetcdf-mpich-devel, pnetcdf-mvapich2-devel and pnetcdf-openmpi4-devel provides libpnetcdf.so

As i don’t use any of these programs, are you sure that you need libpnetcdff.so instead of libpnetcdf.so? Only want to make sure that it is no typo…

I am not absolutely sure that the library I require is called libpnetcdff. Usually there is a basic c library libnetcdf and a set of fortran interface routines in libnetcdff.

As far as I can tell from GitHub - Parallel-NetCDF/PnetCDF: Source code repository of PnetCDF library and utilities, pnetcdf is set up in the same way - with a basic C library and a set of Fortran interface routines in a separate library.

Before building the climate model, I have to define the location of both the netcdf libraries and pnetcdf libraries. The build starts and generates a couple of libraries - one of which appears to involve input and output. However when it gets to build a library called ‘pio’, which I presume is parallel input/output, it complains.

The core of the model is written in fortran and, looking at the download site, other people have had a similar error message - which goes away when the parallel fortran interface was installed - so I presume that I have hit the same problem.

If the fortran interface is not available, then I’ll have a go at compiling it from scratch but, as I usually use system software - not build it, there is a good chance that I’ll have further problems on the way.

Thanks for any help

David.

@djwebb The netcdf-fortran-*-devel files are in leap 15.5 and contain libnetcdff.so*
https://build.opensuse.org/package/view_file/science/netcdf-fortran/netcdf-fortran.spec?expand=1
They exist in the rpm netcdf-fortran_4_5_3-gnu-openmpi4-hpc-devel for Leap 15.4 but should also be available via the main repository, else you would need to grab from the Science repo at your own risk (as in use with caution, something may break)…

Or look at updating to Leap 15.5?

As mention before I have libnetcdff from one of the installed packages. However it does not contain the parallel i/o routines (for example “nc_open_par()”). I also suspect that the installed version of hdf5 does not contain the parallel i/o routines.

The spec file does include ‘PARALLEL’ but it could be that a parallel flag is also needed in the configure section (i.e. line 389).

I’ll work on the basis that I’ll have to compile from source. I did it years ago before Suse supported hdf5 etc properly. At the moment I have other priorities but will eventually report back.

D.

David, what climate model was it that you loaded? Might try it to see if it works for me.

The NCAR Community Earth System Model. The web pages are a bit messy with some information at ucar.edu and some on github. For a start try:

https://www.cesm.ucar.edu/models/cesm2/download
https://escomp.github.io/CESM/versions/cesm2.1/html/quickstart.html
As a new user I am only allowed two links so:
www dot cesm dot ucar dot edu/
ncar dot github dot io/CESM-Tutorial/README.html
www dot cesm dot ucar dot edu/models/cesm2/releases#2.1.3

I am using 2.1.3 but the git download is always a complete set of commits. The production version 2.1.3 is commit 0596a97 (also: release-cesm2.1.3).

Runs are build using a system called cime. This needs a .cime directory in your home directory with a config file. You also can either modify the config_machines.xml and config_compilers.xml, in directory CESMROOT/cime/cesm/machines or create similar files in .cime with the same information on your own system.

As a start I tried building compset X, which seems to just test the message passing without running any serious sub-models. Some of the build worked, compiling a few libraries, but it failed when trying to compile the pio libraries.

If you have any success let me know but don’t waste a lot of time. D.

I am a broken down engineer in an assisted living facility. I have been doing cfd modeling since 1960 or so. I looked into climate models a couple of years ago and soon realized that I had no significant computer resources to run any significant problems. These researchers are using hundreds of cores and their problems still take days.

I have one computer (pretty fast intel i7 w/12 cpus) but this wouldn’t be able to run anything meaningful. I’ll stick to more simple flow cfd analyses some of which still take a couple of days to run.

Thanks for the refs, I’ll look at them. good luck. Let me know if you find a way to prove me wrong and move ahead on this. Would be fun to work on which is why I looked at it.

tom kosvic

Tom,

I am sure you are not broken yet. Anyway if you are still interested in a climate model you might like to try FORTE, a low resolution model designed for long climate runs.

The paper referenced below indicates that it can run “∼100 model years per wall-clock day on a 28-core 2.4 GHz Intel Broadwell CPU”. Your 14 cores should be more than enough to get something going - as long as you have enough core memory. The paper also includes links to the computer code.

Good luck. D.

@djwebb This code? https://github.com/NOC-MSM/FORTE2.0

Yup. But be warned, at 2 degrees resolution (~220 km at the Equator) the models get a lot of things right but key currents like the Gulf Stream are ten times too wide.

Hui - I stand corrected. The pnetcdf.a file from the libpnetcdf-openmpi4 package does contain the fortran 90 interfaces. I am so use to them being additional libraries in hdf5 and netcdf that didn’t check before posting.

Many thanks for your help. D.