From ff6d1904387c62b637bc8772c6b985f2b28e8c00 Mon Sep 17 00:00:00 2001 From: Shane Snyder Date: Thu, 27 Apr 2017 16:01:32 -0700 Subject: [PATCH] add regression test scripts for crays at nersc only tested on Edison so far, and works fine --- .../regression/cray-module-nersc/env.sh | 35 +++++++++++++++++++ .../regression/cray-module-nersc/runjob.sh | 7 ++++ .../cray-module-nersc/slurm-submit.sl | 3 ++ 3 files changed, 45 insertions(+) create mode 100755 darshan-test/regression/cray-module-nersc/env.sh create mode 100755 darshan-test/regression/cray-module-nersc/runjob.sh create mode 100755 darshan-test/regression/cray-module-nersc/slurm-submit.sl diff --git a/darshan-test/regression/cray-module-nersc/env.sh b/darshan-test/regression/cray-module-nersc/env.sh new file mode 100755 index 0000000..2a6c6fe --- /dev/null +++ b/darshan-test/regression/cray-module-nersc/env.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# General notes +####################### + +# Script to set up the environment for tests on this platform. Must export +# the following environment variables: +# +# DARSHAN_CC: command to compile C programs +# DARSHAN_CXX: command to compile C++ programs +# DARSHAN_F90: command to compile Fortran90 programs +# DARSHAN_F77: command to compile Fortran77 programs +# DARSHAN_RUNJOB: command to execute a job and wait for its completion + +# This script may load optional modules (as in a Cray PE), set LD_PRELOAD +# variables (as in a dynamically linked environment), or generate mpicc +# wrappers (as in a statically linked environment). + +# Notes specific to this platform (cray-module-nersc) +######################## +# Use Cray's default compiler wrappers and load the module associated with +# this darshan install +# +# RUNJOB is responsible for submitting a slurm job, waiting for its +# completion, and checking its return status + +export DARSHAN_CC=cc +export DARSHAN_CXX=CC +export DARSHAN_F77=ftn +export DARSHAN_F90=ftn + +export DARSHAN_RUNJOB="cray-module-nersc/runjob.sh" + +module unload darshan >& /dev/null +module load $DARSHAN_PATH/share/craype-2.x/modulefiles/ diff --git a/darshan-test/regression/cray-module-nersc/runjob.sh b/darshan-test/regression/cray-module-nersc/runjob.sh new file mode 100755 index 0000000..f3e9c95 --- /dev/null +++ b/darshan-test/regression/cray-module-nersc/runjob.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# submit job and wait for it to return +sbatch --wait -N 1 -t 10 -p debug --output $DARSHAN_TMP/$$-tmp.out --error $DARSHAN_TMP/$$-tmp.err $DARSHAN_TESTDIR/$DARSHAN_PLATFORM/slurm-submit.sl "$@" + +# exit with return code of this job submission +exit $? diff --git a/darshan-test/regression/cray-module-nersc/slurm-submit.sl b/darshan-test/regression/cray-module-nersc/slurm-submit.sl new file mode 100755 index 0000000..6ff06fd --- /dev/null +++ b/darshan-test/regression/cray-module-nersc/slurm-submit.sl @@ -0,0 +1,3 @@ +#!/bin/bash -l + +srun -n $DARSHAN_DEFAULT_NPROCS $@ -- 2.26.2