Main menu

Navigation

enable "pnetcdf" in CESM1.1.1

6 posts / 0 new
Last post
zhaol04@...
enable "pnetcdf" in CESM1.1.1

Dear all,

I am now running a multi-instances case with cesm1.1.1. By default it uses "netcdf" for history/restart file input/output, which is relative slow. Thus I wish to enable "pnetcdf" for parallel I/O. I searched online and find following instructions (http://www.cesm.ucar.edu/models/cesm1.0/cesm/cesm_doc_1_0_4/x3036.html). But still not familiar with these settings, could someone help me on this?
Many thanks!

"
CESM1 uses the serial netcdf implementation of PIO and pnetcdf is turned off in PIO by default. To use pnetcdf, a pnetcdf library (like netcdf) must be available on the local machine and PIO pnetcdf support must be turned on when PIO is built. This is done as follows:
1. Locate the local copy of pnetcdf. It must be version 1.1.1 or newer library
2. Set LIB_PNETCDF in the Macros file to the directory of the pnetcdf library (eg. /contrib/pnetcdf1.1.1/lib).
3. Add PNETCDF_PIO to the pio CONFIG_ARGS variable in the Macros file, and set it to the directory of the top level of a standard pnetcdf installation (eg /contrib/pnetcdf1.1.1).
4. Run the clean_build script if the model has already been built.
5. Run the build script to rebuilt pio and the full CESM1 system.
6. Change IO namelist settings to pnetcdf and set appropriate IO tasks and layout.
The PNETCDF_PIO variable tells pio to build with pnetcdf support turned on. The LIB_PNETCDF variable tells the CESM Makefile to link in the pnetcdf library at the link step of the CESM1 build.
"

Sailor

jedwards

It may be much easier than this - what machine are you on and what model version are you using?

CESM Software Engineer

zhaol04@...

Thank you!

I am using a generic machine ("TACC-Lonestar") with "COMPILER=intel" and "OS=LINUX".

The model version is "CESM1.1.1" with CLM4.0.

Sailor

jedwards

Do a module avail and see if parallel-netcdf isn't already installed on lonestar, if it is you should just be able to load the module and then rebuild cesm.

CESM Software Engineer

zhaol04@...

Yes, we have "pnetcdf/1.3.1" installed on lonstar. When run "module spider pnetcdf", it shows:

"To use the NETCDF library, compile the source code with the option:

        -I${TACC_PNETCDF_INC}

      Add the following options to the link step:

        -L${TACC_PNETCDF_LIB} -lpnetcdf

"

I am wondering what arguments shall I type or add to the Macros file (like "CONFIG_ARGS" for example), based on the instructions?  

Sailor

jedwards

You want to set PNETCDF_PATH to the top level of the pnetcdf install directory, so try something like

setenv PNETCDF_PATH ${TACC_PNETCDF_LIB}/../

in the env_mach_specific file after you've loaded the module in the same file.  

 

Once you've built with pnetcdf use xmlchange to set PIO_TYPENAME=pnetcdf in the env_run.xml file.

 

 

 

CESM Software Engineer

Log in or register to post comments

Who's new

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