Changeset a61dbb
- Timestamp:
- Jul 14, 2014, 11:15:18 AM (11 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)
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified 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 -
TabularUnified 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 -
TabularUnified 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 -
TabularUnified src/Fragmentation/Automation/MPQCFragmentController.cpp ¶
rabfc95 ra61dbb 57 57 ) 58 58 { 59 bool status = true; 59 60 // give them all valid ids 60 61 std::vector<FragmentJob::ptr> newjobs = FragmentJobQueue::getInstance().getJobs(); … … 65 66 job->DoLongrange = _DoLongrange; 66 67 job->DoValenceOnly = _DoValenceOnly; 67 changeJobId((*jobiter), getAvailableId()); 68 JobId_t id = getAvailableId(); 69 if (id == FragmentJob::IllegalJob) { 70 status = false; 71 break; 72 } 73 changeJobId((*jobiter), id); 68 74 } 69 75 // add the jobs 70 76 addJobs(newjobs); 77 status &= (newjobs.size() != 0); 71 78 72 return (newjobs.size() != 0);79 return status; 73 80 } 74 81 -
TabularUnified src/UIElements/CommandLineUI/CommandLineWindow.cpp ¶
rabfc95 ra61dbb 72 72 if (AQ.isActionKnownByName(*CommandRunner)) { 73 73 // LOG1, "INFO: Checking presence of " << *CommandRunner << ": " << "queuing."); 74 AQ.queueAction(*CommandRunner); 74 if (AQ.getLastActionOk()) 75 AQ.queueAction(*CommandRunner); 76 else 77 LOG(1, "INFO: Skipping " << *CommandRunner << " as last action failed."); 75 78 } else { 76 79 // LOG(1, "INFO: Checking presence of " << *CommandRunner << ": " << "absent."); -
TabularUnified tests/regression/Fragmentation/testsuite-fragmentation.at ¶
rabfc95 ra61dbb 30 30 # check storing saturated fragment 31 31 m4_include([Fragmentation/StoreSaturatedFragment/testsuite-fragmentation-store-saturated-fragment.at]) 32 33 # check automation 34 m4_include([Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at]) -
TabularUnified tests/regression/Makefile.am ¶
rabfc95 ra61dbb 72 72 $(srcdir)/Fragmentation/testsuite-fragmentation.at \ 73 73 $(srcdir)/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at \ 74 $(srcdir)/Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at \ 74 75 $(srcdir)/Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at \ 75 76 $(srcdir)/Fragmentation/FragmentMolecule-MaxOrder/testsuite-fragmentation-fragment-molecule-maxorder.at \
Note:
See TracChangeset
for help on using the changeset viewer.