|
@@ -37,6 +37,7 @@ if [[ $5 -lt 0 ]]; then
|
37
|
37
|
exit 1
|
38
|
38
|
fi
|
39
|
39
|
|
|
40
|
+timestart=$(date +%s)
|
40
|
41
|
|
41
|
42
|
whichDSF=$1
|
42
|
43
|
kBT=$2
|
|
@@ -83,7 +84,6 @@ basedir="$(pwd)"
|
83
|
84
|
# Safety barrier:
|
84
|
85
|
# if directory exists, don't do anything and request directory deletion before proceeding
|
85
|
86
|
dircheck='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N
|
86
|
|
-echo $dircheck
|
87
|
87
|
if [[ -d $dircheck ]]; then
|
88
|
88
|
echo 'A c scan with these parameters already exists. Aborting.'
|
89
|
89
|
echo 'If you really want to run this command, please first delete directory:\n'$dircheck
|
|
@@ -97,9 +97,24 @@ do
|
97
|
97
|
dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_scan_N_fixed/k_0_to_'${(l:2::0:)nkmax}'kFo4/sr_'$target_sumrule'/store/data/N_'$N'/c_'$c
|
98
|
98
|
mkdir -p $dir
|
99
|
99
|
cd $dir
|
|
100
|
+ clock1=$(date +%s)
|
100
|
101
|
LiebLin_DSF $whichDSF $c $N $N 0 $iKmax $kBT $Max_Secs $target_sumrule $refine
|
|
102
|
+ clock2=$(date +%s)
|
|
103
|
+ dt=$(($clock2 - $clock1))
|
|
104
|
+ dt_hrs=$(($dt/3600))
|
|
105
|
+ dt_min=$((($dt - 3600*$dt_hrs)/60))
|
|
106
|
+ dt_sec=$(($dt - 3600*$dt_hrs - 60*$dt_min))
|
101
|
107
|
cd $basedir
|
102
|
|
- echo '++ Successfully computed DSFs for c =' $c', N = '$N'.\n' | tee -a $logfile
|
|
108
|
+ echo '++ Successfully computed DSFs for c =' $c', N = '$N'.' | tee -a $logfile
|
|
109
|
+ echo 'Time required: '$dt_hrs'h '$dt_min'm '$dt_sec's.\n' | tee -a $logfile
|
103
|
110
|
done
|
104
|
111
|
|
105
|
|
-echo '\n\n++ Successfully completed c_scan_N_fixed_data for N = '$N' on '$(date '+%Y-%m-%d-%Hh%M')'.\n' | tee -a $logfile
|
|
112
|
+echo '\n++ Successfully completed c_scan_N_fixed_data for N = '$N' on '$(date '+%Y-%m-%d-%Hh%M')'.\n' | tee -a $logfile
|
|
113
|
+
|
|
114
|
+timestop=$(date +%s)
|
|
115
|
+
|
|
116
|
+duration=$(($timestop - $timestart))
|
|
117
|
+hours=$(($duration/3600))
|
|
118
|
+minutes=$((($duration - 3600*$hours)/60))
|
|
119
|
+seconds=$(($duration - 3600*$hours - 60*$minutes)) # don't bother printing
|
|
120
|
+echo 'Total time required: '$hours'h '$minutes'm.\n' | tee -a $logfile
|