Skip to content

Using HPE SmartSim with CESM

Jim Edwards edited this page Oct 13, 2021 · 10 revisions

Currently the CESM interface to SmartSim is on a branch and the SmartSim interface works on casper and cheyenne. There are gpu's on casper but the queue wait could be quite long.

First you need to install the SmartSim tool, you should only need to do this once, from a casper (cheyenne) login:

  1. module purge
  2. module load python/3.7.9 gnu/9.1.0 ncarenv ncarcompilers cmake git cuda cudnn
  3. ncar_pylib -c 20201220 /glade/work/$USER/casper_npl_clone (cheyenne_npl_clone)
  4. ncar_pylib casper_npl_clone (cheyenne_npl_clone)
  5. pip install --no-cache-dir smartsim
  6. smart --device gpu (cpu) (this step requires gnu make >- 4.0, my build is in /glade/work/jedwards/make-4.3/bin)

After you have completed the above steps once you just need to repeat step 4 each time you login.

  1. git clone https://github.com/jedwards4b/cesm -b jedwards/smartsim cesm2_3.smartsim
  2. cd cesm2_3.smartsim/cime/scripts
  3. create the case you must specify the openmpi comm library with --mpilib openmpi
  4. cd casedir
  5. ./xmlchange USE_SMARTSIM=TRUE

The call to initialize smartredis is in components/cmeps/driver/cime/esmApp.F90 and the client variable is sr_client the client is available in any component by adding the line use esm_utils_mod, only: sr_client

Once you have completed the build step and you are ready to submit a job:

  1. export CESM_ROOT=/path/to/src/cesm2_3.smartsim
  2. $CESM_ROOT/cime/tools/smartsim/launch.py (--help for options)
  3. This will start the database and your case or cases.

Tests using the cime testing infrastructure are available on casper and cheyenne with the intel and gnu compilers. For example:

  1. export CESM_ROOT=/path/to/src/cesm2_3.smartsim
  2. cd $CESM_ROOT/cime/scripts
  3. ./create_test SMS_Vnuopc.f19_g17.X.casper_intel.drv-smartsim

This tests a simple put get interaction with the database from the xatm component.
Further information on cime testing can be found here.