Running ROMS on SLURM scratch

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
breed

Running ROMS on SLURM scratch

#1 Unread post by breed »

Hi,

I'm very new to ROMS so apologies if this is a simple question - I have tried to look in the forum but cannot figure this out.

I want to run the ROMS upwelling test case on our SLURM scratch space and output the .nc files there. So far, I can successfully run ROMS upwelling in my local home directory but struggling to run on the scratch space. How do I do this? When I do the compiling, does it need to know my scratch directory name?

This is my bash submit file to run ROMS on SLURM:

Code: Select all

#!/bin/bash --login

#SBATCH --output=logs/runout.o.%J   	# Job output file
#SBATCH --error=logs/runerr.e.%J    	# Job error file
#SBATCH --job-name=ROMS_upwelling   	# Job name
#SBATCH --ntasks=1               	# Total number of cores 
#SBATCH --time=0-00:10 		

# modules we need
module purge
module load compiler/intel/2018 mpi/intel/2018 netcdf/4.6.1
module list

# Directories and files we need
OCEANM=/home/$USER/ROMS/testCases/upwelling02/oceanM
INPUT_FILE=ocean_upwelling.in
RUN_DIR="/scratch/$USER/ROMS/upwelling-${SLURM_JOBID}"

# prepare scratch area for work with initial data needed
mkdir -p $RUN_DIR
cp *.in $RUN_DIR

# exec
mpirun $OCEANM $INPUT_FILE
Many thanks,
Brad

User avatar
robertson
Site Admin
Posts: 219
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Running ROMS on SLURM scratch

#2 Unread post by robertson »

You need to actually "cd" into the run directory. You create it and copy files into it but you never actually change into RUN_DIR.

breed

Re: Running ROMS on SLURM scratch

#3 Unread post by breed »

Ah of course!! Thank you, that's great.

Post Reply