Commit 15ff1e94 authored by Andreas Marek's avatar Andreas Marek

Put test steps in one script

parent 8b5fa5e3
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -100,8 +100,8 @@ def set_scalapack_flags(instr, fc, g, m, o):
scalapackfcflags += " -I\\$CUDA_HOME/include"
if (instr == "sse" or (instr == "avx" and g != "with-gpu")):
scalapackldflags = " SCALAPACK_LDFLAGS=\""+scalapackldflags+"\""
scalapackfcflags = " SCALAPACK_FCFLAGS=\""+scalapackfcflags+"\""
scalapackldflags = " SCALAPACK_LDFLAGS=\\\""+scalapackldflags+"\\\""
scalapackfcflags = " SCALAPACK_FCFLAGS=\\\""+scalapackfcflags+"\\\""
if ( instr == "avx2" or instr == "avx512" or instr == "knl" or g == "with-gpu"):
scalapackldflags = " SCALAPACK_LDFLAGS=\\\""+"\\"+scalapackldflags+"\\\""
......@@ -604,12 +604,17 @@ for cc, fc, m, o, p, a, b, g, cov, instr, addr, na in product(
# do the configure
if ( instr == "sse" or (instr == "avx" and g != "with-gpu")):
print(" - ./configure " + " CC=\""+c_compiler_wrapper+"\"" + " CFLAGS=\""+CFLAGS+"\"" + " FC=\""+fortran_compiler_wrapper+"\"" + " FCFLAGS=\""+FCFLAGS+"\"" \
+ libs + " " + ldflags + " " + " "+ scalapackldflags +" " + scalapackfcflags \
+ " --enable-option-checking=fatal" + " " + mpi_configure_flag + " " + openmp[o] \
+ " " + precision[p] + " " + assumed_size[a] + " " + band_to_full_blocking[b] \
+ " " +gpu[g] + INSTRUCTION_OPTIONS + " || { cat config.log; exit 1; }")
print(" - ./run_ci_tests.sh -c \" CC=\\\""+c_compiler_wrapper+"\\\"" + " CFLAGS=\\\""+CFLAGS+"\\\"" + " FC=\\\""+fortran_compiler_wrapper+"\\\"" + " FCFLAGS=\\\""+FCFLAGS+"\\\"" \
+ libs + " " + ldflags + " " + " "+ scalapackldflags +" " + scalapackfcflags \
+ " --enable-option-checking=fatal" + " " + mpi_configure_flag + " " + openmp[o] \
+ " " + precision[p] + " " + assumed_size[a] + " " + band_to_full_blocking[b] \
+ " " +gpu[g] + INSTRUCTION_OPTIONS + "\" -j 8 -t " + str(MPI_TASKS) + " -m $MATRIX_SIZE -n $NUMBER_OF_EIGENVECTORS -b $BLOCK_SIZE ")
# # print(" - ./configure " + " CC=\""+c_compiler_wrapper+"\"" + " CFLAGS=\""+CFLAGS+"\"" + " FC=\""+fortran_compiler_wrapper+"\"" + " FCFLAGS=\""+FCFLAGS+"\"" \
# # + libs + " " + ldflags + " " + " "+ scalapackldflags +" " + scalapackfcflags \
# # + " --enable-option-checking=fatal" + " " + mpi_configure_flag + " " + openmp[o] \
# # + " " + precision[p] + " " + assumed_size[a] + " " + band_to_full_blocking[b] \
# # + " " +gpu[g] + INSTRUCTION_OPTIONS + " || { cat config.log; exit 1; }")
#
memory = set_requested_memory(matrix_size[na])
if ( instr == "avx2" or instr == "avx512" or instr == "knl" or g == "with-gpu"):
print(" - export REQUESTED_MEMORY="+memory)
......@@ -639,22 +644,22 @@ for cc, fc, m, o, p, a, b, g, cov, instr, addr, na in product(
+ " " +gpu[g] + INSTRUCTION_OPTIONS + "\"" )
print(" - sleep 1")
# do the build
if ( instr == "sse" or (instr == "avx" and g != "with-gpu")):
print(" - make -j 8")
# # do the build
# if ( instr == "sse" or (instr == "avx" and g != "with-gpu")):
# print(" - make -j 8")
if ( instr == "avx2" or instr == "avx512" or instr == "knl" or g == "with-gpu"):
#print(" - echo \"srun --ntasks=1 --cpus-per-task=8 $SRUN_COMMANDLINE_BUILD\" ")
print(" - srun --ntasks-per-core=1 --ntasks=1 --cpus-per-task=8 $SRUN_COMMANDLINE_BUILD /scratch/elpa/bin/build_elpa.sh")
# do the test
if ( instr == "sse" or (instr == "avx" and g != "with-gpu")):
if (o == "openmp" and cov == "no-coverage"):
print(" - export OMP_NUM_THREADS=2")
if (o == "openmp" and cov == "coverage"):
print(" - export OMP_NUM_THREADS=1")
for na in sorted(matrix_size.keys(),reverse=True):
print(" - make check TASKS="+str(MPI_TASKS) + " TEST_FLAGS=\" $MATRIX_SIZE $NUMBER_OF_EIGENVECTORS $BLOCK_SIZE " + "\" || { cat test-suite.log; exit 1; }")
print(" - grep -i \"Expected %stop\" test-suite.log && exit 1 || true ;")
# if ( instr == "sse" or (instr == "avx" and g != "with-gpu")):
# if (o == "openmp" and cov == "no-coverage"):
# print(" - export OMP_NUM_THREADS=2")
# if (o == "openmp" and cov == "coverage"):
# print(" - export OMP_NUM_THREADS=1")
# for na in sorted(matrix_size.keys(),reverse=True):
# print(" - make check TASKS="+str(MPI_TASKS) + " TEST_FLAGS=\" $MATRIX_SIZE $NUMBER_OF_EIGENVECTORS $BLOCK_SIZE " + "\" || { cat test-suite.log; exit 1; }")
# print(" - grep -i \"Expected %stop\" test-suite.log && exit 1 || true ;")
if ( instr == "avx2" or instr == "avx512" or instr == "knl" or g == "with-gpu"):
print(" - sleep 1")
......
#!/bin/bash
set -e
set -x
#some defaults
makeTasks=1
mpiTasks=2
matrixSize=150
nrEV=$matrixSize
blockSize=16
ompThreads=1
configueArg=""
function usage() {
cat >&2 <<-EOF
Call all the necessary steps to perform an ELPA CI test
Usage:
run_ci_tests [-c configure arguments] [-j makeTasks] [-h] [-t MPI Tasks] [-m matrix size] [-n number of eigenvectors] [-b block size] [-o OpenMP threads]
Options:
-c configure arguments
Line of arguments passed to configure call
-t MPI Tasks
Number of MPI processes used during test runs of ELPA tests
-m Matrix size
Size of the mxm matrix used during runs of ELPA tests
-n Number of eigenvectors
Number of eigenvectors to be computed during runs of ELPA tests
-b block size
Block size of block-cyclic distribution during runs of ELPA tests
-o OpenMP threads
Number of OpenMP threads used during runs of ELPA tests
-j makeTaks
Number of processes make should use during build (default 1)
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:h" opt; do
case $opt in
j)
makeTasks=$OPTARG;;
t)
mpiTasks=$OPTARG;;
m)
matrixSize=$OPTARG;;
n)
nrEV=$OPTARG;;
b)
blockSize=$OPTARG;;
o)
ompThreads=$OPTARG;;
c)
configureArgs=$OPTARG
echo $configureArgs;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
usage
exit 1;;
*)
exit 1;;
esac
done
eval ./configure $configureArgs
if [ $? -ne 0 ]; then cat confi.log && exit 1; fi
make -j $makeTasks
if [ $? -ne 0 ]; then exit 1; fi
OMP_NUM_THREADS=$ompThreads make check TASKS=$mpiTasks TEST_FLAGS="$matrixSize $nrEV $blockSize" || { cat test-suite-log; exit 1; }
if [ $? -ne 0 ]; then exit 1; fi
grep -i "Expected %stop" test-suite.log && exit 1 || true ;
if [ $? -ne 0 ]; then exit 1; fi
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