run.sh 2.22 KB
Newer Older
incardon's avatar
incardon committed
1
2
3
4
#! /bin/bash

# Make a directory in /tmp/openfpm_data

incardon's avatar
incardon committed
5
6
7
8
workspace=$1
hostname=$2
nproc=$3
branch=$4
incardon's avatar
incardon committed
9

incardon's avatar
incardon committed
10
11
12
13
echo "Directory: $workspace"
echo "Machine: $hostname"
echo "Nproc: $nproc"
echo "Branch: $branch"
incardon's avatar
incardon committed
14

incardon's avatar
incardon committed
15
16

if [ "$hostname" == "wetcluster" ]; then
incardon's avatar
incardon committed
17

incardon's avatar
incardon committed
18
export MODULEPATH="/sw/apps/modules/modulefiles:$MODULEPATH"
incardon's avatar
incardon committed
19
20

 ## Run on the cluster
incardon's avatar
incardon committed
21
 bsub -o output_run2.%J -K -n 2 -R "span[hosts=1]" "module load openmpi/1.8.1 ; module load gcc/4.9.2;  mpirun -np $nproc ./src/vcluster_test"
incardon's avatar
incardon committed
22
 if [ $? -ne 0 ]; then exit 1 ; fi
incardon's avatar
incardon committed
23

incardon's avatar
incardon committed
24
elif [ "$hostname" == "taurus" ]; then
incardon's avatar
incardon committed
25
26
27
28
29
30
31
32
33
34
 echo "Running on taurus"

 echo "$PATH"
 module load gcc/5.3.0
 module load boost/1.60.0
 module load openmpi/1.10.2-gnu
 module unload bullxmpi

### to exclude --exclude=taurusi[6300-6400],taurusi[5400-5500]

incardon's avatar
incardon committed
35
 salloc --nodes=1 --ntasks-per-node=$nproc --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np $nproc src/vcluster_test --report_level=no"
incardon's avatar
incardon committed
36
37
 if [ $? -ne 0 ]; then exit 1 ; fi
 sleep 5
incardon's avatar
incardon committed
38
# salloc --nodes=2 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 48 src/vcluster_test --report_level=no"
incardon's avatar
incardon committed
39
40
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
incardon's avatar
incardon committed
41
# salloc --nodes=4 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 96 src/vcluster_test --report_level=no"
incardon's avatar
incardon committed
42
43
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
incardon's avatar
incardon committed
44
# salloc --nodes=8 --ntasks-per-node=24 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 192 src/vcluster_test --report_level=no"
incardon's avatar
incardon committed
45
46
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
incardon's avatar
incardon committed
47
# salloc --nodes=10 --ntasks-per-node=24 --time=00:5:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 240 src/vcluster_test --report_level=no"
incardon's avatar
incardon committed
48
# if [ $? -ne 0 ]; then exit 1 ; fi
incardon's avatar
incardon committed
49
50
51

else

incardon's avatar
incardon committed
52
 export PATH="$PATH:$HOME/openfpm_dependencies/openfpm_vcluster/MPI/bin"
incardon's avatar
incardon committed
53
54
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_vcluster/BOOST/lib"
 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_vcluster/BOOST/lib"
incardon's avatar
incardon committed
55

incardon's avatar
incardon committed
56

incardon's avatar
incardon committed
57
 cd openfpm_vcluster
incardon's avatar
incardon committed
58
 mpirun --oversubscribe -np $nproc ./build/src/vcluster_test
incardon's avatar
incardon committed
59
60
61
 if [ $? -ne 0 ]; then exit 1 ; fi
fi

incardon's avatar
incardon committed
62