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

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.
"
 

jedwards

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

jedwards

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

jedwards

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

jedwards

CSEG and Liaisons
Staff member
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.
 

jedwards

CSEG and Liaisons
Staff member
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.
 

jedwards

CSEG and Liaisons
Staff member
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.
 
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?  
 
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?  
 
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?  
 

jedwards

CSEG and Liaisons
Staff member
You want to set PNETCDF_PATH to the top level of the pnetcdf install directory, so try something likesetenv 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.   
 

jedwards

CSEG and Liaisons
Staff member
You want to set PNETCDF_PATH to the top level of the pnetcdf install directory, so try something likesetenv 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.   
 

jedwards

CSEG and Liaisons
Staff member
You want to set PNETCDF_PATH to the top level of the pnetcdf install directory, so try something likesetenv 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.   
 
Top