-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_fit_parallel.sh
executable file
·72 lines (54 loc) · 1.92 KB
/
model_fit_parallel.sh
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
#!/bin/bash
# Author: michel-pierre.coll
# Date: 2020-07-21 08:19:07
# Description: Run multiple model fitting for the Irritability cpp function in
# parrallel. This version creates an output for each participant.
# You can run as many in parrallel as there are threads on your system.
# It takes about 2 hours/participant (or 2 hours for a a parrallel batch).
# RAM usage is about 0.8 Gb/paricipant
# Command:
# Program, data in, data out, number of pairs, pair to start at, pait to end at
# ./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
# Change counter values to run more/different participant
i=0
for i in {0..20} # Will run part 0-20 in parrallel
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait # Waits for the first loop to end
i=0
for i in {21..40} # Will run part 21-40 in parrallel
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait
i=0
for i in {41..60}
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait
i=0
for i in {61..80}
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait
i=0
for i in {81..100}
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait
i=0
for i in {101..120}
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait
i=0
for i in {101..127}
do
./code/model_fit_v2/fit_ipomcp /code/data/trust_data.bin /code/model_fit_v2/outputs/trust_params_pair$i.bin 128 $i $((i+ 1)) &
done
wait