NetCDF-C and NetCDF_Fortran in different locations or PnetCDF only?

JennyB

Jenny Boe
New Member
I am trying to use CESM2.1.5 on a machine where the NetCDF libraries are in different folders, and could not figure out how to adapt the config_compilers.xml for that

Is it possible to make this work?

I tried to recompile these libraries myself as well as I could (but clearly I was missing options) and put them in the same folder, but the performance was very bad

Alternatively can I use only PnetCDF, and if yes will that affect the performance (for Lustre)?
 

sacks

Bill Sacks
CSEG and Liaisons
Staff member
I think you can do this by specifying NETCDF_C_PATH and NETCDF_FORTRAN_PATH instead of just NETCDF_PATH. In CESM2.1.5, I see one example of this usage in cime/config/cesm/machines/config_compilers.xml, though it's for an obscure machine (grace), so I'm not positive it works in that version of the code. I know that this works in recent development versions of CESM.

If that doesn't work, you could try setting up a single directory that contains symbolic links to the appropriate libraries, and then pointing to this directory as your NETCDF_PATH.

If you have PnetCDF, then that often gives better performance. I'm not sure off-hand whether it will work to just link against PnetCDF without also linking against the netcdf libraries.
 
Back
Top