Changeset 103eb8 for src


Ignore:
Timestamp:
Jul 6, 2012, 10:18:48 AM (13 years ago)
Author:
Frederik Heber <heber@…>
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:
edecba
Parents:
c8446c
git-author:
Frederik Heber <heber@…> (05/30/12 13:00:50)
git-committer:
Frederik Heber <heber@…> (07/06/12 10:18:48)
Message:

Removed SystemCommandJob capabilities from src/controller while maintaining MPQCCommandJob.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ControllerOptions_MPQCCommandJob.cpp

    rc8446c r103eb8  
    2626
    2727int ControllerOptions_MPQCCommandJob::parseExecutable(boost::program_options::variables_map &vm) {
    28   if ((command == "createjobs") || (command == "addjobs")) {
     28  if (command == "addjobs") {
    2929    if (!vm.count("executable")) {
    3030      ELOG(1, "'"+command+"' requires two options: [executable] [jobcommand].");
     
    3232    }
    3333    executable = vm["executable"].as< std::string >();
    34   }
    35   return 0;
    36 }
    37 
    38 int ControllerOptions_MPQCCommandJob::parseJobCommand(boost::program_options::variables_map &vm) {
    39   if (command == "createjobs") {
    40     if (!vm.count("jobcommand")) {
    41       ELOG(1, "'"+command+"' requires two options: [executable] [jobcommand].");
    42       return 255;
    43     }
    44     jobcommand = vm["jobcommand"].as< std::string >();
    4534  }
    4635  return 0;
  • src/ControllerOptions_MPQCCommandJob.hpp

    rc8446c r103eb8  
    2323{
    2424  int parseExecutable(boost::program_options::variables_map &vm);
    25   int parseJobCommand(boost::program_options::variables_map &vm);
    26 
    2725  int parseFragmentpath(boost::program_options::variables_map &vm);
    2826  int parseJobfiles(boost::program_options::variables_map &vm);
    2927
    3028  std::string executable;
    31   std::string jobcommand;
    3229  std::string fragmentpath;
    3330  std::vector<std::string> jobfiles;
  • src/controller_MPQCCommandJob.cpp

    rc8446c r103eb8  
    260260}
    261261
    262 
    263 /** Creates a SystemCommandJob out of give \a command with \a argument.
    264  *
    265  * @param controller reference to controller to add jobs
    266  * @param ControllerInfo information on the job
    267  */
    268 void createJobs(FragmentController &controller, const ControllerOptions_MPQCCommandJob &ControllerInfo)
    269 {
    270   const JobId_t next_id = controller.getAvailableId();
    271   LOG(2, "DEBUG: Creating new SystemCommandJob with '"
    272       +toString(ControllerInfo.executable)+"' and argument '"
    273       +toString(ControllerInfo.jobcommand)+"'.");
    274   FragmentJob::ptr testJob(
    275       new SystemCommandJob(ControllerInfo.executable, ControllerInfo.jobcommand, next_id) );
    276   std::vector<FragmentJob::ptr> jobs;
    277   jobs.push_back(testJob);
    278   controller.addJobs(jobs);
    279   controller.sendJobs(ControllerInfo.server, ControllerInfo.serverport);
    280   LOG(1, "INFO: Added one SystemCommandJob.");
    281 }
    282 
    283262/** Creates a MPQCCommandJob out of give \a command with \a argument.
    284263 *
     
    329308            boost::bind(&std::vector<std::string>::size, boost::cref(CI.jobfiles))))
    330309        (boost::bind(&AddJobs, boost::ref(controller), boost::cref(CI)))
    331       ));
    332   registrator(new ControllerCommand("createjobs",
    333       boost::assign::list_of< ControllerCommand::commands_t >
    334         (boost::bind(&FragmentController::requestIds,
    335             boost::ref(controller), boost::cref(ControllerInfo.server), boost::cref(ControllerInfo.serverport), 1))
    336         (boost::bind(&createJobs, boost::ref(controller), boost::cref(CI)))
    337310      ));
    338311  registrator(new ControllerCommand("receiveresults",
     
    358331{
    359332  option
    360     ("jobcommand", boost::program_options::value< std::string >(), "command argument for executable for 'createjobs'")
    361333    ("executable", boost::program_options::value< std::string >(), "executable for commands 'createjobs'")
    362334    ("fragment-path", boost::program_options::value< std::string >(), "path to fragment files for 'receivempqc'")
     
    374346  status = CI.parseExecutable(vm);
    375347  if (status) return status;
    376   status = CI.parseJobCommand(vm);
    377   if (status) return status;
    378348  status = CI.parseFragmentpath(vm);
    379349  if (status) return status;
Note: See TracChangeset for help on using the changeset viewer.