Action_Thermostats
Add_AtomRandomPerturbation
Add_RotateAroundBondAction
Add_SelectAtomByNameAction
Adding_Graph_to_ChangeBondActions
Adding_MD_integration_tests
Adding_StructOpt_integration_tests
Automaking_mpqc_open
AutomationFragmentation_failures
Candidate_v1.6.0
Candidate_v1.6.1
ChangeBugEmailaddress
ChangingTestPorts
ChemicalSpaceEvaluator
Combining_Subpackages
Debian_Package_split
Debian_package_split_molecuildergui_only
Disabling_MemDebug
Docu_Python_wait
EmpiricalPotential_contain_HomologyGraph_documentation
Enable_parallel_make_install
Enhance_userguide
Enhanced_StructuralOptimization
Enhanced_StructuralOptimization_continued
Example_ManyWaysToTranslateAtom
Exclude_Hydrogens_annealWithBondGraph
FitPartialCharges_GlobalError
Fix_ChronosMutex
Fix_StatusMsg
Fix_StepWorldTime_single_argument
Fix_Verbose_Codepatterns
ForceAnnealing_goodresults
ForceAnnealing_oldresults
ForceAnnealing_tocheck
ForceAnnealing_with_BondGraph
ForceAnnealing_with_BondGraph_continued
ForceAnnealing_with_BondGraph_continued_betteresults
ForceAnnealing_with_BondGraph_contraction-expansion
GeometryObjects
Gui_displays_atomic_force_velocity
IndependentFragmentGrids_IntegrationTest
JobMarket_RobustOnKillsSegFaults
JobMarket_StableWorkerPool
JobMarket_unresolvable_hostname_fix
ODR_violation_mpqc_open
PartialCharges_OrthogonalSummation
PythonUI_with_named_parameters
QtGui_reactivate_TimeChanged_changes
Recreated_GuiChecks
RotateToPrincipalAxisSystem_UndoRedo
StoppableMakroAction
Subpackage_JobMarket
Subpackage_levmar
Subpackage_mpqc_open
Subpackage_vmg
ThirdParty_MPQC_rebuilt_buildsystem
TremoloParser_IncreasedPrecision
TremoloParser_MultipleTimesteps
Ubuntu_1604_changes
stable
Line | |
---|
1 | /*
|
---|
2 | * Project: JobMarket
|
---|
3 | * Description: asynchronous Server/Controller/Client-approach to parallel computing, based on boost::asio
|
---|
4 | * Copyright (C) 2012 Frederik Heber. All rights reserved.
|
---|
5 | *
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * ControllerOptions_SystemCommandJob.cpp
|
---|
10 | *
|
---|
11 | * Created on: 01.06.2012
|
---|
12 | * Author: heber
|
---|
13 |
|
---|
14 | */
|
---|
15 |
|
---|
16 | // include config.h
|
---|
17 | #ifdef HAVE_CONFIG_H
|
---|
18 | #include <config.h>
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | #include "CodePatterns/MemDebug.hpp"
|
---|
22 |
|
---|
23 | #include "JobMarket/Controller/ControllerOptions_SystemCommandJob.hpp"
|
---|
24 |
|
---|
25 | #include "CodePatterns/Log.hpp"
|
---|
26 |
|
---|
27 | int ControllerOptions_SystemCommandJob::parseExecutable(boost::program_options::variables_map &vm) {
|
---|
28 | if ((command == "createjobs") || (command == "addjobs")) {
|
---|
29 | if (!vm.count("executable")) {
|
---|
30 | LOG(1, "'"+command+"' with no executable options given, using NoOp.");
|
---|
31 | executable.clear();
|
---|
32 | } else {
|
---|
33 | executable = vm["executable"].as< std::string >();
|
---|
34 | }
|
---|
35 | }
|
---|
36 | return 0;
|
---|
37 | }
|
---|
38 |
|
---|
39 | int ControllerOptions_SystemCommandJob::parseJobCommand(boost::program_options::variables_map &vm) {
|
---|
40 | if (command == "createjobs") {
|
---|
41 | if (!vm.count("jobcommand")) {
|
---|
42 | LOG(1, "'"+command+"' with no jobcommand options given, using NoOp.");
|
---|
43 | jobcommand.clear();
|
---|
44 | } else {
|
---|
45 | jobcommand = vm["jobcommand"].as< std::string >();
|
---|
46 | }
|
---|
47 | }
|
---|
48 | return 0;
|
---|
49 | }
|
---|
50 |
|
---|
51 | int ControllerOptions_SystemCommandJob::parseTimes(boost::program_options::variables_map &vm) {
|
---|
52 | if (command == "createjobs") {
|
---|
53 | if (!vm.count("times")) {
|
---|
54 | times = 1;
|
---|
55 | } else {
|
---|
56 | times = vm["times"].as< size_t >();
|
---|
57 | }
|
---|
58 | }
|
---|
59 | return 0;
|
---|
60 | }
|
---|
61 |
|
---|
62 | int ControllerOptions_SystemCommandJob::parseIds(boost::program_options::variables_map &vm) {
|
---|
63 | if (command == "receiveresults") {
|
---|
64 | if (vm.count("ids")) {
|
---|
65 | ids = vm["ids"].as< std::vector<JobId_t> >();
|
---|
66 | } // otherwise is simply left empty
|
---|
67 | }
|
---|
68 | return 0;
|
---|
69 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.