Commit da9262ab authored by Hamilton, Steven P.'s avatar Hamilton, Steven P.
Browse files

Adding GPU test.

parent 30e1c208
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
#!/bin/bash -l

echo "Starting $0 in `pwd`..."

REFVAL=1
OUTFNAME=stdout.txt
nsuccess=`grep -c "Total execution time" $OUTFNAME`

if [ $nsuccess -eq ${REFVAL} ]
then
    echo "PASSED"
    exit 0
else
    echo "FAILED"
    exit 1
fi
+134 −0
Original line number Diff line number Diff line
#! /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__
#BSUB -P CSC244

#-----------------------------------------------------
# Set up the environment for use of the harness.     -
#                                                    -
#-----------------------------------------------------
source __rgtenvironmentalfile__
module load __nccstestharnessmodule__
module load gcc
module load spectrum_mpi
module list

#-----------------------------------------------------
# Define some variables.                             -
#                                                    -
#-----------------------------------------------------
EXECUTABLE="__pathtoexecutable__"
STARTINGDIRECTORY="__startingdirectory__"
WORKDIR="__workdir__"
RESULTSDIR="__resultsdir__"
UNIQUE_ID_STRING="__unique_id_string__"
INPUTDIR=${STARTINGDIRECTORY}/../Inputs

echo "EXECUTABLE"
echo ${EXECUTABLE}
echo "WORKDIR"
echo ${WORKDIR}
echo "RESULTSDIR"
echo ${RESULTSDIR}
echo "INPUTDIR"
echo ${INPUTDIR}
echo "STARTINGDIRECTORY"
echo ${STARTINGDIRECTORY}

#-----------------------------------------------------
# Ensure 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

echo "Changed to working directory"
pwd
ls -l


#-----------------------------------------------------
# Link input files into current directory
#                                                    -
#-----------------------------------------------------
echo "Contents of input directory:"
ls -l ${INPUTDIR}/

ln -s ${INPUTDIR}/c5g7_3d_gpu_1node.xml .
ln -s ${INPUTDIR}/c5g7_252g.xml .

#-----------------------------------------------------
# Run the executable.                                -
#                                                    -
#-----------------------------------------------------
log_binary_execution_time.py --scriptsdir $STARTINGDIRECTORY --uniqueid $UNIQUE_ID_STRING --mode start

mpirun --oversubscribe -np 4 ${EXECUTABLE} -i c5g7_3d_gpu_1node.xml | tee stdout.txt

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 
+105 −0
Original line number Diff line number Diff line
#! /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 
+3 −0
Original line number Diff line number Diff line
#!/bin/bash -l

echo "This is a Monte Carlo radiation transport miniapp"
+10 −0
Original line number Diff line number Diff line
jobname = profugus_cpu_1node
total_processes = 1
processes_per_node = 32
batchqueue = batch
walltime = 60
executablename = xmc
batchfilename = run_profugus.sh
buildscriptname = ./build_profugus.sh
checkscriptname = ./check_profugus.sh
reportscriptname = ./report_profugus.sh