Commit 200d2d80 authored by Melesse Vergara, Veronica's avatar Melesse Vergara, Veronica
Browse files

added a HelloWorld v2.0 test

parent 98e06ef4
#!/bin/bash -l
echo "Starting build of HelloWorld in `pwd`"
module list
make clean
make all
#!/bin/bash -l
echo "Starting $0 in `pwd`..."
REFVAL=24
OUTFNAME=stdout.txt
nsuccess=`grep -c "Success" $OUTFNAME`
echo "Found $nsuccess out of $REFVAL Success values"
if [ $nsuccess -eq ${REFVAL} ]
then
echo "PASSED"
exit 0
else
echo "FAILED"
exit 1
fi
#! /bin/bash -l
#BSUB -q __batchqueue__
#BSUB -J __jobname__
#BSUB -o __resultsdir__/__jobname__.o%J
#BSUB -e __resultsdir__/__jobname__.e%J
#BSUB -n __total_processes__
#BSUB -W __walltime__
#-----------------------------------------------------
# Set up the environment for use of the harness. -
# -
#-----------------------------------------------------
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
#-----------------------------------------------------
# Define some variables. -
# -
#-----------------------------------------------------
EXECUTABLE="__pathtoexecutable__"
STARTINGDIRECTORY="__startingdirectory__"
WORKDIR="__workdir__"
RESULTSDIR="__resultsdir__"
UNIQUE_ID_STRING="__unique_id_string__"
#-----------------------------------------------------
# Enusre that we are in the correct starting -
# directory. -
# -
#-----------------------------------------------------
cd $STARTINGDIRECTORY
#-----------------------------------------------------
# Make the working scratch space directory. -
# -
#-----------------------------------------------------
if [ ! -e $WORKDIR ]
then
mkdir -p $WORKDIR
fi
#-----------------------------------------------------
# Make the results directory. -
# -
#-----------------------------------------------------
if [ ! -e $RESULTSDIR ]
then
mkdir -p $RESULTSDIR
fi
#-----------------------------------------------------
# Change directory to the working directory. -
# -
#-----------------------------------------------------
cd $WORKDIR
#-----------------------------------------------------
# Run the executable. -
# -
#-----------------------------------------------------
log_binary_execution_time.py --scriptsdir $STARTINGDIRECTORY --uniqueid $UNIQUE_ID_STRING --mode start
__joblaunchcommand__
log_binary_execution_time.py --scriptsdir $STARTINGDIRECTORY --uniqueid $UNIQUE_ID_STRING --mode final
sleep 30
#-----------------------------------------------------
# Enusre that we return to the starting directory. -
# -
#-----------------------------------------------------
cd $STARTINGDIRECTORY
#-----------------------------------------------------
# Copy the results back to the $RESULTSDIR -
# -
#-----------------------------------------------------
cp -rf $WORKDIR/* $RESULTSDIR && rm -rf $WORKDIR
#-----------------------------------------------------
# Move the batch file name to $RESULTSDIR -
# -
#-----------------------------------------------------
mv __batchfilename__ $RESULTSDIR
#-----------------------------------------------------
# Check the final results. -
# -
#-----------------------------------------------------
check_executable_driver.py -p $RESULTSDIR -i $UNIQUE_ID_STRING
#-----------------------------------------------------
# The script now determines if we are to resubmit -
# itself. -
# -
#-----------------------------------------------------
case __resubmitme__ in
0)
test_harness_driver.py -r;;
1)
echo "No resubmit";;
esac
#! /bin/bash -l
#PBS -e __resultsdir__
#PBS -o __resultsdir__
#PBS -N __jobname__
#PBS -l walltime=__walltime__
#PBS -l nodes=__nodes__
#PBS -q __batchqueue__
#PBS -A __pbsaccountid__
#-----------------------------------------------------
# Set up the environment for use of the harness. -
# -
#-----------------------------------------------------
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
#-----------------------------------------------------
# Define some variables. -
# -
#-----------------------------------------------------
EXECUTABLE="__pathtoexecutable__"
STARTINGDIRECTORY="__startingdirectory__"
WORKDIR="__workdir__"
RESULTSDIR="__resultsdir__"
UNIQUE_ID_STRING="__unique_id_string__"
#-----------------------------------------------------
# Enusre that we are in the correct starting -
# directory. -
# -
#-----------------------------------------------------
cd $STARTINGDIRECTORY
#-----------------------------------------------------
# Make the working scratch space directory. -
# -
#-----------------------------------------------------
if [ ! -e $WORKDIR ]
then
mkdir -p $WORKDIR
fi
#-----------------------------------------------------
# Make the results directory. -
# -
#-----------------------------------------------------
if [ ! -e $RESULTSDIR ]
then
mkdir -p $RESULTSDIR
fi
#-----------------------------------------------------
# Change directory to the working directory. -
# -
#-----------------------------------------------------
cd $WORKDIR
#-----------------------------------------------------
# Run the executable. -
# -
#-----------------------------------------------------
log_binary_execution_time.py --scriptsdir $STARTINGDIRECTORY --uniqueid $UNIQUE_ID_STRING --mode start
__joblaunchcommand__
log_binary_execution_time.py --scriptsdir $STARTINGDIRECTORY --uniqueid $UNIQUE_ID_STRING --mode final
sleep 30
#-----------------------------------------------------
# Enusre that we return to the starting directory. -
# -
#-----------------------------------------------------
cd $STARTINGDIRECTORY
#-----------------------------------------------------
# Copy the results back to the $RESULTSDIR -
# -
#-----------------------------------------------------
cp -rf $WORKDIR/* $RESULTSDIR && rm -rf $WORKDIR
#-----------------------------------------------------
# Move the batch file name to $RESULTSDIR -
# -
#-----------------------------------------------------
mv __batchfilename__ $RESULTSDIR
#-----------------------------------------------------
# Check the final results. -
# -
#-----------------------------------------------------
check_executable_driver.py -p $RESULTSDIR -i $UNIQUE_ID_STRING
#-----------------------------------------------------
# The script now determines if we are to resubmit -
# itself. -
# -
#-----------------------------------------------------
case __resubmitme__ in
0)
test_harness_driver.py -r;;
1)
echo "No resubmit";;
esac
jobname = hellotest
total_processes = 24
processes_per_node = 24
batchqueue = batch
walltime = 300
executablename = helloworld.x
batchfilename = run_helloWorld.sh
buildscriptname = ./build_hello.sh
checkscriptname = ./check_hello.sh
reportscriptname = ./report_hello.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment