]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
- Shutdown Parallel proxy
authorribes <ribes>
Mon, 21 Jan 2008 09:18:50 +0000 (09:18 +0000)
committerribes <ribes>
Mon, 21 Jan 2008 09:18:50 +0000 (09:18 +0000)
src/ParallelContainer/Makefile.am
src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx
src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx
src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx [new file with mode: 0644]
src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx [new file with mode: 0644]

index 1734d4f10a91ab870ed57f8eff28bd188b76c8cb..18ff73d7fd16de7963a0b2135702c992e1df331f 100644 (file)
@@ -34,6 +34,7 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am
 # header files  
 salomeinclude_HEADERS = SALOME_ParallelComponent_i.hxx \
                        SALOME_ParallelContainer_i.hxx \
+                       SALOME_ParallelContainerProxy_i.hxx \
                        Parallel_Salome_file_i.hxx
 
 #
@@ -75,6 +76,7 @@ lib_LTLIBRARIES = libSalomeParallelContainer.la
 
 libSalomeParallelContainer_la_SOURCES  = SALOME_ParallelComponent_i.cxx \
                                         SALOME_ParallelContainer_i.cxx \
+                                        SALOME_ParallelContainerProxy_i.cxx \
                                         $(top_srcdir)/src/Container/Salome_file_i.cxx \
                                         Parallel_Salome_file_i.cxx
 
index 697ddc96d9ded1e65ca649bc45e1614d763c4726..e8df8733bf1344b160b9e889d16cf39b5be9066b 100644 (file)
@@ -36,7 +36,8 @@
 #endif
 
 // PaCO++ include
-#include "SALOME_ComponentPaCO_Engines_Container_server.h"
+//#include "SALOME_ComponentPaCO_Engines_Container_server.h"
+#include "SALOME_ParallelContainerProxy_i.hxx"
 #include <paco_omni.h>
 #include <paco_dummy.h>
 
@@ -86,15 +87,18 @@ int main(int argc, char* argv[])
 #ifndef WNT
     // add this container to the kill list
     char aCommand[100];
-    sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerProxy", getpid());
+    sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerProxyDummy", getpid());
     system(aCommand);
 #endif
 
     SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb));
-    Engines::Container_proxy_impl * proxy = 
-      new Engines::Container_proxy_impl(orb,
-                                       new paco_omni_fabrique());
+//    Engines::Container_proxy_impl * proxy = 
+//      new Engines::Container_proxy_impl(orb,
+//                                     new paco_omni_fabrique());
 
+    Container_proxy_impl_final * proxy = 
+      new Container_proxy_impl_final(orb,
+                                    new paco_omni_fabrique());
     // PaCO++ code
     paco_fabrique_manager* pfm = paco_getFabriqueManager();
     pfm->register_com("dummy", new paco_dummy_fabrique());
index bdc99bbb7f0a92117756c73c080c9144d82f0582..f14b09e1805e17755f3cab92cc78b7ae7fa79c03 100644 (file)
@@ -35,7 +35,8 @@
 #include <process.h>
 #endif
 
-#include "SALOME_ComponentPaCO_Engines_Container_server.h"
+//#include "SALOME_ComponentPaCO_Engines_Container_server.h"
+#include "SALOME_ParallelContainerProxy_i.hxx"
 #include <paco_omni.h>
 #include <paco_mpi.h>
 
@@ -95,9 +96,12 @@ int main(int argc, char* argv[])
 #endif
 
     SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb));
-    Engines::Container_proxy_impl * proxy = 
-      new Engines::Container_proxy_impl(orb, 
-                                       new paco_omni_fabrique());
+//    Engines::Container_proxy_impl * proxy = 
+//      new Engines::Container_proxy_impl(orb, 
+//                                     new paco_omni_fabrique());
+    Container_proxy_impl_final * proxy = 
+      new Container_proxy_impl_final(orb, 
+                                    new paco_omni_fabrique());
 
     // PaCO++ code
     paco_fabrique_manager* pfm = paco_getFabriqueManager();
diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
new file mode 100644 (file)
index 0000000..c88588c
--- /dev/null
@@ -0,0 +1,43 @@
+//  SALOME_ParallelContainerProxy : implementation of container and engine for Parallel Kernel
+//
+//  Copyright (C) 2008 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 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//  File   : SALOME_ParallelContainerProxy_i.cxx
+//  Author : André RIBES, EDF
+
+#include "SALOME_ParallelContainerProxy_i.hxx"
+
+Container_proxy_impl_final::Container_proxy_impl_final(CORBA::ORB_ptr orb, 
+                                                      paco_fabrique_thread * fab_thread, 
+                                                      bool is_a_return_proxy) :
+  Engines::Container_proxy_impl(orb, fab_thread, is_a_return_proxy),
+  InterfaceManager_impl(orb, fab_thread, is_a_return_proxy)
+{}
+
+Container_proxy_impl_final:: ~Container_proxy_impl_final() {}
+
+void
+Container_proxy_impl_final::Shutdown()
+{
+  INFOS("Shutdown Parallel Proxy");
+  if(!CORBA::is_nil(_orb))
+    _orb->shutdown(0);
+}
+
diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.hxx
new file mode 100644 (file)
index 0000000..77d5914
--- /dev/null
@@ -0,0 +1,44 @@
+//  SALOME_ParallelContainerProxy : implementation of container and engine for Parallel Kernel
+//
+//  Copyright (C) 2008 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 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//  File   : SALOME_ParallelContainerProxy_i.hxx
+//  Author : André RIBES, EDF
+
+#ifndef _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_
+#define _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_
+
+#include "utilities.h"
+#include "SALOME_ComponentPaCO_Engines_Container_server.h"
+
+class Container_proxy_impl_final :
+  public Engines::Container_proxy_impl
+{
+  public:
+    Container_proxy_impl_final(CORBA::ORB_ptr orb, 
+                              paco_fabrique_thread * fab_thread, 
+                              bool is_a_return_proxy = false);
+
+    virtual ~Container_proxy_impl_final();
+
+    virtual void Shutdown();
+};
+
+#endif