Changeset 9a3f84 for src/Fragmentation/Automation/FragmentScheduler.hpp
- Timestamp:
- Jun 29, 2012, 1:23:14 PM (13 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:
- aec098
- Parents:
- a8f54b6
- git-author:
- Frederik Heber <heber@…> (05/21/12 07:14:59)
- git-committer:
- Frederik Heber <heber@…> (06/29/12 13:23:14)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/FragmentScheduler.hpp
ra8f54b6 r9a3f84 29 29 #include "Pool/WorkerPool.hpp" 30 30 #include "WorkerAddress.hpp" 31 #include "WorkerChoices.hpp" 31 32 32 33 /** FragmentScheduler serves FragmentJobs to Workers and accepts commands from … … 60 61 pool(_pool), 61 62 result( new FragmentResult(JobId::NoJob) ), 62 callback_sendJobToWorker(_callback) 63 callback_sendJobToWorker(_callback), 64 choice(NoWorkerOperation) 63 65 {} 64 66 virtual ~WorkerListener_t() {} … … 68 70 void handle_Accept(const boost::system::error_code& e, connection_ptr conn); 69 71 72 /// Handle completion of Worker operation to read choice 73 void handle_ReadChoice(const boost::system::error_code& e, connection_ptr conn); 74 70 75 /// Worker callback function when job has been sent. 71 void handle_ checkAddress(const boost::system::error_code& e, connection_ptr conn);76 void handle_ReadAddress(const boost::system::error_code& e, connection_ptr conn); 72 77 73 78 /// Worker callback function when new worker has enrolled. … … 76 81 /// Worker callback function when result has been received. 77 82 void handle_ReceiveResultFromWorker(const boost::system::error_code& e, connection_ptr conn); 83 84 /// Worker callback function when invalid result has been received. 85 void handle_RejectResultFromWorker(const boost::system::error_code& e, connection_ptr conn); 78 86 private: 87 //!> static entity to indicate to clients that the queue is empty. 88 static FragmentJob::ptr NoJob; 89 79 90 //!> address of new Worker 80 91 WorkerAddress address; … … 86 97 WorkerPool &pool; 87 98 88 // /result that is received from the client.99 //!> result that is received from the client. 89 100 FragmentResult::ptr result; 90 101 … … 92 103 boost::function<void (const WorkerAddress&, FragmentJob::ptr&)> callback_sendJobToWorker; 93 104 94 // static entity to indicate to clients that the queue is empty.95 static FragmentJob::ptr NoJob;105 //!> choice 106 enum WorkerChoices choice; 96 107 }; 97 108 … … 136 147 FragmentQueue & JobsQueue; 137 148 138 // /bunch of jobs received from controller before placed in JobsQueue149 //!> bunch of jobs received from controller before placed in JobsQueue 139 150 std::vector<FragmentJob::ptr> jobs; 140 151 141 // /number of jobs that are waiting to be and are calculated, required for returning status152 //!> number of jobs that are waiting to be and are calculated, required for returning status 142 153 std::vector<size_t> jobInfo; 143 154 144 // choice155 //!> choice 145 156 enum ControllerChoices choice; 146 157 … … 154 165 155 166 private: 156 // /Queue with data to be sent to each client.167 //!> Queue with data to be sent to each client. 157 168 FragmentQueue JobsQueue; 158 169
Note:
See TracChangeset
for help on using the changeset viewer.