]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Merge from V5_1_main 10/06/2010
authorvsr <vsr@opencascade.com>
Thu, 10 Jun 2010 07:47:15 +0000 (07:47 +0000)
committervsr <vsr@opencascade.com>
Thu, 10 Jun 2010 07:47:15 +0000 (07:47 +0000)
23 files changed:
salome_adm/cmake_files/FindMPI.cmake [new file with mode: 0644]
salome_adm/cmake_files/FindPLATFORM.cmake
salome_adm/cmake_files/Makefile.am
salome_adm/cmake_files/am2cmake.py
src/Container/SALOME_ContainerManager.cxx
src/Launcher/BatchTest.cxx
src/Launcher/Launcher.cxx
src/Launcher/Launcher_Job.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/MPIContainer/MPIContainer_i.cxx
src/MPIContainer/MPIContainer_i.hxx
src/MPIContainer/MPIObject_i.cxx
src/MPIContainer/MPIObject_i.hxx
src/MPIContainer/SALOME_MPIContainer.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx
src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx
src/ResourcesManager/SALOME_ResourcesManager.cxx
src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx
src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx
src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx
src/TestMPIContainer/TestMPIComponentEngine.cxx
src/TestMPIContainer/TestMPIComponentEngine.hxx

diff --git a/salome_adm/cmake_files/FindMPI.cmake b/salome_adm/cmake_files/FindMPI.cmake
new file mode 100644 (file)
index 0000000..548b01b
--- /dev/null
@@ -0,0 +1,121 @@
+#  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)
index 7f39eede871562b877b930592727e57978142d02..01f1e1512618a7af4019eb07155f99a11f74ada6 100644 (file)
@@ -1,8 +1,5 @@
 #  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
index e7852c1756eac4e7b877c812018063db30791778..2c2772d47287238f62325113286b63ded7b43fbf 100644 (file)
@@ -30,6 +30,7 @@ FindDOXYGEN.cmake \
 FindHDF5.cmake \
 FindKERNEL.cmake \
 FindLIBXML2.cmake \
+FindMPI.cmake \
 FindOMNIORB.cmake \
 FindPLATFORM.cmake \
 FindPTHREADS.cmake \
index 63f1d3502362a453962e2cf5af2b5362414df373..8e0774b1542b157557921752a3344e37889acdd3 100644 (file)
@@ -1,9 +1,6 @@
 #  -*- 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
@@ -442,23 +439,48 @@ class CMakeFile(object):
                 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)
@@ -471,6 +493,7 @@ class CMakeFile(object):
                 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)
