--- /dev/null
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ------
+#
+MESSAGE(STATUS "Check for MPI ...")
+
+# ------
+
+SET(MPI_STATUS 1)
+
+IF(WITH_MPI)
+ SET(MPI_ROOT_USER ${WITH_MPI})
+ELSE(WITH_MPI)
+ SET(MPI_ROOT_USER $ENV{MPI_ROOT})
+ENDIF(WITH_MPI)
+
+IF(NOT MPI_ROOT_USER)
+ FIND_PROGRAM(MPICC mpicc)
+ IF(MPICC)
+ MESSAGE(STATUS "mpicc found: ${MPICC}")
+ SET(MPI_ROOT ${MPICC})
+ GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH)
+ GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_ROOT} PATH)
+ IF(MPICC STREQUAL /usr/bin/mpicc)
+ ELSE(MPICC STREQUAL /usr/bin/mpicc)
+ SET(MPI_ROOT_USER ${MPI_ROOT})
+ ENDIF(MPICC STREQUAL /usr/bin/mpicc)
+ ENDIF(MPICC)
+ELSE(NOT MPI_ROOT_USER)
+ SET(MPI_ROOT ${MPI_ROOT_USER})
+ENDIF(NOT MPI_ROOT_USER)
+
+# ------
+
+IF(NOT MPI_ROOT)
+ MESSAGE(STATUS "MPI not found, try to use WITH_MPI option or MPI_ROOT environment variable.")
+ SET(MPI_STATUS 0)
+ENDIF(NOT MPI_ROOT)
+
+# ------
+
+IF(MPI_STATUS)
+ MESSAGE(STATUS "Check MPI in ${MPI_ROOT}")
+
+ SET(MPI_INCLUDE_TO_FIND mpi.h)
+
+ IF(MPI_ROOT_USER)
+ SET(MPI_ROOT ${MPI_ROOT_USER})
+ SET(MPI_INCLUDE_PATHS ${MPI_ROOT} ${MPI_ROOT}/include)
+ FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND} PATHS ${MPI_INCLUDE_PATHS} NO_DEFAULT_PATH)
+ IF(NOT MPI_INCLUDES)
+ MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found in ${MPI_INCLUDE_PATHS}, check your MPI installation.")
+ SET(MPI_STATUS 0)
+ ENDIF(NOT MPI_INCLUDES)
+ ELSE(MPI_ROOT_USER)
+ FIND_PATH(MPI_INCLUDES ${MPI_INCLUDE_TO_FIND})
+ IF(NOT MPI_INCLUDES)
+ MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} not found on system, try to use WITH_MPI option or MPI_ROOT environment variable.")
+ SET(MPI_STATUS 0)
+ ENDIF(NOT MPI_INCLUDES)
+ GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_INCLUDES} PATH)
+ ENDIF(MPI_ROOT_USER)
+
+ MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}")
+
+ SET(MPI_INCLUDES -I${MPI_INCLUDES})
+
+ # ------
+
+ IF(WINDOWS)
+ FIND_LIBRARY(MPI_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${MPI_ROOT}/lib)
+ FIND_LIBRARY(MPI_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${MPI_ROOT}/lib)
+ ELSE(WINDOWS)
+ FOREACH(lib mpi_cxx mpi mpich)
+ FIND_LIBRARY(MPI_LIB ${lib} ${MPI_ROOT}/lib)
+ IF(MPI_LIB)
+ IF(lib STREQUAL mpich)
+ SET(MPI_INCLUDES ${MPI_INCLUDES} -DMPICH_IGNORE_CXX_SEEK)
+ ENDIF(lib STREQUAL mpich)
+ ENDIF(MPI_LIB)
+ ENDFOREACH(lib mpi_cxx mpi mpich)
+ IF(NOT MPI_LIB)
+ MESSAGE(STATUS "MPI lib not found, check your MPI installation.")
+ SET(MPI_STATUS 0)
+ ENDIF(NOT MPI_LIB)
+ MESSAGE(STATUS "MPI lib : ${MPI_LIB}")
+ ENDIF(WINDOWS)
+
+ SET(MPI_LIBS ${MPI_LIB})
+
+ MESSAGE(STATUS "MPI libs: ${MPI_LIBS}")
+ENDIF(MPI_STATUS)
+
+# ------
+
+IF(MPI_STATUS)
+ SET(MPI_IS_OK ON)
+ELSE(MPI_STATUS)
+ IF(MPI_IS_MANDATORY)
+ MESSAGE(FATAL_ERROR "MPI not found but mandatory")
+ ELSE(MPI_IS_MANDATORY)
+ MESSAGE(STATUS "MPI not found. Build procedure depending of mpi will be disable")
+ ENDIF(MPI_IS_MANDATORY)
+ENDIF(MPI_STATUS)
# Copyright (C) 2007-2010 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
-#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
FindHDF5.cmake \
FindKERNEL.cmake \
FindLIBXML2.cmake \
+FindMPI.cmake \
FindOMNIORB.cmake \
FindPLATFORM.cmake \
FindPTHREADS.cmake \
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2010 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
-#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
+ INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake)
""")
pass
else:
- newlines.append("""
- SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
- """)
+ if self.module == "med":
+ newlines.append("""
+ SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
+ IF(KERNEL_ROOT_DIR)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
+ ELSE(KERNEL_ROOT_DIR)
+ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindPLATFORM.cmake)
+ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMPI.cmake)
+ ENDIF(KERNEL_ROOT_DIR)
+ """)
+ else:
+ newlines.append("""
+ SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake)
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
+ """)
+ pass
if self.module == "gui":
newlines.append("""
INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake)
else:
newlines.append("""
SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR})
+ IF(GUI_ROOT_DIR)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake)
INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake)
+ ENDIF(GUI_ROOT_DIR)
""")
if self.module == "med":
newlines.append("""
pass
elif self.module == "geom":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(GEOM_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "medfile":
pass
elif self.module == "med":
newlines.append("""
+ IF(KERNEL_ROOT_DIR)
SET(MED_ENABLE_KERNEL ON)
IF(NOT WINDOWS)
SET(MED_ENABLE_SPLITTER ON)
ENDIF(NOT WINDOWS)
+ ENDIF(KERNEL_ROOT_DIR)
+ IF(GUI_ROOT_DIR)
SET(MED_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "smesh":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(SMESH_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "netgenplugin":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(NETGENPLUGIN_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "blsurfplugin":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(BLSURFPLUGIN_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "ghs3dplugin":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(GHS3DPLUGIN_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "hexoticplugin":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(HEXOTICPLUGIN_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "ghs3dprlplugin":
newlines.append("""
+ IF(GUI_ROOT_DIR)
SET(GHS3DPRLPLUGIN_ENABLE_GUI ON)
+ ENDIF(GUI_ROOT_DIR)
""")
pass
elif self.module == "yacs":
else:
if self.module not in ["yacs"]:
newlines.append(r'''
+ IF(KERNEL_ROOT_DIR)
SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
+ ENDIF(KERNEL_ROOT_DIR)
''')
pass
pass
pass
pass
# --
+ from sys import stdout
for f in files:
if f in ["Makefile.am", "Makefile.am.cmake"]:
+ stdout.write("Scanning %s %s ..."%(root, f))
+ stdout.flush()
convertAmFile(the_root, root, dirs, files, f, module)
+ stdout.write(" done.\n")
pass
pass
pass
logFilename += "/";
#endif
logFilename += _NS->ContainerName(params)+"_"+ resource_selected +"_"+getenv( "USER" ) ;
-#ifdef WNT
std::ostringstream tmp;
tmp << "_" << getpid();
logFilename += tmp.str();
-#endif
logFilename += ".log" ;
command += " > " + logFilename + " 2>&1";
#ifdef WNT
result = "OK";
return result;
}
+ if (batch_type == "ccc")
+ {
+ INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK");
+ result = "OK";
+ return result;
+ }
if (batch_type == "sge")
{
INFOS("test_jobsubmit_simple not yet implemented for sge... return OK");
return result;
}
+ if (batch_type == "ccc")
+ {
+ INFOS("test_jobsubmit_simple not yet implemented for ccc... return OK");
+ result = "OK";
+ return result;
+ }
+
if (batch_type == "sge")
{
INFOS("test_jobsubmit_simple not yet implemented for sge... return OK");
#ifdef WITH_LIBBATCH
#include <Batch/Batch_Date.hxx>
+#include <Batch/Batch_FactBatchManager_eCCC.hxx>
#include <Batch/Batch_FactBatchManager_eLSF.hxx>
#include <Batch/Batch_FactBatchManager_ePBS.hxx>
#include <Batch/Batch_BatchManager_eClient.hxx>
message += "eSGE";
fact = new Batch::FactBatchManager_eSGE;
break;
+ case ccc:
+ message += "eCCC";
+ fact = new Batch::FactBatchManager_eCCC;
+ break;
case ssh_batch:
message += "eSSH";
fact = new Batch::FactBatchManager_eSSH;
params[Batch::USER] = _resource_definition.UserName;
params[Batch::NBPROC] = _resource_required_params.nb_proc;
- // Memory
+ // Memory in megabytes
if (_resource_required_params.mem_mb > 0)
{
- // Memory is in kilobytes
- params[Batch::MAXRAMSIZE] = _resource_required_params.mem_mb * 1024;
+ params[Batch::MAXRAMSIZE] = _resource_required_params.mem_mb;
}
// We define a default directory based on user time
{
std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; ");
cmd += std::string("killNotifdAndClean(") + portNumber + "); ";
- cmd = std::string("python -c \"") + cmd +"\" >& /dev/null";
+ cmd = std::string("python -c \"") + cmd +"\" > /dev/null 2> /dev/null";
MESSAGE(cmd);
system( cmd.c_str() );
}
#include "Container_init_python.hxx"
// L'appel au registry SALOME ne se fait que pour le process 0
-Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc,
- CORBA::ORB_ptr orb,
+Engines_MPIContainer_i::Engines_MPIContainer_i(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
char * containerName,
int argc, char *argv[])
- : Engines_Container_i(orb,poa,containerName,argc,argv,false), MPIObject_i(nbproc,numproc)
+ : Engines_Container_i(orb,poa,containerName,argc,argv,false)
{
_id = _poa->activate_object(this);
Engines::Container_var pCont = Engines::Container::_narrow(obj);
_remove_ref();
- if(numproc==0){
+ if(_numproc==0){
_NS = new SALOME_NamingService();
_NS->init_orb( CORBA::ORB::_duplicate(_orb) ) ;
BCastIOR(_orb,pobj,true);
}
-Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc)
- : Engines_Container_i(), MPIObject_i(nbproc,numproc)
+Engines_MPIContainer_i::Engines_MPIContainer_i()
+ : Engines_Container_i()
{
}
std::string factory_name = aGenRegisterName + std::string("Engine_factory");
typedef PortableServer::ObjectId * (*MPIFACTORY_FUNCTION)
- (int,int,
- CORBA::ORB_ptr,
+ (CORBA::ORB_ptr,
PortableServer::POA_ptr,
PortableServer::ObjectId *,
const char *,
// --- Instanciate required CORBA object
PortableServer::ObjectId *id ; //not owner, do not delete (nore use var)
- id = (MPIComponent_factory) ( _nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(),
- aGenRegisterName.c_str() ) ;
+ id = (MPIComponent_factory) ( _orb, _poa, _id, instanceName.c_str(), aGenRegisterName.c_str() ) ;
// --- get reference & servant from id
MESSAGE("[" << _numproc << "] factory_name=" << factory_name) ;
dlerror();
- PortableServer::ObjectId * (*MPIComponent_factory) (int,int,
- CORBA::ORB_ptr,
+ PortableServer::ObjectId * (*MPIComponent_factory) (CORBA::ORB_ptr,
PortableServer::POA_ptr,
PortableServer::ObjectId *,
const char *,
const char *) =
- (PortableServer::ObjectId * (*) (int,int,
- CORBA::ORB_ptr,
+ (PortableServer::ObjectId * (*) (CORBA::ORB_ptr,
PortableServer::POA_ptr,
PortableServer::ObjectId *,
const char *,
// Instanciation du composant parallele
MESSAGE("[" << _numproc << "] Try to load a parallel component");
PortableServer::ObjectId * id = (MPIComponent_factory)
- (_nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(), _nameToRegister.c_str());
+ (_orb, _poa, _id, instanceName.c_str(), _nameToRegister.c_str());
// get reference from id
CORBA::Object_var o = _poa->id_to_reference(*id);
pobj = Engines::MPIObject::_narrow(o) ;
public:
// Constructor
- Engines_MPIContainer_i( int nbproc, int numproc,
- CORBA::ORB_ptr orb,
+ Engines_MPIContainer_i( CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
char * containerName,
int argc, char *argv[]);
- Engines_MPIContainer_i(int nbproc, int numproc);
+ Engines_MPIContainer_i();
// Destructor
~Engines_MPIContainer_i();
_tior=NULL;
}
-MPIObject_i::MPIObject_i(int nbproc, int numproc)
-{
- _nbproc = nbproc;
- _numproc = numproc;
- _tior=NULL;
-}
-
MPIObject_i::~MPIObject_i()
{
if(_tior) delete _tior;
{
public:
MPIObject_i();
- MPIObject_i(int nbproc, int numproc);
~MPIObject_i();
Engines::IORTab* tior();
}
MESSAGE("[" << numproc << "] MPIContainer: load MPIContainer servant");
- new Engines_MPIContainer_i(nbproc,numproc,orb,root_poa, containerName,argc,argv);
+ new Engines_MPIContainer_i(orb,root_poa, containerName,argc,argv);
pman->activate();
resource.Batch = sge;
else if (aBatch == "ssh_batch")
resource.Batch = ssh_batch;
+ else if (aBatch == "ccc")
+ resource.Batch = ccc;
else
resource.Batch = none;
}
case sge:
xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "sge");
break;
+ case ccc:
+ xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ccc");
+ break;
case ssh_batch:
xmlNewProp(node, BAD_CAST test_batch, BAD_CAST "ssh_batch");
break;
return "lsf";
else if (Batch == sge)
return "sge";
+ else if (Batch == ccc)
+ return "ccc";
else
return "ssh";
}
enum AccessModeType {interactive, batch};
-enum BatchType {none, pbs, lsf, sge, ssh_batch};
+enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc};
enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurm, prun};
p_ptr->batch = "lsf";
else if( resource.Batch == sge )
p_ptr->batch = "sge";
+ else if( resource.Batch == ccc )
+ p_ptr->batch = "ccc";
else if( resource.Batch == ssh_batch )
p_ptr->batch = "ssh";
resource.Batch = lsf;
else if (aBatch == "sge")
resource.Batch = sge;
+ else if (aBatch == "ccc")
+ resource.Batch = ccc;
else if (aBatch == "ssh_batch")
resource.Batch = ssh_batch;
else if (aBatch == "")
//
#include "SALOMEDSImpl_ScalarVariable.hxx"
#include "SALOMEDSImpl_GenericVariable.hxx"
+#include "Basics_Utils.hxx"
#include <iostream>
#include <cstdlib>
#include <cstdio>
+#define OLDSTUDY_COMPATIBILITY
+
//============================================================================
/*! Function : SALOMEDSImpl_ScalarVariable
* Purpose :
*/
//============================================================================
std::string SALOMEDSImpl_ScalarVariable::Save() const{
+ Kernel_Utils::Localizer loc;
+
char buffer[255];
switch(Type())
{
//============================================================================
std::string SALOMEDSImpl_ScalarVariable::SaveToScript() const
{
+ Kernel_Utils::Localizer loc;
+
char buffer[255];
switch(Type())
{
}
case SALOMEDSImpl_GenericVariable::BOOLEAN_VAR:
{
- if((bool)myValue)
- sprintf(buffer, "%s", "True");
- else
- sprintf(buffer, "%s", "False");
+ sprintf(buffer, "%s", ((bool)myValue) ? "True" : "False");
break;
}
case SALOMEDSImpl_GenericVariable::STRING_VAR:
//============================================================================
void SALOMEDSImpl_ScalarVariable::Load(const std::string& theStrValue)
{
- double aValue = atof(theStrValue.c_str());
- setValue(aValue);
+ Kernel_Utils::Localizer loc;
+
+ if ( Type() == SALOMEDSImpl_GenericVariable::STRING_VAR ) {
+ setStringValue( theStrValue );
+ }
+ else {
+ std::string strCopy = theStrValue;
+#ifdef OLDSTUDY_COMPATIBILITY
+ int dotpos = strCopy.find(',');
+ if (dotpos != std::string::npos)
+ strCopy.replace(dotpos, 1, ".");
+#endif // OLDSTUDY_COMPATIBILITY
+ double aValue = atof(strCopy.c_str());
+ setValue(aValue);
+ }
}
char aMultifileState[2];
char ASCIIfileState[2];
+ bool hasModuleData = false;
try {
std::string scoid = anSCO.GetID();
hdf_file->OpenOnDisk(HDF_RDONLY);
hdf_group->OpenOnDisk();
HDFgroup *hdf_sco_group = new HDFgroup((char*)scoid.c_str(), hdf_group);
hdf_sco_group->OpenOnDisk();
+ hasModuleData = true;
unsigned char* aStreamFile = NULL;
int aStreamSize = 0;
}
if (aLocked) _study->GetProperties()->SetLocked(true);
+
+ if (!hasModuleData)
+ return true;
+
_errorCode = "No persistent file";
return false;
}
#include "DF_ChildIterator.hxx"
#include "HDFexplorer.hxx"
+#include "Basics_Utils.hxx"
#include "SALOMEDSImpl_Attributes.hxx"
#include "SALOMEDSImpl_Tool.hxx"
//============================================================================
SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const std::string& aUrl)
{
+ // Set "C" locale temporarily to avoid possible localization problems
+ Kernel_Utils::Localizer loc;
+
_errorCode = "";
// open the HDFFile
bool theMultiFile,
bool theASCII)
{
+ // Set "C" locale temporarily to avoid possible localization problems
+ Kernel_Utils::Localizer loc;
+
// HDF File will be composed of differents part :
// * For each ComponentDataType, all data created by the component
// Informations in data group hdf_group_datacomponent
#include "utilities.h"
#include "TestMPIComponentEngine.hxx"
-TestMPIComponentEngine::TestMPIComponentEngine(int nbproc, int numproc,
- CORBA::ORB_ptr orb,
+TestMPIComponentEngine::TestMPIComponentEngine(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
const char *instanceName,
const char *interfaceName,
bool regist) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true,regist), MPIObject_i(nbproc,numproc)
+ Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true,regist)
{
MESSAGE("activate object")
_thisObj = this ;
_id = _poa->reference_to_id(_thisObj->_this());
}
-TestMPIComponentEngine::TestMPIComponentEngine(): Engines_Component_i(), MPIObject_i()
+TestMPIComponentEngine::TestMPIComponentEngine()
{
}
extern "C"
{
PortableServer::ObjectId * TestMPIComponentEngine_factory(
- int nbproc, int numproc,
CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
const char *instanceName,
const char *interfaceName)
{
+ int numproc;
bool regist;
TestMPIComponentEngine * myTestMPIComponent;
+
MESSAGE("[" << numproc << "] PortableServer::ObjectId * TestMPIComponentEngine_factory()");
SCRUTE(interfaceName);
+ MPI_Comm_rank( MPI_COMM_WORLD, &numproc );
if(numproc==0)
regist = true;
else
regist = false;
myTestMPIComponent
- = new TestMPIComponentEngine(nbproc,numproc,orb, poa, contId, instanceName, interfaceName,regist);
+ = new TestMPIComponentEngine(orb, poa, contId, instanceName, interfaceName,regist);
return myTestMPIComponent->getId() ;
}
}
{
public:
TestMPIComponentEngine();
- TestMPIComponentEngine(int nbproc, int numproc,
- CORBA::ORB_ptr orb,
+ TestMPIComponentEngine(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
const char *instanceName,