34 #ifndef TLAUNCHERBYSTEPREMOTE_H 35 #define TLAUNCHERBYSTEPREMOTE_H 56 #include "TAttribute.h" 57 #define LIBSSH_STATIC 1 58 #include <libssh/libssh.h> 59 #include <libssh/sftp.h> 60 #include <semaphore.h> 67 class TLauncherByStepRemote:
public TLauncher
74 enum EDistrib { kUnknown,kLSB, kSLURM,kMPI, kPBS, kSGE , kEc};
83 TLauncherByStepRemote(URANIE::DataServer::TDataServer *tds, TCode *code,EDistrib _edistrib=kUnknown, Option_t *option=
"" );
85 TLauncherByStepRemote(URANIE::DataServer::TDataServer *tds, TCode *code,TCluster *cluster, Option_t *option=
"" );
88 virtual ~TLauncherByStepRemote();
98 virtual void preTreatment(Option_t *option =
"");
105 virtual void run(Option_t *option =
"");
109 void clusterRun(Option_t *option =
"");
116 virtual void postTreatment(Option_t *option =
"");
122 void *retrieveOutputs(
void);
123 static void *staticRetrieveOutputs(
void *dummyPtr)
125 return ((TLauncherByStepRemote *)dummyPtr)->retrieveOutputs();
133 virtual void printLog(Option_t *option =
"");
145 void setNumberOfCores(Int_t ncores)
147 _nAllocatedCores = ncores;
156 _sSingleJob = !_sSingleJob;
162 Bool_t getSingleJob()
170 Int_t getNumberOfCores()
const 172 return _nAllocatedCores;
178 void setAllocatedTime(Int_t nseconds)
180 _nAllocatedSeconds = nseconds;
186 Int_t getAllocatedTime()
const 188 return _nAllocatedSeconds;
194 void setProjectName(TString project_name)
196 _sProjectName = project_name;
203 TString getProjectName()
const 205 return _sProjectName;
210 void setNumberOfChunks(Int_t numberofChunks)
212 _sNumberOfChunks = numberofChunks;
215 void setJobName(TString path)
218 _cluster->setJobName(path);
221 void addCluster(TCluster *cluster)
223 _cluster->_tds = _tds;
224 _cluster->_code= _code;
225 _cluster->setCluster(cluster);
234 Int_t getNumberOfChunks()
const 236 return _sNumberOfChunks;
243 Int_t getNRetries()
const 248 void UpdateJobListStatus();
249 void RetrieveJobOutput(std::pair<Int_t,Int_t> split);
250 void compileBinary();
252 TCluster* getCluster();
253 TCluster* setCluster();
263 void addCompilerDirective(TString directive, TString value);
265 void addCodeDependency(TString destinationLib, TString sourceList);
266 void addCodeLibrary(TString libName, TString sourcesList);
267 void addCodeExternalLibrary(TString libName, TString libPath , TString includePath);
268 void addCodeExternalLibrary(TString libName);
271 void substituteCompilerCode();
288 Int_t _nAllocatedSeconds;
292 Int_t _nAllocatedCores;
296 TString _sProjectName;
303 std::list<std::pair<TString,std::pair<Int_t,Int_t>>> _sActiveJobs;
307 std::list<std::pair<TString,std::pair<Int_t,Int_t>>> _sCompletedJobs;
315 Int_t _sNumberOfChunks=1;
327 Bool_t _sSingleJob=
false;
342 std::list<std::pair<TString,std::pair<Int_t,Int_t>>> _sJobList;
346 std::list<TString> _sJobStatus;
355 std::pair<Int_t,Int_t> _sLastSplit;
360 std::map<TString,TString> _sListCompilerDirectives;
364 std::map<TString,TString> _sCodeLibs;
368 std::list<std::pair<TString,std::pair<TString,TString>> > _sExternalLib;
373 std::map<TString,TString> _sCodeDependencies;
374 TString _sCompilerSkeleton =
"CMakeLists.txt.in";
375 ClassDef(URANIE::Launcher::TLauncherByStepRemote, ID_LAUNCHER)
Definition: TCluster.h:66
Interface of the class URANIE::Launcher::TLauncher.
Interface of the class URANIE::Launcher::TCluster.