1 // Copyright (C) 2011-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Authors : Guillaume Boulant (EDF) - 31/01/2011
24 #include "SALOME_Exception.idl"
25 #include "SALOME_Component.idl"
28 // This interface is used for mesh job submission from within the
29 // SALOME plugin for PADDER.
35 // Structure to transmit the parameters requiered for the job to run
36 // the executable program on the target resource. See configure
39 struct ConfigParameter {
40 string resname; // The name of the SALOME resource to be used
41 string binpath; // The path of the executable program on this resource
42 string envpath; // The path of the environment file on this resource
46 // This set of specification defines the data structure used to
47 // initialize a job on a specific resource, then supervise the job
48 // and finally retrieve the result data.
51 // This defines the set of temporary folders used by the jobmanager
52 // when executing a job (may depends on the job).
55 string local_inputdir;
56 string local_resultdir;
57 string remote_workdir;
60 // This defines the possible types for a job parameter
61 enum FileType {MED_CONCRETE, MED_STEELBAR};
63 // This defines a single parameter for the job initialization (a med file)
64 struct MeshJobParameter
71 // This defines a set of parameters for the job initialization
72 typedef sequence<MESHJOB::MeshJobParameter> MeshJobParameterList;
74 // This defines the result data of a job
77 string results_dirname;
78 string outputmesh_filename;
82 // This defines the possible states of a job
83 enum MeshJobState {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR};
86 // This interface defines the computation services of the component
89 interface MeshJobManager: Engines::EngineComponent
92 /*! Add a resource configuration, identified by the string
93 configId and characterized by the parameters in
95 boolean configure(in string configId, in MESHJOB::ConfigParameter configParameter)
96 raises (SALOME::SALOME_Exception);
98 /*! Initialize a smesh computation job and return the job identifier */
99 long initialize(in MESHJOB::MeshJobParameterList meshJobParameterList, in string configId)
100 raises (SALOME::SALOME_Exception);
102 /*! Submit the job execution and return true if submission is OK */
103 boolean start(in long jobId)
104 raises (SALOME::SALOME_Exception);
106 /*! Request the launch manager for the state of the specified job */
107 string getState(in long jobId)
108 raises (SALOME::SALOME_Exception);
110 /*! Request the launch manager for downloading the results */
111 MeshJobResults finalize(in long jobid)
112 raises (SALOME::SALOME_Exception);
114 /*! Clean all data associated to this job and remove the job from the launch manager */
115 boolean clean(in long jobId)
116 raises (SALOME::SALOME_Exception);
118 /*! Returns the set of temporary folders used by the job instance */
119 MeshJobPaths getPaths(in long jobId)
120 raises (SALOME::SALOME_Exception);
122 /*! Returns the last error message (for user display) */
123 string getLastErrorMessage();
128 #endif // _MESHJOB_IDL_