30{
31 void SoGEDriver ::
32 testInvariant () const
33 {}
34
35
36
37 SoGEDriver ::
38 SoGEDriver ()
39 {
41 }
42
43
44
45 ::StatusCode SoGEDriver ::
46 doManagerStep (Detail::ManagerData& data) const
47 {
49 using namespace msgEventLoop;
50 ANA_CHECK (BatchDriver::doManagerStep (data));
52 {
53 case Detail::ManagerStep::batchScriptVar:
54 {
55 data.batchJobId =
"EL_JOBID=$(($SGE_TASK_ID-1))\n";
56 }
57 break;
58
59 case Detail::ManagerStep::submitJob:
60 case Detail::ManagerStep::doResubmit:
61 {
63 {
64 ANA_MSG_ERROR (
"resubmission not supported for the SoGE driver");
65 return StatusCode::FAILURE;
66 }
67
68 if (
data.batchJobIndices.empty())
69 {
71 return ::StatusCode::FAILURE;
72 }
73 if (
data.batchJobIndices.back() + 1 !=
data.batchJobIndices.size())
74 {
75 ANA_MSG_ERROR (
"submitting a non-contiguous set of job indices is not supported");
76 return ::StatusCode::FAILURE;
77 }
78 const std::size_t njob =
data.batchJobIndices.size();
79
80 std::ostringstream
cmd;
82 <<
data.options.castString (Job::optSubmitFlags)
83 << " -t 1-" << (njob) << " run";
84 if (gSystem->Exec (
cmd.str().c_str()) != 0)
85 {
87 return StatusCode::FAILURE;
88 }
89 data.submitted =
true;
90 }
91 break;
92
93 default:
94 break;
95 }
96 return ::StatusCode::SUCCESS;
97 }
98}
#define RCU_NEW_INVARIANT(x)
#define RCU_READ_INVARIANT(x)
std::string quote(const std::string &name)
effects: quote the given name to protect it from the shell returns: the quoted name guarantee: strong...