Skip to content

EarthWorks Case on GPUs

G. Dylan Dickerson edited this page Apr 24, 2024 · 3 revisions

First follow the steps outlined in Obtaining source code to obtain the Earthworks source code and the steps in EarthWorks Input Data to obtain input data files. You should have also read the general Setup, Build, and Run Instructions.

Running EarthWorks cases on GPUs is nearly the same as running a CPU-only cases. You just need to add a few flags to your create_newcase command, and then you should be able to treat it as a normal case.

Creating a GPU-enabled case

Start writing a create_newcase command and add the flags --ngpus-per-node <NGPUS> --gpu-type <GPUTYPE> --gpu-offload <OFFLOADTYPE>. E.g. to run FHS94 on Derecho with CAM-MPAS on the GPU:

cime/scripts/create_newcase --run-unsupported --driver nuopc --project <PROJECT_KEY> --input-dir /glade/campaign/univ/ucsu0085/inputdata \
--compiler intel --compset FHS94 --res mpasa120_mpasa120 --case /glade/scratch/$USER/test.FHS94.mpasa120.gpu --pecount 64 \
--ngpus-per-node 4 --gpu-type a100 --gpu-offload openacc

Steps proceed from here as they would normally for a FHS94 case: cd to the case directory, make the edits to the XML variables and user_nl_* files, run ./case.setup, run ./case.build, and run ./case.submit.