-
Notifications
You must be signed in to change notification settings - Fork 0
/
sumo_run
executable file
·76 lines (73 loc) · 2.46 KB
/
sumo_run
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
#
# SUMO_RUN: Run loop over SUSE-SUMO-SUIB
# ==============================================
# Jon Grumer, Uppsala University, 2019
# Instructions
# ------------
# 0 : Make sure you have installed libblas-dev, liblapack-dev and openmpi-dev
# 1 : Setup the SUMO Makefile and compile all binaries with 'make all'
# 2 : Define and export the variable $SUMODIR (the SUMO root directory), in e.g. ~/.bashrc
# 3 : Add $SUMODIR to your PATH, e.g. in ~/.bashrc, to make all executbles available
# 4 : Make and cd to a dir where you are going to carry out the calculation
# 5 : Setup the main parameters below, and run this script.
# Setup - Main Parameters
# -----------------------
# Example: 1 4 4 example iptest2_600 y n 500 10000 1 100000000 1 1 1
# Arg 1 : Max Iterations
NMAX_ITER=1
# 2 : Nr + 1 (also make sure Nr in INFILE is NR_PLUS_ONE - 1)
NR_PLUS_ONE=4
# 3 : Number of procs for MC
NPPROC_MC=4
# 4 : Case Identifier
ID="example"
# 5 : Input file
INFILE="iptest2_600"
# 6 : Do gamma dep?
GAMMADEP="y"
# 7 : Iterative?
ITERATIVE="n"
# 8 : wl min
WLMIN=500
# 9 : wl max
WLMAX=10000
# 10 : res 1000
RES1000=1
# 11 : N total
NTOT=100000000
# 12 : min send
MIN_SEND=1
# 13 : min send UV
MIN_SEND_UV=1
# 14 : maxsend
MAX_SEND=1
# Setup - Folder structure (should be ok)
# ---------------------------------------
# 1 : Export 'DD' dir
export DD=$PWD/dd
# 2 : Create 'DD' directories:
mkdir -p $DD; mkdir -p $DD/mcphotons; mkdir -p $DD/mcphotons/radfield; mkdir -p $DD/modelspectra
# 3 : Get 'DATA' dir if not present
if [ ! -d "$PWD/DATA" ]; then
cp -rp $SUMODIR/DATA .
fi
# 4 : Get 'out' dir if not present
if [ ! -d "$PWD/out" ]; then
cp -rp $SUMODIR/out .
fi
# Run iterate script
# ------------------------------
if hash iterate.sh 2>/dev/null
then
iterate.sh $NMAX_ITER $NR_PLUS_ONE $NPPROC_MC $ID $INFILE $GAMMADEP $ITERATIVE $WLMIN $WLMAX $RES1000 $NTOT $MIN_SEND $MIN_SEND_UV $MAX_SEND
#&> logfile &
else
echo
echo " The SUMO script 'iterate.sh' was not found in your PATH!"
echo
echo " Add SUMO root dir to the PATH variable, eg in '~/.bashrc',"
echo " and make sure all SUMO scripts and binaries are available."
echo
fi