Skip to content
Snippets Groups Projects
Commit d69a70be authored by Reuben D. Budiardja's avatar Reuben D. Budiardja
Browse files

Test for aprun launcher.

parent 4da03bae
No related branches found
No related tags found
No related merge requests found
2016-04-28: new version installed
2016-04-28: next check of /u/subawardee/rbudiard/SWTools-BWCI/trunk/joblaunch on 2016-07-27
noweb
#protected 0022
#vendor
rbudiard
\ No newline at end of file
#!/bin/ksh
############################## standard interface to /sw tools
# Input:
# Environment variables
# SW_BLDDIR current directory (PWD) minus /autofs/na1_ stuff
# SW_ENVFILE file to be sourced which has alternate prog environment
# only to be used in special circumstances
# SW_WORKDIR unique work dir that local script can use
# Output
# Return code of 0=success or 1=failure
##############################
# exit 3 is a signal to the sw infrastructure that this template has not
# been updated; please delete it when ready
if [ -z $SW_BLDDIR ]; then
echo "Error: SW_BLDDIR not set!"
exit 1
else
cd $SW_BLDDIR
fi
if [ -z $SW_ENVFILE ]; then
### Set Environment (do not remove this line only change what is in between)
. ${MODULESHOME}/init/ksh
. ${SW_BLDDIR}/remodule
### End Environment (do not remove this line only change what is in between)
else
. $SW_ENVFILE
fi
############################## app specific section
#
# clear out old installation to prevent potential libtool chmod
# commands from failing when reinstalled by another person
rm -rf bin lib include doc share man etc libexec info
#clear out status file since re-making
rm -f status
echo "Nothing to build for this application."
############################### if this far, return 0
exit 0
#!/bin/ksh
############################## standard interface to /sw tools
# Input:
# Environment variables
# SW_BLDDIR current directory (PWD) minus /autofs/na1_ stuff
# SW_ENVFILE file to be sourced which has alternate prog environment
# only to be used in special circumstances
# SW_WORKDIR unique work dir that local script can use
# Output
# Return code of 0=success or 1=failure
##############################
# exit 3 is a signal to the sw infrastructure that this template has not
# been updated; please delete it when ready
exit 3
if [ -z $SW_BLDDIR ]; then
echo "Error: SW_BLDDIR not set!"
exit 1
else
cd $SW_BLDDIR
fi
if [ -z $SW_ENVFILE ]; then
### Set Environment (do not remove this line only change what is in between)
. ${MODULESHOME}/init/ksh
. ${SW_BLDDIR}/remodule
### End Environment (do not remove this line only change what is in between)
else
. $SW_ENVFILE
fi
############################## app specific section
#
# clear out old installation to prevent potential libtool chmod
# commands from failing when reinstalled by another person
rm -rf bin lib include doc share man etc libexec info
#clear out status file since re-making
rm -f status
cd $SRCDIR
#probably overkill, need surgical strike on binary executables
make clean
make all
if [ $? -ne 0 ] ; then
echo "$PACKAGE make failed"
exit 1
fi
make install
if [ $? -ne 0 ] ; then
echo "$PACKAGE install failed"
exit 1
fi
cd ../
############################### if this far, return 0
exit 0
### Set Environment (do not remove this line only change what is in between)
. ${MODULESHOME}/init/ksh
module unload PrgEnv-pgi
module unload PrgEnv-cray
module unload PrgEnv-gnu
module unload PrgEnv-intel
module unload darshan
### End Environment (do not remove this line only change what is in between)
module load PrgEnv-cray
# load any other dependent modules here
# env vars here
PACKAGE=joblaunch
VER=1.0
SRCDIR=$PACKAGE-$VER
# these may need to go up in the special section between ###
#export CC=cc
#export CXX="CC -DMPICH_IGNORE_CXX_SEEK"
#export CC=gcc
#export CXX=g++
export CC=cc
export CXX=CC
export MPICC=cc
export MPICXX=CC
export FC=ftn
export MPIFC=ftn
#export LIBS=" -ldl"
#export CPPFLAGS=-DpgiFortran
#!/bin/ksh
############################## standard interface to /sw tools
# Input:
# Environment variables
# SW_BLDDIR current directory (PWD) minus /autofs/na1_ stuff
# SW_ENVFILE file to be sourced which has alternate prog environment
# only to be used in special circumstances
# SW_WORKDIR work dir that local script can use
# Output:
# Return code of 0=success or 1=failure or 2=job submitted
#
# Notes:
# If this script is called from swtest, then swtest requires
# SW_WORKDIR to be set. Then swtest adds a unique path to what
# user gave swtest (action+timestamp+build) and provides this
# script with a uniquely valued SW_WORKDIR. swtest will
# automatically remove this unique workspace when retest is done.
##################################################################
# exit 3 is a signal to the sw infrastructure that this template has not
# been updated; please delete it when ready
if [ -z $SW_BLDDIR ]; then
echo "Error: SW_BLDDIR not set!"
exit 1
else
cd $SW_BLDDIR
fi
if [ -z $SW_ENVFILE ]; then
### Set Environment (do not remove this line only change what is in between)
. ${MODULESHOME}/init/ksh
. ${SW_BLDDIR}/remodule
### End Environment (do not remove this line only change what is in between)
else
. $SW_ENVFILE
fi
############################## app specific section
#
set -o verbose
#clear out status file since re-testing
rm -f status
cd $SW_WORKDIR
#-- Four things are required in the PBS script such that it can be followed
# correctly by jenkins:
# 1. The PBS_JOBID (given upon submission with 'qsub') needs to be written
# to the ${SW_BLDDIR}/.running file on submission
# 2. The main output of the test (i.e. typically "aprun" command output)
# needs to be appended to ${SW_BLDDIR}/.running as the test runs
# 3. If the test succeed, the first line of $SW_BLDDIR/status file must be
# the string "verified"
# 4. ${SW_BLDDIR}/.running must be removed after the test completes
cat > ${PACKAGE}.pbs << EOF
#!/bin/bash
#PBS -N ${PACKAGE}
#PBS -j oe
#PBS -l nodes=1:ppn=32,walltime=30:00
set -o verbose
cd \$PBS_O_WORKDIR
TIME="/usr/bin/time -f 'elapsed %e'"
UPTIME=/usr/bin/uptime
#-- Wrapped aprun and Real aprun:
W_APRUN=`which aprun`
R_APRUN=/usr/bin/aprun
#-- Test with XALT's aprun wrapper
eval \$TIME \$W_APRUN -n 1 \$UPTIME 2>&1 | tee w_aprun.log | tee -a ${SW_BLDDIR}/.running
#-- Test with real aprun
eval \$TIME \$R_APRUN -n 1 \$UPTIME 2>&1 | tee r_aprun.log | tee -a ${SW_BLDDIR}/.running
echo "verified" > ${SW_BLDDIR}/status
grep elapsed w_aprun.log | grep -v time | awk '{print "YVALUE=",\$2}' \
| sed 's/ //g' > ${SW_BLDDIR}/w_aprun
grep elapsed r_aprun.log | grep -v time | awk '{print "YVALUE=",\$2}' \
| sed 's/ //g' > ${SW_BLDDIR}/r_aprun
JOBID=\`echo \$PBS_JOBID | cut -d "." -f1 \`
chmod 775 ${SW_BLDDIR}/status
rm ${SW_BLDDIR}/.running
cat \${JOBID}.OU >> ${SW_BLDDIR}/test.log
cat ${PACKAGE}.log >> ${SW_BLDDIR}/test.log
chmod 664 ${SW_BLDDIR}/test.log
EOF
#submit job and touch .running file - marker to infrastructure that
qsub ${PACKAGE}.pbs > ${SW_BLDDIR}/.running
# qsub returns 0 on successful job launch, so if failure return 1
if [ $? -ne 0 ]; then
echo "Error submitting job"
rm -f .running
exit 1
else
echo "Job submitted"
cat ${SW_BLDDIR}/.running
exit 2
fi
cd ../
cd ../../
############################### if this far, return 0
exit 0
verified
<h1>Title</h1>
<p> Category:
<h2>Description</h2>
<p> Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
<h2>Use</h2>
<p> Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
<pre>
code
code
code
code
code
</pre>
ncsa or vendor or ncsa+vendor
development:
current:
deprecated:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment