Commit a1f5fdbb authored by Andreas Marek's avatar Andreas Marek

Merge branch 'amarek/add_scalapack_tests' into master_pre_stage

parents 54bcc6e0 88b309c3
This diff is collapsed.
......@@ -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+"\\\""
......@@ -512,6 +512,11 @@ for cc, fc, m, o, p, a, b, g, cov, instr, addr, na in product(
CFLAGS +=" --coverage -O0"
FCFLAGS +=" --coverage -O0"
# add tests for scalapack for some specific test cases
runScalapackTest = False
if (instr == "avx2" and cov == "coverage"):
runScalapackTest = True
# address-sanitize only with gnu compiler
if (addr == "address-sanitize" and (cc != "gnu" and fc != "gnu")):
......@@ -602,15 +607,20 @@ for cc, fc, m, o, p, a, b, g, cov, instr, addr, na in product(
(scalapackldflags,scalapackfcflags,libs,ldflags) = set_scalapack_flags(instr, fc, g, m, o)
memory = set_requested_memory(matrix_size[na])
# 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(" - export SKIP_STEP=0 ")
if ( instr == "sse"):
print(" - if [ $MEDIUM_MATRIX -gt 150 ]; then export SKIP_STEP=1 ; fi # our SSE test machines do not have a lot of memory")
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 -s $SKIP_STEP ")
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)
print("\n")
......@@ -629,32 +639,34 @@ for cc, fc, m, o, p, a, b, g, cov, instr, addr, na in product(
print(" - export SRUN_COMMANDLINE_BUILD=\"--partition=$SLURMPARTITION --nodelist=$SLURMHOST --time=$BUILDTIME --constraint=$CONTSTRAINTS --mem=$REQUESTED_MEMORY \" ")
print(" - export SRUN_COMMANDLINE_RUN=\"--partition=$SLURMPARTITION --nodelist=$SLURMHOST --time=$RUNTIME --constraint=$CONTSTRAINTS --mem=$REQUESTED_MEMORY \" ")
#print(" - echo \"srun --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE\" ")
print(" - srun --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE" \
+ " /scratch/elpa/bin/configure_elpa.sh" \
+ " \" 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 + "\"" )
if (runScalapackTest):
print(" - srun --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE" \
+ " /scratch/elpa/bin/configure_elpa.sh" \
+ " \" CC=\\\""+c_compiler_wrapper+"\\\"" + " CFLAGS=\\\""+CFLAGS+"\\\"" \
+ " FC=\\\""+fortran_compiler_wrapper+"\\\"" + " FCFLAGS=\\\""+FCFLAGS+"\\\"" \
+ libs + " " + ldflags + " " + " " + scalapackldflags + " " + scalapackfcflags \
+ " --enable-option-checking=fatal --enable-scalapack-tests" + " " + mpi_configure_flag + " " + openmp[o] \
+ " " + precision[p] + " " + assumed_size[a] + " " + band_to_full_blocking[b] \
+ " " +gpu[g] + INSTRUCTION_OPTIONS + "\"" )
else:
print(" - srun --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE" \
+ " /scratch/elpa/bin/configure_elpa.sh" \
+ " \" 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 + "\"" )
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 == "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 == "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=""
skipStep=0
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] [-s skipStep]
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)
-s skipStep
Skip the test run if 1 (default 0)
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:s: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;;
s)
skipStep=$OPTARG;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
usage
exit 1;;
*)
exit 1;;
esac
done
if [ $skipStep -eq 0]
then
echo "Skipping the test since option -s has been specified"
exit 0
else
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
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