]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CCAR: update from maintenance branch
authorcaremoli <caremoli>
Tue, 15 Apr 2008 17:02:57 +0000 (17:02 +0000)
committercaremoli <caremoli>
Tue, 15 Apr 2008 17:02:57 +0000 (17:02 +0000)
bin/appliskel/runRemote.sh
resources/KERNELCatalog.xml.in
src/Container/SALOME_ContainerManager.cxx
src/Container/Salome_file_i.cxx
src/DSC/DSC_User/Datastream/Calcium/CalciumInterface.hxx
src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/ResourcesManager/SALOME_ResourcesManager.cxx
src/SALOMEDSImpl/Test/Makefile.am

index 522b6ddd75e9f5888d078fa83175f49dc93589d5..ad57495cd8dc8984c598daaa97c33b9740592d5e 100755 (executable)
@@ -37,8 +37,9 @@
 #     $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
 #     $1 : computer name for CORBA name service (where SALOME was launched)
 #     $2 : port for CORBA name service
-#     $3 : working directory
-#     $4 and following : local command to execute, with args
+#     $3 : WORKINGDIR (if $3 == WORKINDIR a working dir is given in $4. If not the working dir is $HOME)
+#     $4 : if $3 == WORKINGDIR, the path to the workingdir
+#     $5 (or $3 if no workingdir given) and following : local command to execute, with args
 #
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
@@ -62,33 +63,35 @@ initref="NameService=corbaname::"$1":$2"
 echo "ORBInitRef $initref" > $OMNIORB_CONFIG
 
 #go to the requested working directory if any
-if test "x$3" != x; then
-  if test "x$3" = "x\$TEMPDIR"; then
+if test "x$3" == "xWORKINGDIR"; then
+  if test "x$4" = "x\$TEMPDIR"; then
     #create a temp working dir and change to it
     WDIR=`mktemp -d` && {
       cd $WDIR
     }
   else
-    if test -d $3; then
+    if test -d $4; then
       #the dir exists, go to it
-      cd $3
+      cd $4
     else
-      if test -a $3; then
+      if test -a $4; then
         # It's a file do nothing
-        echo $3 "is an existing file. Can't use it as a working directory"
+        echo $4 "is an existing file. Can't use it as a working directory"
       else
         #It does not exists, create it