@@ -478,6 +501,7 @@ class CMakeFile(object):
                     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("""
@@ -592,7 +616,9 @@ class CMakeFile(object):
                 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":
@@ -608,41 +634,57 @@ class CMakeFile(object):
                 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":
@@ -671,8 +713,10 @@ class CMakeFile(object):
         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
@@ -1831,9 +1875,13 @@ if __name__ == "__main__":
                 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
index 8245fe50b3d3ca220792cfc77be36081367b9ac5..497e0c1ed9e4ff278b6085491656488bc3381bd4 100644 (file)
@@ -420,11 +420,9 @@ SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& param
   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
index b9a9a5d628aee3f0a6fabe3fb1715a1533ccc1d7..80f59953e8962b2068f3c64fb111d75484a85b0a 100644 (file)
@@ -298,6 +298,12 @@ BatchTest::test_jobsubmit_simple()
     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");
@@ -482,6 +488,13 @@ BatchTest::test_jobsubmit_mpi()
     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");
index 0af54436c4cb0b36dc667cde50392fc7d604dd6c..8489de9b2fd2c9912589be4d8a3b8acfd1020838 100644 (file)
@@ -22,6 +22,7 @@
 
 #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>
@@ -409,6 +410,10 @@ Launcher_cpp::FactoryBatchManager(ParserResourcesType& params)
       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;
index b2c61375c98d22380b62b6be56e3631f312484f5..53b3c0e3308a36807fa2a1c8edb5d42e385bec11 100644 (file)
@@ -412,11 +412,10 @@ Launcher::Job::common_job_params()
   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
index aec99bcfe1633c6a52b1746150c2e36275888af6..4c5c2436086f425b80a7963fc03459485d6f66ab 100644 (file)
@@ -718,7 +718,7 @@ void SALOME_LifeCycleCORBA::killOmniNames()
   {
     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() );
   }
index a4b8acdc4e7129db0f2dd3c797ddd045d3751dc1..e1ca6cc6b75939982e5d0cea5837b80c166211d3 100644 (file)
 #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);
@@ -54,7 +53,7 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc,
   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) ) ;
@@ -71,8 +70,8 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc,
   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()
 {
 }
 
@@ -326,8 +325,7 @@ Engines_MPIContainer_i::createMPIInstance(std::string genericRegisterName,
   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 *, 
@@ -365,8 +363,7 @@ Engines_MPIContainer_i::createMPIInstance(std::string genericRegisterName,
       // --- 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
 
@@ -468,14 +465,12 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl(
   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 *, 
@@ -494,7 +489,7 @@ Engines::Component_ptr Engines_MPIContainer_i::Lload_impl(
     // 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) ;
index 6b5c6eefbfa0580b6b08b4ae5ef36dde68118c62..88b29e4d175ffd78b92969bcce250aeb872d0f40 100644 (file)
@@ -54,12 +54,11 @@ class Engines_MPIContainer_i : public POA_Engines::MPIContainer,
 
  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();
 
index fa590761297b1323aba7b4676acdf949083687a2..fd04587e1e411aa15d5d6d7d1ff6525c46c3c79d 100644 (file)
@@ -37,13 +37,6 @@ MPIObject_i::MPIObject_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;
index 049021c6675093c0952c9d1636a2e37f3d4fafec..a0076892912cb1fed94d968da1d5c88907c74c2a 100644 (file)
@@ -36,7 +36,6 @@ class MPIObject_i: public virtual POA_Engines::MPIObject
 {
  public:
   MPIObject_i();
-  MPIObject_i(int nbproc, int numproc);
   ~MPIObject_i();
     
   Engines::IORTab* tior();
index c42a995fe9dc8604da54ad2d15aec5459b89ac5a..fa5d54a17b159d5e639d5759b955582f42c95bc0 100644 (file)
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
     }
 
     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();
 
index f7ac8ba7591fbc1158a569bd830644c27c577c5b..ac6341bb6162a6d4c63bfe4fc6734b024e1089c2 100755 (executable)
@@ -534,6 +534,8 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser
       resource.Batch = sge;
     else if  (aBatch == "ssh_batch")
       resource.Batch = ssh_batch;
+    else if  (aBatch == "ccc")
+      resource.Batch = ccc;
     else
       resource.Batch = none;
   }
@@ -726,6 +728,9 @@ void SALOME_ResourcesCatalog_Handler::PrepareDocToXmlFile(xmlDocPtr theDoc)
       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;
index 8bd177c4e0ccf19ee58e228d9e8eafbc46dc5272..f84d26b2ca482186b988d78d088033dc8ac24b05 100644 (file)
@@ -205,6 +205,8 @@ ParserResourcesType::PrintBatchType() const
     return "lsf";
   else if (Batch == sge)
     return "sge";
+  else if (Batch == ccc)
+    return "ccc";
   else 
     return "ssh";
 }
index a867f96aaf2dcb181bac7eab037eb4501428e9d9..d376e5545f3b45f2fd4ac34f8bf2ef1bff72aedb 100755 (executable)
@@ -45,7 +45,7 @@ enum AccessProtocolType {rsh, 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};
 
index b03d51fcb0088cf2821c02842713e42bc3322164..acdfe259d4f07ffa996869b9b33c51ac84014c49 100644 (file)
@@ -252,6 +252,8 @@ SALOME_ResourcesManager::GetResourceDefinition(const char * name)
     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";
 
@@ -281,6 +283,8 @@ SALOME_ResourcesManager::AddResource(const Engines::ResourceDefinition& new_reso
     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 == "")
index 0bc795290d359bc6d899342f2237c465ede5371a..e6bb38616a3cc712e12a291ef5cda7b6eaf34d9b 100644 (file)
 //
 #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  : 
@@ -101,6 +104,8 @@ std::string SALOMEDSImpl_ScalarVariable::getStringValue() const
  */
 //============================================================================
 std::string SALOMEDSImpl_ScalarVariable::Save() const{
+  Kernel_Utils::Localizer loc;
+
   char buffer[255];
   switch(Type())
     {
@@ -132,6 +137,8 @@ std::string SALOMEDSImpl_ScalarVariable::Save() const{
 //============================================================================
 std::string SALOMEDSImpl_ScalarVariable::SaveToScript() const
 {
+  Kernel_Utils::Localizer loc;
+
   char buffer[255];
   switch(Type())
     {
@@ -147,10 +154,7 @@ std::string SALOMEDSImpl_ScalarVariable::SaveToScript() const
       }
     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:
@@ -181,6 +185,19 @@ std::string SALOMEDSImpl_ScalarVariable::SaveType() const{
 //============================================================================
 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);
+  }
 }
index b1020d2e8e2f75dde84ca98dc871b52696ca1544..b42685c3f828f079f66e1526716262db8168f3b6 100644 (file)
@@ -320,6 +320,7 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO,
 
     char aMultifileState[2];
     char ASCIIfileState[2];
+    bool hasModuleData = false;
     try {
       std::string scoid = anSCO.GetID();
       hdf_file->OpenOnDisk(HDF_RDONLY);
@@ -327,6 +328,7 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO,
       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;
@@ -397,6 +399,10 @@ bool SALOMEDSImpl_StudyBuilder::LoadWith(const SALOMEDSImpl_SComponent& anSCO,
       }
 
       if (aLocked) _study->GetProperties()->SetLocked(true);
+
+      if (!hasModuleData)
+       return true;
+
       _errorCode = "No persistent file";   
       return false;
     }
index 6070173cc9512da12b4fe6e4a38909c94d693a51..62f4e169adbeedf15d73e82fb9fc77fd8dadcbab 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "DF_ChildIterator.hxx"
 #include "HDFexplorer.hxx"
+#include "Basics_Utils.hxx"
 
 #include "SALOMEDSImpl_Attributes.hxx"
 #include "SALOMEDSImpl_Tool.hxx"
@@ -120,6 +121,9 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::NewStudy(const std::string& study
 //============================================================================
 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
@@ -460,6 +464,9 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const std::string& aStudyUrl,
                                             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
index 443f04cd09fe0271814429ab9a1c21f0238fb377..0e7602056f2a6687931b13bc2dc4dd47559e2d3d 100644 (file)
 #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()
 {
 }
 
@@ -73,24 +72,26 @@ void TestMPIComponentEngine::SPCoucou(CORBA::Long L)
 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() ;
   }
 }
index ea422bce389f365dded49a32bb97331248fc1b43..df161dffa61f34d9ca3377a4e8c5436cd9ee7dc6 100644 (file)
@@ -43,8 +43,7 @@ class TestMPIComponentEngine:
 {
 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,