#include "SALOME_NamingService.hxx"
#include "SALOME_Container_i.hxx"
#include "utilities.h"
+#include "LocalTraceCollector.hxx"
#ifdef CHECKTIME
#include <Utils_Timer.hxx>
#endif
-#include <Python.h>
+#ifdef HAVE_MPI2
+#include <mpi.h>
+#endif
-extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB);
+#include <Python.h>
using namespace std;
+extern "C" void HandleServerSideSignals(CORBA::ORB_ptr theORB);
+
static PyMethodDef MethodPyVoidMethod[] = {{ NULL, NULL }};
int main(int argc, char* argv[])
{
+#ifdef HAVE_MPI2
+ MPI_Init(&argc,&argv);
+#endif
+ // Initialise the ORB.
+ ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+ CORBA::ORB_var &orb = init( argc , argv ) ;
+ LocalTraceCollector *myThreadTrace = LocalTraceCollector::instance(orb);
INFOS_COMPILATION;
BEGIN_OF(argv[0]);
Py_InitModule( "InitPyRunMethod" , MethodPyVoidMethod ) ;
try{
- // Initialise the ORB.
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
- CORBA::ORB_var &orb = init( argc , argv ) ;
-
// Obtain a reference to the root POA.
// obtain the root poa manager
//
}catch(...){
INFOS("Caught unknown exception.");
}
+#ifdef HAVE_MPI2
+ MPI_Finalize();
+#endif
END_OF(argv[0]);
+ delete myThreadTrace;
+ return 0 ;
}