-        mkdir -p $3 && {
-          cd $3
+        mkdir -p $4 && {
+          cd $4
         }
       fi
     fi
   fi
+  shift 4
+else
+  shift 2
 fi
 
 # --- execute the command in the SALOME environment
 
-shift 3
 
 # suppress --rcfile option because of problem on Mandriva2006 - B Secher mai 2007
 #${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*"
index 8986273cea20789e91fbba657eb1aca682ceb7a1..1452381ff7c638fcfa0ddd08e7930374033a842a 100644 (file)
@@ -27,7 +27,9 @@
   <objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
   <objref name="CALCIUM_double" id="IDL:Ports/Calcium_Ports/Calcium_Double_Port:1.0"/>
   <objref name="CALCIUM_string" id="IDL:Ports/Calcium_Ports/Calcium_String_Port:1.0"/>
+  <objref name="CALCIUM_logical" id="IDL:Ports/Calcium_Ports/Calcium_Logical_Port:1.0"/>
   <objref name="CALCIUM_boolean" id="IDL:Ports/Calcium_Ports/Calcium_Logical_Port:1.0"/>
+  <objref name="CALCIUM_complex" id="IDL:Ports/Calcium_Ports/Calcium_Complex_Port:1.0"/>
   <objref name="BASIC_short" id="IDL:Ports/Data_Short_Port:1.0"/>
   <objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
   <objref name="SObject" id="IDL:SALOMEDS/SObject:1.0"/>
index dd6ee5a308a3239049dc91473db4ca45d0ff7aa4..b3be8a826b49f3731519e0a3b390e8b4e233de60 100644 (file)
@@ -279,7 +279,7 @@ StartContainer(const Engines::MachineParameters& params,
     }
 
   //redirect stdout and stderr in a file
-  string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+GetHostname()+"_"+getenv( "USER" )+".log" ;
+  string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+ theMachine +"_"+getenv( "USER" )+".log" ;
   command += " > " + logFilename + " 2>&1 &";
 
   // launch container with a system call
index a098c06f95707253605a0f90d4e6810891ec9f07..d2cbb1d6e9d7fba0dffc9bc383f7238c6a6d999e 100644 (file)
@@ -741,12 +741,10 @@ Salome_file_i::recvFiles() {
 
   if (files_not_ok != "")
   {
-    std::cerr << "tutu" << std::endl;
     SALOME::ExceptionStruct es;
     es.type = SALOME::INTERNAL_ERROR;
     std::string text = "files not ready : " + files_not_ok;
     es.text = CORBA::string_dup(text.c_str());
-    std::cerr << "titi" << std::endl;
     throw SALOME::SALOME_Exception(es);
   }
   else
index 504d3b2562d182318e0071fd9bb0af797c796610..62994aa9741c260d4ec56315fe4c80ceb95fd443 100644 (file)
@@ -105,6 +105,9 @@ ecp_fin_ (void * component, int code) {
     } catch ( const CalciumException & ex) {                           \
       DEBTRACE( ex.what() );                                           \
       return ex.getInfo();                                             \
+    } catch ( ... ) {                          \
+      std::cerr << "Unexpected exception " << std::endl; \
+      return CalciumTypes::CPATAL;                                             \
     }                                                                  \
     if ( IsSameType< _name , cplx >::value ) { *nRead=_nRead/2;                \
       DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \
@@ -144,6 +147,9 @@ ecp_fin_ (void * component, int code) {
     } catch ( const CalciumException & ex) {                           \
       std::cerr << ex.what() << std::endl;                             \
       return ex.getInfo();                                             \
+    } catch ( ... ) {                          \
+      std::cerr << "Unexpected exception " << std::endl; \
+      return CalciumTypes::CPATAL;                                             \
     }                                                                  \
     DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \
       return CalciumTypes::CPOK;                                       \
index bf3e999521fdcbc694f82826d46f49bdd80fc62e..5fd1ff4e45549ae7a2c6791ca7641477f0a5f937 100644 (file)
@@ -232,7 +232,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
                   {
                     if ( _typeMap.find(aType.name) == _typeMap.end() )
                       {
-                        std::cerr << "Registered basic type: " << aType.name << " " << aType.kind << std::endl;
+                        MESSAGE("Registered basic type: " << aType.name << " " << aType.kind );
                         _typeMap[aType.name]=aType;
                         _typeList.push_back(aType);
                       }
@@ -262,7 +262,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
                   {
                     if ( _typeMap.find(aType.name) == _typeMap.end() )
                       {
-                        std::cerr << "Registered sequence type: " << aType.name << " " << aType.content << std::endl;
+                        MESSAGE("Registered sequence type: " << aType.name << " " << aType.content );
                         _typeMap[aType.name]=aType;
                         _typeList.push_back(aType);
                       }
@@ -321,7 +321,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
                   {
                     if ( _typeMap.find(aType.name) == _typeMap.end() )
                       {
-                        std::cerr << "Registered objref type: " << aType.name << " " << aType.id << std::endl;
+                        MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
                         _typeMap[aType.name]=aType;
                         _typeList.push_back(aType);
                       }
@@ -382,7 +382,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
                   {
                     if ( _typeMap.find(aType.name) == _typeMap.end() )
                       {
-                        std::cerr << "Registered struct type: " << aType.name << " " << aType.id << std::endl;
+                        MESSAGE("Registered struct type: " << aType.name << " " << aType.id );
                         _typeMap[aType.name]=aType;
                         _typeList.push_back(aType);
                       }
index 5e3760e222fd0038923cc3a56c84fe2edf51fdb9..c63e0cdea5a28e90a989542e154b2e50e7cbe0f4 100644 (file)
@@ -208,7 +208,6 @@ SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes()
 
   for (int ind = 0 ; ind < _typeList.size() ; ind++)
     {
-      std::cerr << "name: " << _typeList[ind].name << std::endl;
       //no real need to call string_dup, omniorb calls it on operator= (const char *) but it is safer
       type_list[ind].name=CORBA::string_dup(_typeList[ind].name.c_str());
       type_list[ind].kind=SALOME_ModuleCatalog::NONE;
index 55b71c8a18af7fc8a32ca6b30a4339f4c67d90a6..cb8412a08c4d326ff1cfba39cf179be7e5e3a5cf 100644 (file)
@@ -473,7 +473,7 @@ bool isPythonContainer(const char* ContainerName)
  *  see BuildTempFileToLaunchRemoteContainer()
  *
  *  Else rely on distant configuration. Command is under the form (example):
- *  ssh user@machine distantPath/runRemote.sh hostNS portNS workingdir \
+ *  ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
  *                   SALOME_Container containerName &"
 
  *  - where user is ommited if not specified in CatalogResources,
@@ -483,7 +483,8 @@ bool isPythonContainer(const char* ContainerName)
  *    use to launch SALOME and servers in $APPLI: runAppli.sh, runRemote.sh)
  *  - where portNS is the port used by CORBA naming server (set by scripts to
  *    use to launch SALOME and servers in $APPLI: runAppli.sh, runRemote.sh)
- *  - where workingdir is the requested working directory for the container
+ *  - where workingdir is the requested working directory for the container.
+ *    If WORKINGDIR (and workingdir) is not present the working dir will be $HOME
  */ 
 //=============================================================================
 
@@ -515,7 +516,7 @@ SALOME_ResourcesManager::BuildCommandToLaunchRemoteContainer
             nbproc = params.nb_node * params.nb_proc_per_node;
         }
 
-      // "ssh user@machine distantPath/runRemote.sh hostNS portNS workingdir \
+      // "ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
       //  SALOME_Container containerName &"
 
       if (resInfo.Protocol == rsh)
@@ -551,12 +552,16 @@ SALOME_ResourcesManager::BuildCommandToLaunchRemoteContainer
       ASSERT(getenv("NSPORT"));
       command += getenv("NSPORT"); // port of CORBA name server
 
-      command += " '";
       std::string wdir=params.workingdir.in();
-      if(wdir == "$TEMPDIR")
-        wdir="\\$TEMPDIR";
-      command += wdir; // requested working directory
-      command += "'"; 
+      if(wdir != "")
+        {
+          command += " WORKINGDIR ";
+          command += " '";
+          if(wdir == "$TEMPDIR")
+            wdir="\\$TEMPDIR";
+          command += wdir; // requested working directory
+          command += "'"; 
+        }
 
       if(params.isMPI)
        {
@@ -632,7 +637,6 @@ SALOME_ResourcesManager::BuildCommandToLaunchLocalContainer
     {
       command="";
       std::string wdir=params.workingdir.in();
-      std::cerr << wdir << std::endl;
       if(wdir != "")
         {
           // a working directory is requested
index e0c170eda2406fa94541ea62a3fde55a5a89bb79..8ae6e4d857f1b677f39d1ddebb3f0f11b8d86e69 100644 (file)
@@ -61,7 +61,7 @@ COMMON_CPPFLAGS=\
        -I$(srcdir)/$(RPATH)/SALOMEDSImpl \
        -I$(top_builddir)/salome_adm/unix \
        -I$(top_builddir)/idl \
-       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@
 
 # This local variable defines the list of dependant libraries common to all target in this package.
 COMMON_LIBS =\