AMD Zen Software Studio with Spack
- AMD Optimizing C/C++ Compiler (AOCC)
- AMD Optimizing CPU Libraries (AOCL)
- AMD uProf
- Setting Preference for AMD Zen Software Studio
Open MPI with AMD Zen Software Studio
Micro Benchmarks/Synthetic Benchmarks
Spack HPC Applications
Introduction
The Regional Ocean Modeling System (ROMS) is a free-surface, terrain-following, primitive equations ocean model widely used by the scientific community for a diverse range of applications. ROMS includes accurate and efficient physical and numerical algorithms and several coupled models for biogeochemical, bio-optical, sediment, and sea ice applications.
Official Website for ROMS: https://www.myroms.org/
Build ROMS using Spack
Please refer to this link for getting started with spack using AMD Zen Software Studio
# Example for building ROMS with AOCC and AOCL
$ spack install roms %aocc ^openmpi fabrics=cma,ucx
Explanation of the command options:
Symbol | Meaning |
%aocc | Build ROMS with AOCC compiler. |
^openmpi fabrics=cma,ucx | Use OpenMPI as the MPI provider and use the CMA network for efficient intra-node communication, falling back to the UCX network fabric, if required. Note: It is advised to specifically set the appropriate fabric for the host system if possible. Refer to Open MPI with AMD Zen Software Studio for more guidance. |
Note: ROMS test case is set to Benchmark.
Running ROMS
The following example illustrates running of ROMS with using application benchmark
Run Script for AMD EPYC™ Processors
#!/bin/bash
# Loading ROMS build with AOCC
spack load roms %aocc
# Getting benchmark roms_benchmark3.in file and varinfo.dat in to the current directory
export ROMS_HOME=`spack location -i roms`
cp $ROMS_HOME/ROMS/External/roms_benchmark3.in `pwd`
cp $ROMS_HOME/ROMS/External/varinfo.yaml `pwd`
# Modify variables in roms_benchmark3.in file
# Here, we are setting
# NtileI x NtileJ as 16 x 16 with equals to 256 cores available for dual socket AMD
# 5th Gen EPYC™ 9755 Processor (128x2)
# NTIMES to increase number of steps to run
# NTIMES_ANA and NTIMES_FCT to increase analysis and forecast intervals
# Specify complete path of varinfo.dat file in VARNAME section
sed -i 's/^ NtileI == .*/ NtileI == 16/g' roms_benchmark3.in
sed -i 's/^ NtileJ == .*/ NtileJ == 16/g' roms_benchmark3.in
sed -i 's/^ NTIMES == .*/ NTIMES == 500/g' roms_benchmark3.in
sed -i 's/^ NTIMES_ANA == .*/ NTIMES_ANA == 500/g' roms_benchmark3.in
sed -i 's/^ NTIMES_FCT == .*/ NTIMES_FCT == 500/g' roms_benchmark3.in
sed -i 's#VARNAME = ROMS/External#VARNAME = '${PWD}'#g' roms_benchmark3.in
# MPI and OMP options
# MPI_RANKS = Number of cores available in the system.
MPI_RANKS=$(nproc)
export OMP_NUM_THREADS=1
MPI_OPTS=”-np $MPI_RANKS --bind-to core”
# Run Command
mpirun $MPI_OPTS romsM roms_benchmark3.in
Note: The above build and run steps are tested with ROMS-4.1, AOCC-5.0.0 and OpenMPI-5.0.5 on Red Hat Enterprise Linux release 8.9 (Ootpa) using Spack v0.23.0.dev0 (commit id : 65bb3a12ea ).
For technical support on the tools, benchmarks and applications that AMD offers on this page and related inquiries, reach out to us at toolchainsupport@amd.com.