run_ci_tests.sh 2 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
set -e
set -x

#some defaults
makeTasks=1
mpiTasks=2
matrixSize=150
nrEV=$matrixSize
blockSize=16
ompThreads=1
configueArg=""
13
skipStep=0
Andreas Marek's avatar
Andreas Marek committed
14
15
16
17
18
19
20

function usage() {
	cat >&2 <<-EOF

		Call all the necessary steps to perform an ELPA CI test

		Usage:
21
		  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]
Andreas Marek's avatar
Andreas Marek committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

		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)
43
44
45
46

		 -s skipStep
		    Skip the test run if 1 (default 0)

Andreas Marek's avatar
Andreas Marek committed
47
48
49
50
51
52
		 -h
		    Print this help text
	EOF
}


53
while getopts "c:t:j:m:n:b:o:s:h" opt; do
Andreas Marek's avatar
Andreas Marek committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
	case $opt in
		j)
			makeTasks=$OPTARG;;
		t)
			mpiTasks=$OPTARG;;
		m)
			matrixSize=$OPTARG;;
		n)
			nrEV=$OPTARG;;
		b)
			blockSize=$OPTARG;;
		o)
			ompThreads=$OPTARG;;
		c)
68
69
70
			configureArgs=$OPTARG;;
		s)
			skipStep=$OPTARG;;
Andreas Marek's avatar
Andreas Marek committed
71
72
73
74
75
76
77
78
79
80
		:)
			echo "Option -$OPTARG requires an argument" >&2;;
		h)
			usage
			exit 1;;
		*)
			exit 1;;
	esac
done

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
Andreas Marek's avatar
Andreas Marek committed
98