Skip to content

Commit

Permalink
Merge pull request #8 from sjsprecious/pumas_gpu_update
Browse files Browse the repository at this point in the history
After the PUMAS tag v1.22 is brought into CAM, some source code names are changed (ESCOMP/CAM#512). Therefore, the system configuration file needs to be updated correspondingly in order to apply the GPU flags to the right files.

In addition, the NVHPC compiler and its related modules on Casper are updated to the latest and compatible versions.
  • Loading branch information
jedwards4b authored Feb 3, 2022
2 parents e1edcbd + fe2b41a commit f07be0c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
10 changes: 5 additions & 5 deletions machines/Depends.nvhpc-gpu
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#
PUMAS_MG_OBJS=\
PUMAS_OBJS=\
micro_mg1_0.o \
micro_mg3_0.o \
micro_pumas_v1.o \
micro_pumas_data.o \
micro_pumas_utils.o \
micro_mg_cam.o \
micro_pumas_cam.o \
wv_sat_methods.o \
wv_saturation.o \
macrop_driver.o \
shr_spfn_mod.o

ifeq ($(DEBUG),FALSE)
$(PUMAS_MG_OBJS): %.o: %.F90
$(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -acc -ta=tesla:cc70,lineinfo,nofma -Minfo=accel $<
$(PUMAS_OBJS): %.o: %.F90
$(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -acc -gpu=cc70,lineinfo,nofma -Minfo=accel $<
endif
2 changes: 1 addition & 1 deletion machines/cmake_macros/nvhpc-gpu_casper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (NOT DEBUG)
endif()
string(APPEND FFLAGS " -I$(EXEROOT)/ocn/obj/FMS")
if (NOT DEBUG)
string(APPEND LDFLAGS " -O -tp=skylake -Mnofma -acc -ta=tesla:cc70,lineinfo,nofma -Minfo=accel")
string(APPEND LDFLAGS " -O -tp=skylake -Mnofma -acc -gpu=cc70,lineinfo,nofma -Minfo=accel")
endif()
string(APPEND SLIBS " -llapack -lblas")
if (MPILIB STREQUAL mpi-serial)
Expand Down
2 changes: 1 addition & 1 deletion machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ using a fortran linker.
<append> -I$(EXEROOT)/ocn/obj/FMS </append>
</FFLAGS>
<LDFLAGS>
<append DEBUG="FALSE"> -O -tp=skylake -Mnofma -acc -ta=tesla:cc70,lineinfo,nofma -Minfo=accel </append>
<append DEBUG="FALSE"> -O -tp=skylake -Mnofma -acc -gpu=cc70,lineinfo,nofma -Minfo=accel </append>
</LDFLAGS>
<SLIBS>
<append> -llapack -lblas </append>
Expand Down
41 changes: 29 additions & 12 deletions machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ This allows using a different mpirun command to launch unit tests
<BASELINE_ROOT>$ENV{CESMDATAROOT}/cesm_baselines</BASELINE_ROOT>
<GMAKE_J>8</GMAKE_J>
<BATCH_SYSTEM>pbs</BATCH_SYSTEM>
<SUPPORTED_BY>CISL</SUPPORTED_BY>
<SUPPORTED_BY>ASAP/CISL</SUPPORTED_BY>
<MAX_TASKS_PER_NODE>36</MAX_TASKS_PER_NODE>
<MAX_GPUS_PER_NODE>8</MAX_GPUS_PER_NODE>
<MAX_MPITASKS_PER_NODE>36</MAX_MPITASKS_PER_NODE>
Expand Down Expand Up @@ -406,10 +406,10 @@ This allows using a different mpirun command to launch unit tests
<command name="load">pgi/20.4</command>
</modules>
<modules compiler="nvhpc">
<command name="load">nvhpc/20.9</command>
<command name="load">nvhpc/21.11</command>
</modules>
<modules compiler="nvhpc-gpu">
<command name="load">nvhpc/20.9</command>
<command name="load">nvhpc/21.11</command>
</modules>
<modules compiler="intel">
<command name="load">intel/19.1.1</command>
Expand Down Expand Up @@ -441,30 +441,47 @@ This allows using a different mpirun command to launch unit tests
<command name="load">netcdf/4.7.4</command>
</modules>
<modules mpilib="openmpi" compiler="nvhpc">
<command name="load">openmpi/4.1.0</command>
<command name="load">netcdf-mpi/4.7.4</command>
<command name="load">openmpi/4.1.1</command>
<command name="load">netcdf-mpi/4.8.1</command>
<command name="load">pnetcdf/1.12.2</command>
</modules>
<modules mpilib="mpi-serial" compiler="nvhpc">
<command name="load">netcdf/4.7.4</command>
<command name="load">netcdf/4.8.1</command>
</modules>
<modules mpilib="openmpi" compiler="nvhpc-gpu">
<command name="load">openmpi/4.1.0</command>
<command name="load">netcdf-mpi/4.7.4</command>
<command name="load">openmpi/4.1.1</command>
<command name="load">netcdf-mpi/4.8.1</command>
<command name="load">pnetcdf/1.12.2</command>
<command name="load">cuda/11.0.3</command>
<command name="load">cuda/11.4.0</command>
</modules>
<modules mpilib="mpi-serial" compiler="nvhpc-gpu">
<command name="load">netcdf/4.7.4</command>
<command name="load">netcdf/4.8.1</command>
</modules>
<modules mpilib="openmpi" compiler="intel">
<command name="load">openmpi/4.1.0</command>
<command name="load">netcdf-mpi/4.7.4</command>
<command name="load">openmpi/4.1.1</command>
<command name="load">netcdf-mpi/4.8.1</command>
<command name="load">pnetcdf/1.12.2</command>
</modules>
<modules mpilib="mpi-serial" compiler="intel">
<command name="load">netcdf/4.7.4</command>
</modules>
<!-- prebuild ESMF lib for NUOPC driver -->
<modules compiler="intel" mpilib="openmpi" DEBUG="TRUE">
<command name="use">/glade/p/cesmdata/cseg/PROGS/modulefiles/esmfpkgs/intel/19.1.1/</command>
<command name="load">esmf-8.3.0b06_casper-ncdfio-openmpi-g</command>
</modules>
<modules compiler="intel" mpilib="openmpi" DEBUG="FALSE">
<command name="use">/glade/p/cesmdata/cseg/PROGS/modulefiles/esmfpkgs/intel/19.1.1/</command>
<command name="load">esmf-8.3.0b06_casper-ncdfio-openmpi-O</command>
</modules>
<modules compiler="nvhpc-gpu" mpilib="openmpi" DEBUG="TRUE">
<command name="use">/glade/p/cesmdata/cseg/PROGS/modulefiles/esmfpkgs/nvhpc/21.11/</command>
<command name="load">esmf-8.3.0b06_casper-ncdfio-openmpi-g</command>
</modules>
<modules compiler="nvhpc-gpu" mpilib="openmpi" DEBUG="FALSE">
<command name="use">/glade/p/cesmdata/cseg/PROGS/modulefiles/esmfpkgs/nvhpc/21.11/</command>
<command name="load">esmf-8.3.0b06_casper-ncdfio-openmpi-O</command>
</modules>
<modules>
<command name="load">ncarcompilers/0.5.0</command>
</modules>
Expand Down

0 comments on commit f07be0c

Please sign in to comment.