GOMb0.08 example - HYCOM run in SLURM

31 views
Skip to first unread message

Jeongin Kim

unread,
Jul 10, 2025, 10:36:34 AMJul 10
to HYCOM.org Forum
Hi, 

I'm just taking my first step to HYCOM. 
I'm trying the GOM example - this one: https://github.com/HYCOM/HYCOM-examples/wiki/GOMb0.08 - but got stuck at step 4.
In this example, they use src_relo_mpi, but my school server uses SLURM.
How should I modify the example code or which should i use to run mpi in slurm environment?

Thanks,
Jeongin

Alan Wallcraft

unread,
Jul 10, 2025, 12:31:08 PMJul 10
to HYCOM.org Forum, Jeongin Kim
The source code is usually independent of the batch system.  What matters is the MPI library, and you just need to use whatever MPI library is typically used at your site (which will almost certainly be compatible with SLURM).

Once you have cloned HYCOM-src you need to either select one of the existing config/*relo_mpi files or create a new one for your local system.  This depends on the Fortran compiler (e.g. gnu or GF in the filename is gfortran and intel is ifort).  In most cases your MPI library will provide a "wrapper" script called mpif90 to take care of invoking the compiler and linking it the MPI library.  For example, from config/generic-gnu-relo_mpi:

# common definitions for Generic Intel/AMD, MPI,  small memory, real*8
# GNU Fortran: Assumes mpif90 is a wrapper to gfortran for MPI

FC            = mpif90
FCFFLAGS      = -fPIC -fno-second-underscore -O2 -march=native -mavx -m64 -fdefault-real-8 -fdefault-double-8 -fallow-argument-mismatch

Alan.
Reply all
Reply to author
Forward
0 new messages