Skip to content

Commit

Permalink
Support for the GDASApp testing in containers (#1151)
Browse files Browse the repository at this point in the history
Adds support to running GDASapp portion of global-workflow in a container

`CONTAINER.env` is quite minimalist at this point, it could also certainly be cleaned up, but it will need to be expanded later anyway to handle additional jobs.

Fixes #1234
  • Loading branch information
guillaumevernieres committed Dec 12, 2022
1 parent 3085dfc commit 5a748ee
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
39 changes: 39 additions & 0 deletions env/CONTAINER.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#! /usr/bin/env bash

if [[ $# -ne 1 ]]; then

echo "Must specify an input argument to set runtime environment variables!"
echo "argument can be any one of the following:"
echo "atmanalrun atmensanalrun"
echo "aeroanlrun"
echo "anal sfcanl fcst post vrfy metp"
echo "eobs eupd ecen efcs epos"
echo "postsnd awips gempak"
exit 1

fi

step=$1

export npe_node_max=40
export launcher="mpirun"
export mpmd_opt="--multi-prog"

# Configure MPI environment
export MPI_BUFS_PER_PROC=2048
export MPI_BUFS_PER_HOST=2048
export MPI_GROUP_MAX=256
export MPI_MEMMAP_OFF=1
export MP_STDOUTMODE="ORDERED"
export KMP_AFFINITY=scatter
export OMP_STACKSIZE=2048000
export NTHSTACK=1024000000

ulimit -s unlimited
ulimit -a


if [ "${step}" = "ocnanalrun" ]; then
export NTHREADS_OCNANAL=1
export APRUN_OCNANAL="${launcher} -n 2"
fi
5 changes: 4 additions & 1 deletion workflow/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Host:
"""

SUPPORTED_HOSTS = ['HERA', 'ORION', 'JET',
'WCOSS2', 'S4']
'WCOSS2', 'S4', 'CONTAINER']

def __init__(self, host=None):

Expand All @@ -32,6 +32,7 @@ def __init__(self, host=None):
def detect(cls):

machine = 'NOTFOUND'
container = os.getenv('SINGULARITY_NAME')

if os.path.exists('/scratch1/NCEPDEV'):
machine = 'HERA'
Expand All @@ -43,6 +44,8 @@ def detect(cls):
machine = 'WCOSS2'
elif os.path.exists('/data/prod'):
machine = 'S4'
elif container != None:
machine = 'CONTAINER'

if machine not in Host.SUPPORTED_HOSTS:
raise NotImplementedError(f'This machine is not a supported host.\n' +
Expand Down
23 changes: 23 additions & 0 deletions workflow/hosts/container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
BASE_GIT: ''
DMPDIR: '/home/${USER}'
PACKAGEROOT: ''
COMROOT: ''
COMINsyn: ''
HOMEDIR: '/home/${USER}'
STMP: '/home/${USER}'
PTMP: '/home/${USER}'
NOSCRUB: $HOMEDIR
SCHEDULER: none
ACCOUNT: ''
QUEUE: ''
QUEUE_SERVICE: ''
PARTITION_BATCH: ''
PARTITION_SERVICE: ''
CHGRP_RSTPROD: 'YES'
CHGRP_CMD: 'chgrp rstprod'
HPSSARCH: 'NO'
LOCALARCH: 'NO'
ATARDIR: '${NOSCRUB}/archive_rotdir/${PSLOT}'
MAKE_NSSTBUFR: 'NO'
MAKE_ACFTBUFR: 'NO'
SUPPORTED_RESOLUTIONS: ['C96', 'C48']

0 comments on commit 5a748ee

Please sign in to comment.