run.sh 2.15 KB
Newer Older
Pietro Incardona's avatar
Pietro Incardona committed
1
2
3
4
5
6
#! /bin/bash

# Make a directory in /tmp/openfpm_data

echo "Directory: $1"
echo "Machine: $2"
Pietro Incardona's avatar
Pietro Incardona committed
7
echo "Nproc: $4"
Pietro Incardona's avatar
Pietro Incardona committed
8
echo "Branch: $5"
Pietro Incardona's avatar
Pietro Incardona committed
9

Pietro Incardona's avatar
Pietro Incardona committed
10

Pietro Incardona's avatar
Pietro Incardona committed
11
12
if [ "$2" == "wetcluster" ]; then

Pietro Incardona's avatar
Pietro Incardona committed
13
export MODULEPATH="/sw/apps/modules/modulefiles:$MODULEPATH"
Pietro Incardona's avatar
Pietro Incardona committed
14
15

 ## Run on the cluster
Pietro Incardona's avatar
Pietro Incardona committed
16
 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 $3 ./src/vcluster_test"
Pietro Incardona's avatar
Pietro Incardona committed
17
 if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
18

Pietro Incardona's avatar
Pietro Incardona committed
19
20
21
22
23
24
25
26
27
28
29
elif [ "$2" == "taurus" ]; then
 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]

Pietro Incardona's avatar
Pietro Incardona committed
30
 salloc --nodes=1 --ntasks-per-node=$3 --time=00:05:00 --mem-per-cpu=1800 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np $3 src/vcluster_test --report_level=no"
Pietro Incardona's avatar
Pietro Incardona committed
31
32
 if [ $? -ne 0 ]; then exit 1 ; fi
 sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
33
# 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"
Pietro Incardona's avatar
Pietro Incardona committed
34
35
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
36
# 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"
Pietro Incardona's avatar
Pietro Incardona committed
37
38
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
39
# 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"
Pietro Incardona's avatar
Pietro Incardona committed
40
41
# if [ $? -ne 0 ]; then exit 1 ; fi
# sleep 5
Pietro Incardona's avatar
Pietro Incardona committed
42
# 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"
Pietro Incardona's avatar
Pietro Incardona committed
43
# if [ $? -ne 0 ]; then exit 1 ; fi
Pietro Incardona's avatar
Pietro Incardona committed
44
45
46
47

else

 source $HOME/.bashrc
Pietro Incardona's avatar
Pietro Incardona committed
48
 export PATH="$PATH:$HOME/openfpm_dependencies/openfpm_vcluster/MPI/bin"
49
50
 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"
Pietro Incardona's avatar
Pietro Incardona committed
51

52
 cd openfpm_vcluster
53
 mpirun --oversubscribe -np $4 ./build/src/vcluster_test
Pietro Incardona's avatar
Pietro Incardona committed
54
55
56
 if [ $? -ne 0 ]; then exit 1 ; fi
fi

Pietro Incardona's avatar
Pietro Incardona committed
57