Back to index

salome-kernel  6.5.0
LifeCycleCORBA.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 #
00007 # This library is free software; you can redistribute it and/or
00008 # modify it under the terms of the GNU Lesser General Public
00009 # License as published by the Free Software Foundation; either
00010 # version 2.1 of the License.
00011 #
00012 # This library is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 # Lesser General Public License for more details.
00016 #
00017 # You should have received a copy of the GNU Lesser General Public
00018 # License along with this library; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 #
00021 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 #
00023 
00024 #  SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++
00025 #  File   : LifeCycleCORBA.py
00026 #  Author : Paul RASCLE, EDF
00027 #  Module : SALOME
00028 #  $Header: /home/server/cvs/KERNEL/KERNEL_SRC/src/LifeCycleCORBA_SWIG/LifeCycleCORBA.py,v 1.4.2.5.14.5.12.1 2012-04-12 14:05:16 vsr Exp $
00029 #
00030 import Engines
00031 from libSALOME_LifeCycleCORBA import *
00032 
00033 class LifeCycleCORBA (SALOME_LifeCycleCORBA):
00034 
00035     def __init__(self, orb = None):
00036         SALOME_LifeCycleCORBA.__init__(self)
00037 
00038     def FindOrLoadComponent(self, containerName, componentName):
00039         return SALOME_LifeCycleCORBA.FindOrLoad_Component(self,
00040                                                           containerName,
00041                                                           componentName)
00042 
00043 class MachineParameters (Engines.MachineParameters):
00044   def __init__(self, container_name='', hostname='', componentList=[], computerList=[], OS='',
00045                      mem_mb=0, cpu_clock=0, nb_proc_per_node=0, nb_node=0, isMPI=False, workingdir='',
00046                      mode='start', policy='altcycl', parallelLib='', nb_component_nodes=0):
00047     Engines.MachineParameters.__init__(self,container_name, hostname, componentList, computerList, OS,
00048                                             mem_mb, cpu_clock, nb_proc_per_node, nb_node, isMPI, workingdir,
00049                                             mode, policy, parallelLib, nb_component_nodes)
00050 
00051 class ContainerParameters (Engines.ContainerParameters):
00052   def __init__(self, container_name='', mode='start', workingdir='', nb_proc=0, isMPI=False, parallelLib='',resource_params=None):
00053     if resource_params is None:resource_params=ResourceParameters()
00054     Engines.ContainerParameters.__init__(self,container_name, mode, workingdir, nb_proc, isMPI, parallelLib,resource_params)
00055 
00056 class ResourceParameters (Engines.ResourceParameters):
00057   def __init__(self, name="", hostname="", OS="", componentList=[],
00058                      nb_proc=0, mem_mb=0, cpu_clock=0, nb_node=0, nb_proc_per_node=0,
00059                      policy="", resList=[]):
00060     Engines.ResourceParameters.__init__(self, name, hostname, OS, componentList,
00061                                               nb_proc, mem_mb, cpu_clock, nb_node, nb_proc_per_node,
00062                                               policy, resList)
00063 
00064 class JobParameters (Engines.JobParameters):
00065   def __init__(self, job_name="", job_type="", job_file="", env_file="", in_files=[], out_files=[],
00066                      work_directory="", local_directory="", result_directory="", maximum_duration="",
00067                      resource_required=None, queue="", specific_parameters=[]):
00068     Engines.JobParameters.__init__(self, job_name, job_type, job_file, env_file, in_files, out_files,
00069                                          work_directory, local_directory, result_directory, maximum_duration,
00070                                          resource_required, queue, specific_parameters)
00071 
00072 class ResourceDefinition(Engines.ResourceDefinition):
00073   def __init__(self, name="", hostname="", protocol="rsh", username="", applipath="", componentList=[],
00074                mode="interactive", OS="", mem_mb=1, cpu_clock=1, nb_node=1, nb_proc_per_node=1,
00075                batch="", mpiImpl="", iprotocol="rsh"):
00076     Engines.ResourceDefinition.__init__(self, name, hostname, protocol, username, applipath, componentList,
00077                                mode, OS, mem_mb, cpu_clock, nb_node, nb_proc_per_node, batch,
00078                                mpiImpl, iprotocol)