Changeset a61dbb for src/Actions
- Timestamp:
- Jul 14, 2014, 11:15:18 AM (10 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d8821e
- Parents:
- abfc95
- git-author:
- Frederik Heber <heber@…> (07/13/14 13:03:31)
- git-committer:
- Frederik Heber <heber@…> (07/14/14 11:15:18)
- Location:
- src/Actions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionQueue.cpp
rabfc95 ra61dbb 58 58 AR(new ActionRegistry()), 59 59 history(new ActionHistory), 60 CurrentAction(0), 60 61 #ifndef HAVE_ACTION_THREAD 61 CurrentAction(0)62 lastActionOk(true) 62 63 #else 63 CurrentAction(0),64 lastActionOk(true), 64 65 run_thread(boost::bind(&ActionQueue::run, this)), 65 66 run_thread_isIdle(true) … … 99 100 try { 100 101 newaction->call(); 102 lastActionOk = true; 101 103 } catch(ActionFailureException &e) { 102 104 std::cerr << "Action " << *boost::get_error_info<ActionNameString>(e) << " has failed." << std::endl; 103 105 World::getInstance().setExitFlag(5); 106 actionqueue.clear(); 107 tempqueue.clear(); 108 lastActionOk = false; 109 std::cerr << "ActionQueue cleared." << std::endl; 104 110 } 105 111 #else … … 156 162 try { 157 163 actionqueue[CurrentAction]->call(); 164 lastActionOk = true; 158 165 } catch(ActionFailureException &e) { 159 166 std::cerr << "Action " << *boost::get_error_info<ActionNameString>(e) << " has failed." << std::endl; 160 167 World::getInstance().setExitFlag(5); 168 actionqueue.clear(); 169 tempqueue.clear(); 170 lastActionOk = false; 171 std::cerr << "ActionQueue cleared." << std::endl; 172 CurrentAction = (size_t)-1; 161 173 } 162 174 // access actionqueue, hence using mutex -
src/Actions/ActionQueue.hpp
rabfc95 ra61dbb 122 122 void redoLast(); 123 123 124 /** Return status of last executed action. 125 * 126 * \return true - action executed correctly, false - else 127 */ 128 bool getLastActionOk() const 129 { return lastActionOk; } 130 124 131 #ifdef HAVE_ACTION_THREAD 125 132 boost::thread &getRunThread() … … 205 212 ActionQueue_t tempqueue; 206 213 214 //!> indicates that the last action has failed 215 bool lastActionOk; 216 207 217 #ifdef HAVE_ACTION_THREAD 208 218 //!> internal thread to call Actions -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
rabfc95 ra61dbb 138 138 139 139 // Phase Two: add MPQCJobs and send 140 const size_t NoJobs = mpqccontroller.addJobsFromQueue(140 const bool AddJobsStatus = mpqccontroller.addJobsFromQueue( 141 141 params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity, 142 142 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly 143 143 ); 144 LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue."); 144 if (AddJobsStatus) 145 LOG(1, "INFO: Added jobs from FragmentJobsQueue."); 146 else { 147 ELOG(1, "Adding jobs failed."); 148 return Action::failure; 149 } 145 150 mpqccontroller.run(); 146 151
Note:
See TracChangeset
for help on using the changeset viewer.