-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash-heat-capacity-generational.sh
88 lines (73 loc) · 1.61 KB
/
bash-heat-capacity-generational.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
echo "Choose a simulation: "
read sim
echo "Starting Heat Capacity Calculations"
gens=(save/$sim/isings/*)
# find all generations in simulations folder
# for ((i=0; i<${#gens[@]}; i++)); do
# find the generation number
# gens[i]=$(echo ${gens[$i]} | cut -d "[" -f2 | cut -d "]" -f1)
# done
# parallel --bar --eta -j14 "python3 compute-heat-capacity-generational-2 $sim {1} {2}" ::: \
# $(seq 101) ::: \
# ${gens[@]}
#j14 <-- Number of procesors
#0 600 780 1600 1999
parallel --bar --eta -j10 "python3 compute-heat-capacity-generational-2 $sim {1} {2}" ::: \
$(seq 101) ::: \
0 4000
#1 500 1000 2000
#1 2 3 10 20 30 40 300 600 900 1000 1300 1600 1900 2300 2500 2800 3100 3400 3700 3990
#0 600 780 1600 1999
# parallel --bar 'python3 compute-heat-capacity {1}' ::: $(seq 101)
# NUMC=$numCores
# numCores=12
# i=0
# while [[ $i -lt 101 ]]
# do
# if [[ $NUMC > 0 ]]
# then
# for ((j=0; j<NUMC; j++));
# do
# echo "b_bin =" $i
# python3 compute-heat-capacity $i &
# ((i++))
# done
# NUMC=$(($NUMC-$j))
# echo "NUMC:" $NUMC
# for job in `jobs -p`
# do
# wait $job && ((NUMC++))
# done
# fi
# sleep 2
# done
# for ((i=17; i<=32; i++))
# do
# python3 compute-heat-capacity $i &
# done
# wait
# for ((i=33; i<=48; i++))
# do
# python3 compute-heat-capacity $i &
# done
# wait
# for ((i=49; i<=64; i++))
# do
# python3 compute-heat-capacity $i &
# done
# wait
# for ((i=65; i<=80; i++))
# do
# python3 compute-heat-capacity $i &
# done
# wait
# for ((i=81; i<=96; i++))
# do
# python3 compute-heat-capacity $i &
# done
# wait
# for ((i=97; i<=100; i++))
# do
# python3 compute-heat-capacity $i &
# done