- Timestamp:
- Aug 20, 2014, 12:58:30 PM (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:
- 3a33e3
- Parents:
- 4e65af
- git-author:
- Frederik Heber <heber@…> (08/13/14 15:08:14)
- git-committer:
- Frederik Heber <heber@…> (08/20/14 12:58:30)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r4e65af r45cdce6 108 108 } 109 109 110 #ifdef HAVE_JOBMARKET111 110 static void updateSteps(Process &p, const size_t step, const size_t total) 112 111 { … … 114 113 p.setCurrStep(step); 115 114 } 116 #endif117 115 118 116 ActionState::ptr FragmentationFragmentationAutomationAction::performCall() { … … 178 176 ); 179 177 LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue."); 178 179 // prepare process 180 setMaxSteps(NumberJobs); 181 mpqccontroller.setUpdateHandler( 182 boost::bind(&updateSteps, boost::ref(*this), _1, _2) 183 ); 184 start(); 180 185 mpqccontroller.run(); 186 stop(); 181 187 182 188 // get back the results and place them in shortrangedata -
src/Fragmentation/Automation/MPQCCommandFragmentController.cpp
r4e65af r45cdce6 88 88 void MPQCCommandFragmentController::run() 89 89 { 90 const size_t NoExpectedResults = queue.size(); 90 91 // take jobs from queue and add them 91 92 std::vector<FragmentResult::ptr> resultvector; … … 106 107 // store result 107 108 resultvector.push_back(result); 109 handler(resultvector.size(), NoExpectedResults); 108 110 } 109 111 -
src/Fragmentation/Automation/MPQCCommandFragmentController.hpp
r4e65af r45cdce6 16 16 17 17 #include <boost/filesystem/path.hpp> 18 #include <boost/function.hpp> 18 19 19 20 #include <list> … … 39 40 ~MPQCCommandFragmentController() 40 41 {} 42 43 typedef boost::function<void (const size_t,const size_t)> update_handler_t; 44 45 void setUpdateHandler(update_handler_t _handler) 46 { 47 handler = _handler; 48 } 41 49 42 50 /** Command Controller to fill its hold of jobs from FragmentJobQueue. … … 102 110 //!> type-specific result container 103 111 ResultContainer<MPQCData> results; 112 113 //!> update handler that is called in waitforResults() 114 update_handler_t handler; 104 115 }; 105 116
Note:
See TracChangeset
for help on using the changeset viewer.