|
@@ -93,10 +93,20 @@ int main(int argc, char* argv[])
|
93
|
93
|
Secs_left = int(Max_Secs - (ActualTime - StartTime));
|
94
|
94
|
|
95
|
95
|
Scan_Info resulting_info;
|
96
|
|
- if (srsat < target_sumrule && Secs_left > Max_Secs/2)
|
|
96
|
+ if (srsat < target_sumrule && Secs_left > Max_Secs/2) {
|
97
|
97
|
// Improve the icmin calculation by one chunk:
|
|
98
|
+ cout << "---\nTime left = " << Secs_left << " seconds." << endl;
|
|
99
|
+ if (srsat > 0) {
|
|
100
|
+ cout << "Continue with N = " << N << ". Sumrule previously achieved: " << srsat << endl;
|
|
101
|
+ } else {
|
|
102
|
+ cout << "Start with N = " << N << "." << endl;
|
|
103
|
+ }
|
98
|
104
|
resulting_info = Scan_LiebLin (whichDSF, c_int, L, N, iKmin, iKmax, kBT,
|
99
|
105
|
Secs_left, target_sumrule, refine);
|
|
106
|
+ cout << "Done with N = " << N
|
|
107
|
+ << ". Sumrule obtained: " << resulting_info.sumrule_obtained
|
|
108
|
+ << endl;
|
|
109
|
+ }
|
100
|
110
|
|
101
|
111
|
if (resulting_info.sumrule_obtained > target_sumrule) {
|
102
|
112
|
// Move files to storage, keeping a copy of the .src file in the current directory
|
|
@@ -111,15 +121,15 @@ int main(int argc, char* argv[])
|
111
|
121
|
ActualTime = omp_get_wtime();
|
112
|
122
|
|
113
|
123
|
Secs_left = int(Max_Secs - (ActualTime - StartTime));
|
114
|
|
- cout << "Done with N = " << N << ". Sumrule obtained: " << resulting_info.sumrule_obtained
|
115
|
|
- << "\tTime left = " << Secs_left << " seconds." << endl;
|
116
|
124
|
|
117
|
|
- if (Secs_left < 60) {
|
|
125
|
+ if (Secs_left < 30) {
|
118
|
126
|
if (resulting_info.sumrule_obtained > target_sumrule) {
|
119
|
|
- cout << "Breaking out after completing N = " << N << " since time left = " << Secs_left << endl;
|
|
127
|
+ cout << "---\nBreaking out after completing N = " << N
|
|
128
|
+ << " since time left = " << Secs_left << " seconds." << endl;
|
120
|
129
|
}
|
121
|
130
|
else {
|
122
|
|
- cout << "Breaking out while working on N = " << N << " since allocated time is exhausted." << endl;
|
|
131
|
+ cout << "---\nBreaking out while working on N = " << N
|
|
132
|
+ << " since allocated time is exhausted." << endl;
|
123
|
133
|
}
|
124
|
134
|
break;
|
125
|
135
|
}
|