Salome HOME
Copyright update 2021
[tools/libbatch.git] / src / Core / BatchManager.hxx
index c22336386485c3bec98aa70fcdec4b3b5373d123..b737e44694643d1dcdd8e1f8a54dba188e51d6f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -79,9 +79,11 @@ namespace Batch {
     bool importDumpStateFile( const Job & job, const std::string directory );
     // copier le fichier work_file à partir du working_directory vers directory
     virtual bool importWorkFile( const Job & job, const std::string& work_file, const std::string& directory );
+    virtual void clearWorkingDir( const Job & job );
 
     // Get the underlying communication protocol
     const CommunicationProtocol & getProtocol() const;
+    virtual void exportInputFiles(const Job & job);
 
   protected:
     std::string _hostname; // serveur ou tourne le BatchManager
@@ -93,7 +95,14 @@ namespace Batch {
     MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script
 
     MpiImpl* FactoryMpiImpl(std::string mpiImpl);
-    void exportInputFiles(const Job & job);
+    
+    // Preprocessing done on the frontal using "PREPROCESS" parameter as a script.
+    // May throw exceptions in case of failure.
+    virtual void preprocess(const Batch::Job & job);
+    
+    // Submit to batch manager, but we suppose input files are already copied
+    // and preprocess finished without error
+    virtual const Batch::JobId runJob(const Batch::Job & job);
 
   private: