Simple testscript based on preexisting tests.

master
Julian M. Kunkel 2018-07-06 22:19:25 +01:00
parent a3c773d006
commit aca75a3037
1 changed files with 55 additions and 77 deletions

View File

@ -1,93 +1,71 @@
#!/bin/bash -x #!/bin/bash
#PBS -N IOR # Test script for basic IOR functionality testing various patterns
#PBS -j oe # It is kept as simple as possible and outputs the parameters used such that any test can be rerun easily.
#PBS -q batch
#PBS -A stf006
#PBS -V
#PBS -l walltime=0:60:00,nodes=8:ppn=2
VERS=IOR-2.10.1 # You can override the defaults by setting the variables before invoking the script, or simply set them here...
WORK=/tmp/work/${USER} # Example: export IOR_EXTRA="-v -v -v"
echo $PBS_O_WORKDIR
cd /ccs/proj/quadcore IOR_MPIRUN=${IOR_MPIRUN:-mpiexec -np}
tar -czvf ${WORK}/${VERS}.tar.gz ./${VERS} IOR_EXEC=${IOR_EXEC:-./build/src/ior}
cd ${WORK} IOR_OUT=${IOR_OUT:-./build/test}
rm -fr ./${VERS} IOR_EXTRA=${IOR_EXTRA:-./build/test} # Add global options like verbosity
tar -xzvf ${WORK}/${VERS}.tar.gz
cd ${WORK}/${VERS}
gmake clean
gmake mpiio
EXEC=${WORK}/${VERS}/src/C/IOR
IODIR=/tmp/work/swh13/test_files_x
cd ${WORK}/${VERS}/tests
which mpirun ################################################################################
rm -fr $IODIR mkdir -p ${IOR_OUT}
mkdir $IODIR
let "w=128" ## Sanity check
let "s=1024*1024"
let "i=3"
MPIRUN="mpirun -np" if [[ ! -e ${IOR_OUT} ]]; then
echo "Could not create output dir ${IOR_OUT}"
exit 1
fi
RESULTS="." if [[ ! -e $IOR_EXEC ]]; then
echo "IOR Executable \"$IOR_EXEC\" does not exist! Call me from the root directory!"
exit 1
fi
let "tid=1"
XFERS="1048576 262144 32768 4096 1024"
XFERS="262144"
for xfer in `echo $XFERS`
do
let "n=8"
until [ "$n" -gt 8 ]
do
let "m=$n/4" ERRORS=0 # Number of errors detected while running
#TESTS="POSIX MPIIO HDF5 NCMPI" I=0
TESTS="POSIX MPIIO" function TEST(){
for test in `echo $TESTS` ${IOR_MPIRUN} ${@} ${IOR_EXTRA} 1>${IOR_OUT}/$I 2>&1
do if [[ $? != 0 ]]; then
runid="p$n.$xfer.${test}" echo -n "ERR"
date ERRORS=$(($ERRORS + 1))
else
echo -n "OK "
fi
echo " ${IOR_OUT}/${I} ${IOR_MPIRUN} ${@}"
I=$((${I}+1))
}
V=" " TEST 1 ${IOR_EXEC} -a POSIX -w -z -F -Y -e -i1 -m -t 100k -b 1000k
BLOCKS="1 10 1 10 1 10" TEST 1 ${IOR_EXEC} -a POSIX -w -z -F -k -e -i2 -m -t 100k -b 100k
for blocks in `echo $BLOCKS` TEST 1 ${IOR_EXEC} -a POSIX -r -z -F -k -e -i1 -m -t 100k -b 100k
do
let "block=${xfer} * ${blocks}" TEST 2 ${IOR_EXEC} -a POSIX -w -z -C -F -k -e -i1 -m -t 100k -b 100k
TEST 2 ${IOR_EXEC} -a POSIX -w -z -C -Q 1 -F -k -e -i1 -m -t 100k -b 100k
TEST 2 ${IOR_EXEC} -a POSIX -r -z -Z -Q 2 -F -k -e -i1 -m -t 100k -b 100k
TEST 2 ${IOR_EXEC} -a POSIX -r -z -Z -Q 3 -X 13 -F -k -e -i1 -m -t 100k -b 100k
TEST 2 ${IOR_EXEC} -a POSIX -w -z -Z -Q 1 -X -13 -F -e -i1 -m -t 100k -b 100k
#fileperproc tests #shared tests
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -w -z -Y -e -i1 -m -t 100k -b 100k
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -w -k -e -i1 -m -t 100k -b 100k
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -r -z -k -e -i1 -m -t 100k -b 100k
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X 13 ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X -13 ${V} -F -o $IODIR/testwrite.${runid} -e -i${i} -m -t ${xfer} -b ${block} -d 0.1
#shared tests #test mutually exclusive options
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -w -z -k -e -i1 -m -t 100k -b 100k
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -w -z - -k -e -i1 -m -t 100k -b 100k
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 TEST 2 ${IOR_EXEC} -a POSIX -w -Z -i1 -m -t 100k -b 100k -d 0.1
#test mutually exclusive options if [[ ${ERRORS} == 0 ]] ; then
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 echo "PASSED"
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 else
${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -Z -C ${V} -o $IODIR/testwrite.${runid} -i${i} -m -t ${xfer} -b ${block} -d 0.0 echo "Error, check the output files!"
let "tid=$tid + 17" fi
V=$V" -v" exit ${ERRORS}
done #blocks
date
done #test
let "n = $n * 2"
done #n
done #xfer
exit