Browse Source

Add alerts

master
Jean-Sébastien 2 years ago
parent
commit
d7c421fde5
2 changed files with 14 additions and 2 deletions
  1. 1
    1
      src/EXECS/LiebLin_DSF_tester.cc
  2. 13
    1
      src/SCAN/General_Scan.cc

+ 1
- 1
src/EXECS/LiebLin_DSF_tester.cc View File

78
 	cout << setprecision(16) << "estate.E - spstate.E = " << estate.E - spstate.E
78
 	cout << setprecision(16) << "estate.E - spstate.E = " << estate.E - spstate.E
79
 	     << "\tME = " << real(exp(ln_Psi_ME(spstate, estate))) << endl;
79
 	     << "\tME = " << real(exp(ln_Psi_ME(spstate, estate))) << endl;
80
 
80
 
81
-      //cout << "Another try ? (1 == yes, 0 == no)" << endl;
81
+      cout << "Another try ? (1 == yes, 0 == no)" << endl;
82
       again = 1;
82
       again = 1;
83
       cin >> again;
83
       cin >> again;
84
     } while (again != 0);
84
     } while (again != 0);

+ 13
- 1
src/SCAN/General_Scan.cc View File

537
 
537
 
538
       Vect<Scan_Thread> threads_to_do;
538
       Vect<Scan_Thread> threads_to_do;
539
       int il_to_do = paused_thread_data.lowest_il_with_nthreads_neq_0; // for resaving threads in case we're out of time
539
       int il_to_do = paused_thread_data.lowest_il_with_nthreads_neq_0; // for resaving threads in case we're out of time
540
+      DP current_threshold = exp(-paused_thread_data.logscale * il_to_do);
540
       {
541
       {
541
 #pragma omp critical
542
 #pragma omp critical
542
 	threads_to_do = paused_thread_data.Extract_Next_Scan_Threads();
543
 	threads_to_do = paused_thread_data.Extract_Next_Scan_Threads();
568
 
569
 
569
 	  ScanState.Set_to_Label(threads_to_do[ithread].label, BaseScanState.Ix2);
570
 	  ScanState.Set_to_Label(threads_to_do[ithread].label, BaseScanState.Ix2);
570
 
571
 
572
+	  Tstate ScanStateBeingDescended = ScanState;
571
 
573
 
572
 	  // STARTING Descend_and_Compute block:
574
 	  // STARTING Descend_and_Compute block:
573
 	  int type_required = threads_to_do[ithread].type;
575
 	  int type_required = threads_to_do[ithread].type;
657
 		// 	     << "\t" << setw(16) << std::fixed << setprecision(8)
659
 		// 	     << "\t" << setw(16) << std::fixed << setprecision(8)
658
 		// 	     << data_value/exp(-paused_thread_data.logscale * il_to_do) << endl;
660
 		// 	     << data_value/exp(-paused_thread_data.logscale * il_to_do) << endl;
659
 
661
 
662
+		// Uncomment below if alerts for unexpectedly high data_value (as compared to threshold) are desired
663
+		// if (fabs(data_value) > 10.0* current_threshold) {
664
+		//   cout << "\nAlert: data_value > 10* threshold, " << data_value << "\t" << current_threshold << endl;
665
+		//   cout << " for state " << ScanState.label << " descendent of type " << type_required
666
+		//        << " of state " << ScanStateBeingDescended.label << endl;
667
+		//   cout << AveragingState.Ix2 << endl;
668
+		//   cout << ScanStateBeingDescended.Ix2 << endl;
669
+		//   cout << ScanState.Ix2 << endl;
670
+		// }
671
+
660
 	      } // if (ScanState.conv)
672
 	      } // if (ScanState.conv)
661
 	      else {
673
 	      else {
662
 		if (nconv0++ < 1000)
674
 		if (nconv0++ < 1000)
753
 
765
 
754
 	  } // for idesc
766
 	  } // for idesc
755
 
767
 
756
-	    // FINISHED Descend_and_Compute block
768
+	  // FINISHED Descend_and_Compute block
757
 
769
 
758
 
770
 
759
 	  scan_info_this_ithread.TT += omp_get_wtime() - start_time_this_ithread;
771
 	  scan_info_this_ithread.TT += omp_get_wtime() - start_time_this_ithread;

Loading…
Cancel
Save