Commit 7683d83c authored by Andreas Marek's avatar Andreas Marek

Start to implement new ci

parent bf800d3e
......@@ -13,7 +13,7 @@ configueArg=""
skipStep=0
batchCommand=""
interactiveRun="yes"
SLURMBATCH="no"
slurmBatch="no"
function usage() {
cat >&2 <<-EOF
......@@ -21,7 +21,7 @@ function usage() {
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] [-q submit command] [-i interactive run]
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] [-q submit command] [-i interactive run] [-S submit to Slurm]"
Options:
-c configure arguments
......@@ -41,7 +41,7 @@ function usage() {
-o OpenMP threads
Number of OpenMP threads used during runs of ELPA tests
-j makeTaks
-j makeTasks
Number of processes make should use during build (default 1)
-s skipStep
......@@ -53,13 +53,16 @@ function usage() {
-i interactive_run
if "yes" NO no batch command will be triggered
-S submit to slurm
if "yes" a SLURM batch job will be submitted
-h
Print this help text
EOF
}
while getopts "c:t:j:m:n:b:o:s:q:S:i:h" opt; do
while getopts "c:t:j:m:n:b:o:s:q:i:S:h" opt; do
case $opt in
j)
makeTasks=$OPTARG;;
......@@ -82,7 +85,7 @@ while getopts "c:t:j:m:n:b:o:s:q:S:i:h" opt; do
i)
interactiveRun=$OPTARG;;
S)
SLURMBATCH=$OPTARG;;
slurmBatch=$OPTARG;;
:)
echo "Option -$OPTARG requires an argument" >&2;;
h)
......@@ -97,13 +100,26 @@ if [ $skipStep -eq 1 ]
then
echo "Skipping the test since option -s has been specified"
exit 0
else
fi
# not skipped then proceed
if [ "$slurmBatch" == "no" ]
then
# this is the old, messy implementation for
# - appdev
# - freya-interactive
# - draco
# - buildtest
# - virtual machine runners
echo "Using old CI logic for appdev"
if [ "$batchCommand" == "srun" ]
then
# use srun to start mpi jobs
if [ "$interactiveRun" == "no" ]
then
# interactive runs are not possible
echo "Running with $batchCommand with $SRUN_COMMANDLINE_CONFIGURE"
# $batchCommand --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE bash -c ' {source /etc/profile.d/modules.sh && source ./ci_test_scripts/ci-env-vars && eval ./configure $configureArgs; }'
$batchCommand --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE bash -c ' {source /etc/profile.d/modules.sh && source ./ci_test_scripts/ci-env-vars && eval ./configure $configureArgs; }'
$batchCommand --ntasks-per-core=1 --ntasks=1 --cpus-per-task=1 $SRUN_COMMANDLINE_CONFIGURE ./ci_test_scripts/configure_step.sh "$configureArgs"
if [ $? -ne 0 ]; then cat config.log && exit 1; fi
......@@ -115,22 +131,26 @@ else
grep -i "Expected %stop" test-suite.log && exit 1 || true ;
if [ $? -ne 0 ]; then exit 1; fi
else
#eval ./configure $configureArgs
./ci_test_scripts/configure_step.sh "$configureArgs"
# interactive runs are possible
#eval ./configure $configureArgs
./ci_test_scripts/configure_step.sh "$configureArgs"
if [ $? -ne 0 ]; then cat config.log && exit 1; fi
if [ $? -ne 0 ]; then cat config.log && exit 1; fi
make -j $makeTasks
if [ $? -ne 0 ]; then 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
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
grep -i "Expected %stop" test-suite.log && exit 1 || true ;
if [ $? -ne 0 ]; then exit 1; fi
fi
else
# do not use srun to start mpi applications
#eval ./configure $configureArgs
./ci_test_scripts/configure_step.sh "$configureArgs"
......@@ -145,5 +165,8 @@ else
grep -i "Expected %stop" test-suite.log && exit 1 || true ;
if [ $? -ne 0 ]; then exit 1; fi
fi
else
# a submission to SLURM via a batch script will be done
echo "Submitting to a SLURM batch system"
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