-
Notifications
You must be signed in to change notification settings - Fork 204
Using HPE SmartSim with CESM
jedwards4b edited this page Jul 19, 2021
·
10 revisions
Currently the CESM interface to SmartSim is on a branch and the SmartSim interface only works on casper.
First you need to install the SmartSim tool, you should only need to do this once, from a casper login:
- module purge
- module load python/3.7.9 gnu/9.1.0 ncarenv ncarcompilers cmake
- ncar_pylib -c 20201220 /glade/work/$USER/casper_npl_clone
- ncar_pylib casper_npl_clone
- pip install --no-cache-dir smartsim
- smart --device cpu (this step requires gnu make >- 4.0, my build is in /glade/work/jedwards/make-4.3/bin)
Then you need the SmartRedis library
- pip install --no-cache-dir smartredis
- git clone git@github.com:jedwards4b/SmartRedis.git SmartRedis
- pip install --no-cache-dir cmake
- cd SmartRedis
- make lib LIBRARY_PATH=
pwd
/install/lib - export REDIS_HOME=
pwd
After you have completed the above steps once you just need to repeat step 4 each time you login.
- git clone https://github.com/jedwards4b/cesm -b jedwards/smartsim cesm2_3.smartsim
- cd cesm2_3.smartsim/cime/scripts
- create the case **you must specify the nuopc interface with --driver=nuopc **
- cd casedir
- ./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:
- export CESM_ROOT=/path/to/src/cesm2_3.smartsim
- $CESM_ROOT/cime/tools/smartsim/launch.py (--help for options)
- This will start the database and your case or cases.