Releases: peterdschwartz/SPEL_OpenACC
Releases · peterdschwartz/SPEL_OpenACC
WAACPD22 Paper Artifact
Description
This version accompanies the paper Software tool for Porting E3SM Land Model with OpenACC in a Function Unit Test Framework. The SPEL scripts and unit testing functions are setup for the LakeTemperature module from ELM source code so that some results from the paper can be reproduced with minimal editing from the user. Usually, SPEL overwrites the files so the LakeTemperatureMod.F90 in ./SourceFiles directory is an original from ELM source code.
Creating Unit Test
- Set up new unit test with
python3 UnitTestforELM.py
in the scripts directory - Change to new unit test directory
cd ../unit-tests/LakeTemperature
- Copy input files to unit test directory:
cp output_LakeTemperature_vars.txt E3SM_constants.txt ./
make
wiill compile for the CPU by default. Edit the Makefile to use FC_FLAGS_ACC instead for a GPU version.- Execute unit test by ./elmtest.exe 2 for 2 sets of 42 Ameriflux sites.
Optimization Mode
- Setting
opt = True
will generate an output similar to Table IV of the paper. - Setting either
add_acc = True
oradjust_allocation = True
(but not both at the same time) set SPEL to accelerate internal loops or perform some memory optimzations. These are done semi-automatically and will require some familiarity with the code to do accurately. - An example optimized version of the LakeTemperature module is provided in the ./scripts called LakeTemperature.OPT.F90 along with a suitable main.OPT.F90.