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

Configure CAM5 to run on a single processor

Hi,

I am trying to run the CESM global model using a single processor for a single time step. I have compiled the model using 'gmake -j4 >& MAKE.out' (four processors in parallel). Does this mean that since the model was compiled parallely using 4 PEs, it can't be run on just a single processor ??i.e. Are the model's compile settings such that it has been configured to run on a single node instead of just 1 PE ?

I configure the model to run in serial mode by turning off spmd and smp switches by using -nospmd and -nosmp when I invoke the 'configure' utility. However, ntasks = 1 and nthreads = 1 by default and I guess this means that I intend using some form of parallelism while running the model ??, even though I explicitly disable linking to parallel MPI libraries by using the nospmd/nosmp switch.

The model runs correctly, but when I check certain parameters such as 'pcols' and 'lchunks' that control how the grid is decomposed due to the parallelism, these are set to values > 1 (these should be equal to 1 if the model just ran on a single PE), which once again means that some sort of parallelism is in effect.

Any help or advice on the same would be greatly appreciated.

Thanks.

Aditya
 

eaton

CSEG and Liaisons
The 'gmake -j4' command specifies that up to 4 files may be compiled simultaneously. This speeds up the build considerably. It has no effect on whether CAM runs with any parallelism or not.

Specifying '-nospmd -nosmp' to the configure command results in a serial executable. That implies that the OMP compiler directives will just be treated as comments by the compiler, and that a serial mpi library will be built and linked with the CAM executable.

There are no default values of ntasks or nthreads. In a run that has been configured with the '-nospmd -nosmp' arguments the ntasks and nthreads parameters will remain undefined.

If ntasks is specified (>0) to configure then the model will be built with an MPI library linked. Running with an active MPI lib, but using just 1 task is functionally the same as running serially.

If nthreads is specified (>0) to configure then the model will by compiled with the OMP directives being recognized. Running with a threaded executable, but using just 1 thread is functionally the same as running serially.

The data structures used in the physics parameterizations use the parameter PCOLS to set the size (number of columns) of the data "chunks". This mechanism allows for parallelism but does *not* require it. If the executable has been configured for both MPI and OMP parallelism, then the chunks are divided among the MPI tasks, and in each task the chunks are operated on by the available threads. If the executable has been configured for serial execution, then the chunks are operated on one at a time.
 
Top