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

Build Instructions Clarification

mdavis

Matthew D
New Member
Hello CESM team,

I am fairly new to CESM, but would like to use it as a benchmark for testing a tool to optimize high performance/scientific computing fortran code.
I was going through the CESM2 quickstart guide and had a few questions.

The prerequisites list says that CESM requires NetCDF 4.3 or newer, and gives the following warning:
NetCDF must be built with the same Fortran compiler as CESM. In the netCDF build the FC environment variable specifies which Fortran compiler to use. CESM is written mostly in Fortran, netCDF is written in C. Because there is no standard way to call a C program from a Fortran program, the Fortran to C layer between CESM and netCDF will vary depending on which Fortran compiler you use for CESM. When a function in the netCDF library is called from a Fortran application, the netCDF Fortran API calls the netCDF C library. If you do not use the same compiler to build netCDF and CESM you will in most cases get errors from netCDF saying certain netCDF functions cannot be found.

I am unfamiliar with NetCDF and they have a few distributions provided on their site (NetCDF - C, NetCDF - C++, NetCDF - Fortran). I assume NetCDF - Fortran is the correct version for CESM, but I would like to make sure I do not need netCDF - C also due to the "netCDF Fortran API calls the netCDF C library" statement.


One other question I have is that the dependencies seem to have conflicting information:
pnetcdf 1.7.0 is required and 1.8.1 is optional but recommended
Parallel-netCDF, also referred to as pnetcdf, is optional. If a user chooses to use pnetcdf, version 1.7.0 or later should be used with CESM. It is a library that is file-format compatible with netCDF, and provides higher performance by using MPI-IO. Pnetcdf is enabled by setting the $PNETCDF_PATH Makefile variable in the Macros.make file.

so is pnetcdf required or not?

Thanks in advance,

Matthew D.

PS.
On the "Information to include in help requests" post by Mr. Bill Sacks, the CIME troubleshooting guide link is no longer operational. This may need to be updated.
 

Attachments

  • describe version output.txt
    4 KB · Views: 1

jedwards

CSEG and Liaisons
Staff member
Netcdf requires both c and fortran libraries, for best results both should be installed in the same location.
pnetcdf is optional but recommended if you have a parallel filesystem.
 
Top