-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·31 lines (22 loc) · 752 Bytes
/
run
File metadata and controls
executable file
·31 lines (22 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
set -e #Fail on any error
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu || echo "$NUMBER_OF_PROCESSORS")
if [ -n "$1" ]; then
proj=$1
shift;
else
proj="template-ini"
fi
if [ -n "$1" ]; then
cores=$1
shift;
fi
echo "About to use $cores cores";
cmake --build build --target ${proj}; #-v for verbose
cd examples/$proj
# module load intelMPI
# [ $(uname) = "Linux" ] && source /opt/intel/Compiler/19.0/bin/compilervars.sh arch intel64
set -x
[ $(uname) = "Linux" ] && mpirun -np $cores ./qsf-${proj} $@
# [ $(uname) = "Linux" ] && mpirun -np 2 valgrind --leak-check=yes --show-leak-kinds=all --verbose ./${what}
[ $(uname) = "Darwin" ] && mpirun --host localhost:$cores ./qsf-${proj} $@