functors_with_signals.cpp
Go to the documentation of this file.
45 // /* Check if shutdown signal received, and either throw Shutdown exception or break out of loop */ 51 // ss << "Shutdown signal detected while computing functor "<<functor.myName<<"! (omp_get_level()==" << omp_get_level() << ", thread="<<omp_get_thread_num()<<")"; 59 // std::cerr << "rank " << signaldata().myrank() <<": No emergency shutdown occurred, but according to previous logic the signal to do so must have already been received! Please file a bug report." << std::endl; 65 // logger() << LogTags::core << LogTags::debug << "breakLoop triggered (iCanManageLoops==1) in functor " << functor.myName << EOM; 70 // functor.breakLoop(); /* Set this as well anyway in case I didn't understand the logic correctly. */ 71 // logger() << LogTags::core << LogTags::debug << "breakLoop triggered while computing functor "<<functor.myName<<" (thread="<<omp_get_thread_num()<<")" << EOM; 83 std::cerr << "rank " << signaldata().myrank() <<": Tried to set signaldata().inside_omp_block=1 (in "<<functor.myName<<"), but we are already in a parellel region! Please file a bug report." << std::endl; 88 functor.signal_mode_locked = false; /* We are allowed to switch off sighandler threadsafe mode */ 99 std::cerr << "rank " << signaldata().myrank() <<": Tried to set signaldata().inside_omp_block=0 (in "<<functor.myName<<"), but we are still inside a parellel region! Please file a bug report." << std::endl; void leaving_multithreaded_region(module_functor_common &functor) Definition: functors_with_signals.cpp:92 bool iCanManageLoops Flag indicating whether this function can manage a loop over other functions. Definition: functors.hpp:624 void entering_multithreaded_region() Check if shutdown is in progress and raise appropriate termination exception if so. Definition: signal_handling.cpp:550 Logging access header for GAMBIT. void leaving_multithreaded_region() Exit threadsafe signal handling mode. Definition: signal_handling.cpp:559 GAMBIT signal handling functions. Functor derived class for module functions. Definition: functors.hpp:399 Functor class definitions. EXPORT_SYMBOLS SignalData & signaldata() Retrieve global instance of signal handler options struct. Definition: signal_handling.cpp:633 std::string myrank() Retrieve MPI rank as a string (for log messages etc.) Definition: signal_handling.cpp:175 void entering_multithreaded_region(module_functor_common &functor) Definition: functors_with_signals.cpp:76 bool signal_mode_locked While locked, prevent this function switching off threadsafe* emergency signal handling. Definition: functors.hpp:727 |