# install script in $(bindir) :
install-bin: $(BIN_SCRIPT)
$(INSTALL) -d $(bindir)
- $(INSTALL_PROGRAM) $^ $(bindir)
+ for f in X $(BIN_SCRIPT); do \
+ if test $$f != X; then \
+ (cp -p ./bin/$$f $(bindir) || exit 1); \
+ fi; \
+ done
uninstall: uninstall-idl
import SALOME
session=clt.waitNS("/Kernel/Session",SALOME.Session)
-
+ if os.getenv("HOSTNAME") == None:
+ if os.getenv("HOST") == None:
+ os.environ["HOSTNAME"]="localhost"
+ else:
+ os.environ["HOSTNAME"]=os.getenv("HOST")
+
theComputer = os.getenv("HOSTNAME")
computerSplitName = theComputer.split('.')
theComputer = computerSplitName[0]
#
# Created from configure.in.base
#
-
+AS_SHELL_SANITIZES
AC_INIT(src)
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
AC_CANONICAL_HOST
echo
echo
+dnl Modification B. Secher portage sur osf
+AC_CHECK_PROG(SHELL,sh,,)
+AC_SUBST(SHELL)
+
if test -z "$AR"; then
AC_CHECK_PROGS(AR,ar xar,:,$PATH)
fi
dnl full-path to the binary instead.
case "$INSTALL" in
*install-sh*)
- INSTALL='\${top_srcdir}'/salome_adm/unix/config_files/install-sh
+ INSTALL="${ROOT_SRCDIR}/salome_adm/unix/config_files/install-sh -c"
;;
esac
dnl inutil car libtool
dnl AC_PROG_CC
AC_PROG_CXX
+AC_CXX_WARNINGS
+AC_CXX_TEMPLATE_OPTIONS
AC_DEPEND_FLAG
-# AC_CC_WARNINGS([ansi])
+#AC_CC_WARNINGS([ansi])
cc_ok=yes
dnl Library libdl :
AC_CHECK_LIB(dl,dlopen)
+dnl Library librt : for alpha/osf
+AC_CHECK_LIB(rt,nanosleep)
+
dnl add library libm :
AC_CHECK_LIB(m,ceil)
+dnl
+dnl Check if we use std iostream by default or if we must add
+dnl a compiler directive for that
+dnl
+
+AC_CXX_USE_STD_IOSTREAM
+
dnl
dnl Well we use sstream which is not in gcc pre-2.95.3
dnl We must test if it exists. If not, add it in include !
AC_CXX_HAVE_SSTREAM
+dnl
+dnl ---------------------------------------------
+dnl testing linker
+dnl ---------------------------------------------
+dnl
+
+AC_LINKER_OPTIONS
+
dnl
dnl ---------------------------------------------
dnl testing MPICH
dnl ---------------------------------------------
dnl
+CHECK_MPI
CHECK_MPICH
echo
echo
echo Configure
-variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok"
+variables="cc_ok mpi_ok mpich_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok"
+
+AC_SUBST(pyqt_ok)
for var in $variables
do
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
dnl directory
-cd bin
+cd $ROOT_BUILDDIR/bin
for i in $ROOT_SRCDIR/bin/*
do
local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
SALOME_Component.idl \
SALOME_TestComponent.idl \
SALOME_Registry.idl \
- TypeData.idl \
- MPIObject.idl \
- MPIContainer.idl \
+ SALOME_MPIObject.idl \
+ SALOME_MPIContainer.idl \
+ SALOME_TestMPIComponent.idl \
Logger.idl \
SALOME_GenericObj.idl
--- /dev/null
+// Copyright (C) 2003 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_MPIContainer.idl
+
+#ifndef _SALOME_MPICONTAINER_IDL_
+#define _SALOME_MPICONTAINER_IDL_
+
+#include "SALOME_Component.idl"
+#include "SALOME_MPIObject.idl"
+
+module Engines
+{
+ interface MPIContainer:Container,MPIObject
+ {
+ // start MPI container executable
+ MPIContainer start_MPIimpl( in string ContainerName, in short nbproc );
+
+ // asynchronous version to load and remove parallel component in parallel
+ oneway void SPload_impl(in string nameToRegister, in string componentName);
+ oneway void SPremove_impl(in Component component_i);
+ oneway void SPfinalize_removal();
+ };
+} ;
+
+#endif
+
--- /dev/null
+// Copyright (C) 2003 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 : MPIObject.idl
+
+#ifndef _SALOME_MPIOBJECT_IDL_
+#define _SALOME_MPIOBJECT_IDL_
+
+module Engines
+{
+ typedef sequence<Object> IORTab;
+ interface MPIObject
+ {
+ attribute IORTab tior;
+ } ;
+} ;
+
+#endif
--- /dev/null
+//=============================================================================
+// File : SALOME_MPITestComponent.idl
+// Created : mer jui 04 12:08:17 CEST 2003
+// Author : Bernard SECHER, CEA
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#include "SALOME_Component.idl"
+#include "SALOME_MPIObject.idl"
+
+module Engines
+{
+
+ interface TestMPIComponent : Component, MPIObject
+ {
+ // version synchrone (process 0)
+ void Coucou(in long L);
+ // version asynchrone (autres process)
+ oneway void SPCoucou(in long L);
+ };
+
+};
echo "conftest.o: conftest.c" > conftest.verif
echo "int main() { return 0; }" > conftest.c
+dnl Evolution portage sur CCRT/osf system
+ case $host_os in
+ osf*)
+dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif
+dnl on utilise donc gnu pour generer les dependances.
+ DEPCC=gcc
+ DEPCXX=g++
+ DEPCXXFLAGS="-Wno-deprecated -funsigned-char"
+ DIFFFLAGS="-w"
+ ;;
+ *)
+ DEPCC=${CC-cc}
+ DEPCXX=${CXX-c++}
+ DEPCXXFLAGS="\${CXXFLAGS}"
+ DIFFFLAGS="-b -B"
+ ;;
+ esac
C_DEPEND_FLAG=
for ac_C_DEPEND_FLAG in -xM -MM -M ; do
rm -f conftest.d conftest.err
- ${CC-cc} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
+ ${DEPCC} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff -b -B conftest.d conftest.verif > conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
if test ! -s conftest ; then
C_DEPEND_FLAG=${ac_C_DEPEND_FLAG}
break
dnl use gcc option -MG : asume unknown file will be construct later
rm -f conftest.d conftest.err
- ${CC-cc} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
+ ${DEPCC} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff -b -B conftest.d conftest.verif > conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
if test ! -s conftest ; then
C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG"
fi
exit
fi
- echo -n " C : " ${C_DEPEND_FLAG}
+ printf " C : ${DEPCC} ${C_DEPEND_FLAG}"
AC_LANG_CPLUSPLUS
echo "conftest.o: conftest.cxx" > conftest.verif
for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do
rm -f conftest.d conftest.err
- ${CXX-c++} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
+ ${DEPCXX} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff -b -B conftest.d conftest.verif > conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
if test ! -s conftest ; then
CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG}
break
dnl use g++ option -MG : asume unknown file will be construct later
rm -f conftest.d conftest.err
- ${CXX-c++} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
+ ${DEPCXX} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff -b -B conftest.d conftest.verif > conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
if test ! -s conftest ; then
CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG"
fi
exit
fi
- echo -n " C++ : " ${CXX_DEPEND_FLAG}
+ printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}"
AC_LANG_RESTORE
+ AC_SUBST(DEPCC)
+ AC_SUBST(DEPCXX)
+ AC_SUBST(DEPCXXFLAGS)
AC_SUBST(C_DEPEND_FLAG)
AC_SUBST(CXX_DEPEND_FLAG)
])
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok)
+dnl
+dnl Check options for C++ compiler
+dnl
+dnl @author Bernard Secher - 15/01/2004
+dnl
+AC_DEFUN([AC_CXX_OPTION], [
+ AC_MSG_CHECKING(CXXFLAGS for $CXX in $1)
+ cat > conftest.cxx <<EOF
+int main(int argc, char **argv) { return 0; }
+EOF
+ $CXX $1 conftest.cxx > conftest.log 2>&1
+ var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"`
+ if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+ AC_MSG_RESULT(yes)
+ $2="${$2} $1"
+ eval $3
+ else
+ AC_MSG_RESULT(no)
+ eval $4
+ fi
+])
+
+
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl @synopsis AC_CXX_TEMPLATE_OPTIONS
+dnl
+dnl Check template options for C++ compiler
+dnl
+dnl @author Bernard Secher (CEA) - 04/12/2003
+dnl
+AC_DEFUN([AC_CXX_TEMPLATE_OPTIONS],[
+dnl
+ for opt in -ftemplate-depth-42 "-pending_instantiations 42" ; do
+ AC_CXX_OPTION($opt,CXXTMPDPTHFLAGS,flag=yes,flag=no)
+ if test "$flag" = "yes"; then
+ break
+ fi
+ AC_SUBST(CXXTMPDPTHFLAGS)
+ done
+dnl
+ AC_CXX_OPTION(-tweak,CXXFLAGS)
+])
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl @synopsis AC_CXX_USE_STD_IOSTREAM
+dnl
+dnl If the C++ library use std iostream
+dnl
+dnl @author Bernard Secher (CEA) - 05/12/2003
+dnl
+AC_DEFUN([AC_CXX_USE_STD_IOSTREAM],
+[
+
+AC_MSG_CHECKING(whether the compiler use std iostream)
+
+cat > conftest.cxx <<EOF
+#include <iostream>
+int main(int argc, char **argv) {std::cout << "Hello" << std::endl; return 0;}
+EOF
+
+fUSE_STD_IOSTREAM=no
+for ac_CXX_USE_STD_IOSTREAM in "" -D__USE_STD_IOSTREAM ; do
+ if $CXX ${ac_CXX_USE_STD_IOSTREAM} conftest.cxx > /dev/null 2>&1; then
+ CXXFLAGS="$CXXFLAGS ${ac_CXX_USE_STD_IOSTREAM}"
+ if test x${ac_CXX_USE_STD_IOSTREAM} = x; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(${ac_CXX_USE_STD_IOSTREAM})
+ fi
+ fUSE_STD_IOSTREAM=yes
+ break
+ fi
+done
+if test $fUSE_STD_IOSTREAM = no; then
+ AC_MSG_RESULT(no)
+fi
+
+])
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl @synopsis AC_CXX_WARNINGS
+dnl
+dnl Check warning flags for C++ compiler to control warning messages
+dnl
+dnl @author Bernard Secher (CEA) - 04/12/2003
+dnl
+AC_DEFUN([AC_CXX_WARNINGS],[
+ AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS)
+])
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+dnl @synopsis AC_LINKER_OPTIONS
+dnl
+dnl Check warning flags for C++ compiler to control warning messages
+dnl
+dnl @author Bernard Secher (CEA) - 04/12/2003
+dnl
+AC_DEFUN([AC_LINKER_OPTIONS],[
+ for opt in "-Xlinker -export-dynamic" -transitive_link; do
+ AC_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no)
+ if test "$flag" = "yes"; then
+ break
+ fi
+ done
+ AC_SUBST(LDEXPDYNFLAGS)
+dnl
+ case $host_os in
+ osf*)
+ STDLIB="-lcxxstd"
+ ;;
+ *)
+ STDLIB="-lstdc++"
+ ;;
+ esac
+ AC_SUBST(STDLIB)
+])
AC_SUBST(CAS_OCAF)
AC_SUBST(CAS_DATAEXCHANGE)
AC_SUBST(CAS_LDFLAGS)
-
AC_SUBST(CAS_LDPATH)
CAS_CPPFLAGS=""
irix6.*)
casdir=Linux
;;
- osf4.*)
+ osf*)
casdir=Linux
;;
solaris2.*)
;;
esac
+AC_MSG_CHECKING(for OpenCascade directories)
+if test -d ${CASROOT}/${casdir}/lib; then
+ CAS_LDPATH="-L$CASROOT/$casdir/lib "
+ AC_MSG_RESULT(yes)
+else
+ if test -d ${CASROOT}/lib; then
+ CAS_LDPATH="-L$CASROOT/lib "
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+
+
dnl were is OCC ?
if test -z $CASROOT; then
AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual)
if test "x$occ_ok" = "xyes"; then
+dnl test c++ compiler flag for unsigned character
+ for opt in -funsigned-char -unsigned ; do
+ AC_CXX_OPTION($opt,CXXFLAGS,flag=yes,flag=no)
+ if test "$flag" = "yes"; then
+ break
+ fi
+ done
+
dnl cascade headers
CPPFLAGS_old="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc -Wno-deprecated"
- CXXFLAGS_old="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -funsigned-char"
+ CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc"
+ CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no)
- CPPFLAGS="$CPPFLAGS_old"
- CXXFLAGS="$CXXFLAGS_old"
fi
if test "x$occ_ok" = xyes ; then
- CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc"
- CAS_CXXFLAGS="-funsigned-char"
-
AC_MSG_CHECKING(for OpenCascade libraries)
- CPPFLAGS_old="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS -Wno-deprecated"
- CXXFLAGS_old="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $CAS_CXXFLAGS"
LIBS_old="$LIBS"
- LIBS="$LIBS -L$CASROOT/$casdir/lib -lTKernel"
+ LIBS="$LIBS $CAS_LDPATH -lTKernel"
+
AC_CACHE_VAL(salome_cv_lib_occ,[
AC_TRY_LINK(
#include <Standard_Type.hxx>
])
occ_ok="$salome_cv_lib_occ"
- CPPFLAGS="$CPPFLAGS_old"
- CXXFLAGS="$CXXFLAGS_old"
- LIBS="$LIBS_old"
fi
+CPPFLAGS="$CPPFLAGS_old"
+LIBS="$LIBS_old"
if test "x$occ_ok" = xno ; then
AC_MSG_RESULT(no)
AC_MSG_WARN(Opencascade libraries not found)
else
AC_MSG_RESULT(yes)
- CAS_LDPATH="-L$CASROOT/$casdir/lib "
CAS_KERNEL="$CAS_LDPATH -lTKernel -lTKMath"
- CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin -lTKPAppStd -lTKCDF"
-dnl CAS_VIEWER="-L$CASROOT/$casdir/lib -lTKOpenGl -lTKV3d -lTKV2d -lTKService"
+
+ # E.A. compatibility version 4 and 5.x
+ CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin"
+ if test $OCC_VERSION_MAJOR -lt 5 ; then
+ CAS_OCAF="$CAS_OCAF -lTKPAppStd"
+ fi
+ CAS_OCAF="$CAS_OCAF -lTKCDF"
+
CAS_VIEWER="$CAS_LDPATH -lTKOpenGl -lTKV3d -lTKService"
-# CAS_MODELER="-L$CASROOT/$casdir/lib -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKFeat -lTKOffset"
CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKOffset"
-dnl CAS_DATAEXCHANGE="-L$CASROOT/$casdir/lib -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd -lTKSTL -lTKVRML "
- CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd"
+
+ # E.A. compatibility version 4 and 5.x
+ CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing"
+ if test $OCC_VERSION_MAJOR -lt 5 ; then
+ CAS_DATAEXCHANGE="$CAS_DATAEXCHANGE -lTKShHealingStd"
+ fi
+
+
CAS_LDFLAGS="$CAS_KERNEL $CAS_OCAF $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE"
-
-
+
fi
AC_LANG_RESTORE
if test "x$DOXYGEN" = "x"
then
doxygen_ok=no
- AC_MSG_RESULT(no)
AC_MSG_WARN(doxygen not found)
-else
- dnl AC_SUBST(DOXYGEN)
- AC_MSG_RESULT(yes)
fi
AC_CHECKING(for graphviz)
if test "x$DOT" = "x" ; then
graphviz_ok=no
- AC_MSG_RESULT(no)
AC_MSG_WARN(graphviz not found)
-else
- AC_MSG_RESULT(yes)
fi
])dnl
--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+
+AC_DEFUN([CHECK_MPI],[
+
+AC_REQUIRE([AC_PROG_CC])dnl
+
+AC_ARG_WITH(mpi,
+ --with-mpi=DIR root directory path of MPICH installation,
+ WITHMPI="yes",WITHMPI="no")
+
+MPI_INCLUDES=""
+MPI_LIBS=""
+if test "$WITHMPI" = yes; then
+
+ echo
+ echo ---------------------------------------------
+ echo testing mpi
+ echo ---------------------------------------------
+ echo
+
+ if test "x$withval" != "xyes"; then
+ MPI_HOME=$withval
+ MPI_INCLUDES="-I$MPI_HOME/include"
+ MPI_LIBS="-L$MPI_HOME/lib"
+ fi
+
+ CPPFLAGS_old="$CPPFLAGS"
+ CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
+ AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no")
+ CPPFLAGS="$CPPFLAGS_old"
+
+ if test "$WITHMPI" = "yes";then
+ LDFLAGS_old="$LDFLAGS"
+ LDFLAGS="$MPI_LIBS $LDFLAGS"
+ AC_CHECK_LIB(elan,elan_init,MPI_LIBS="$MPI_LIBS -lelan")
+ AC_CHECK_LIB(mpi,MPI_Init,WITHMPI="yes",WITHMPI="no")
+ LDFLAGS="$LDFLAGS_old"
+ fi
+
+ if test "$WITHMPI" = "yes";then
+ mpi_ok=yes
+ MPI_LIBS="$MPI_LIBS -lmpi"
+ fi
+
+fi
+AC_SUBST(MPI_INCLUDES)
+AC_SUBST(MPI_LIBS)
+AC_SUBST(WITHMPI)
+
+])dnl
if test "$WITHMPICH" = "yes";then
LDFLAGS_old="$LDFLAGS"
LDFLAGS="$MPICH_LIBS $LDFLAGS"
- AC_CHECK_LIB(mpich,MPI_Init,
- AC_CHECK_LIB(pmpich, PMPI_Init,WITHMPICH="yes",WITHMPICH="no"),
- WITHMPICH="no")
+ AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no")
LDFLAGS="$LDFLAGS_old"
fi
- MPICH_LIBS="$MPICH_LIBS -lpmpich -lmpich"
+ if test "$WITHMPICH" = "yes";then
+ mpich_ok=yes
+ MPICH_LIBS="$MPICH_LIBS -lmpich"
+ fi
+
fi
AC_SUBST(MPICH_INCLUDES)
dnl ----------------------------------------------------------------
dnl CHECK_PTHREADS
AC_DEFUN(CHECK_PTHREADS,[
-AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
-AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H))
-AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="")
-AC_CHECK_LIB(pthread,pthread_mutex_lock,
- LIBS_PTHREADS="-lpthread $LIBS_PTHREADS")
-AC_MSG_CHECKING([parameters for using pthreads])
-case $build_os in
- freebsd*)
- CFLAGS_PTHREADS="-pthread"
- CXXFLAGS_PTHREADS="-pthread"
- ;;
- *)
- ;;
-esac
-AC_MSG_RESULT(["flags: $CFLAGS_PTHREADS\;libs: $LIBS_PTHREADS"])
-threads_ok=yes
+AC_CXX_OPTION(-pthread,CPPFLAGS,flag=yes,flag=no)
+
+if test $flag = no; then
+ AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
+ AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H))
+ AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="")
+ AC_CHECK_LIB(pthread,pthread_mutex_lock,
+ LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="")
+fi
+
+if test $flag = no && x$LIBS_PTHREADS = x; then
+ threads_ok=no
+else
+ threads_ok=yes
+fi
])dnl
dnl
dnl
AC_DEFUN([CHECK_PYQT],[
AC_REQUIRE([CHECK_PYTHON])dnl
-AC_CHECKING(for pyqt)
-
-pyqt_ok=no
-
-PYTHON_SITE_PACKPYQT=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
-AC_CHECK_FILES($PYTHON_SITE_PACKPYQT/qt.py $PYTHON_SITE_PACKPYQT/libqtcmodule.so,pyqt_ok=yes,pyqt_ok=no)
-if test "x$pyqt_ok" = xyes ; then
- PYQT_INCLUDES="-I $PYTHON_SITE_PACKPYQT"
- PYQT_LIBS="-L$PYTHON_SITE_PACKPYQT -lqtcmodule"
-fi
-
-if test "x$pyqt_ok" = xyes ; then
- AC_CHECK_FILES(/usr/share/sip/qt/qtmod.sip,pyqt_ok=yes,pyqt_ok=no)
- if test "x$pyqt_ok" = xyes ; then
- PYQT_SIPS="/usr/share/sip/qt"
- fi
- AC_SUBST(PYQT_INCLUDES)
- AC_SUBST(PYQT_LIBS)
- AC_SUBST(PYQT_SIPS)
- AC_MSG_RESULT(yes)
-else
-
- pyqt_ok=yes
- dnl were is pyqt ?
-
AC_ARG_WITH(pyqt,
[ --with-pyqt=DIR root directory path to PyQt installation ],
[PYQTDIR="$withval"
AC_MSG_RESULT("select $withval as pyqt executable")
])
+AC_CHECKING(for pyqt)
-if test -z $PYQTDIR; then
- PYQTDIR="/usr/lib/python${PYTHON_VERSION}/site-packages"
-else
- if test -z $PYQT_SIPS; then
- PYQT_SIPS="$PYQTDIR/sip"
- fi
- if test -z $PYUIC; then
- AC_CHECK_FILE("$PYQTDIR/pyuic",pyqt_ok=yes,pyqt_ok=no)
- if test "x$pyqt_ok" = xyes ; then
- PYUIC="$PYQTDIR/pyuic"
- else
- AC_PATH_PROG(PYUIC, pyuic)
- fi
- fi
-fi
+pyqt_ok=no
-if test -z $PYQT_SIPS; then
- PYQT_SIPS="/usr/share/sip/qt"
+if test "x$PYQTDIR" = x; then
+ PYQTDIR="/usr"
fi
-if test -z $PYUIC; then
- PYUIC="/usr/bin/pyuic"
+if test "x$PYQT_SIPS" = x; then
+ PYQT_SIPS="/usr/share/sip/qt"
fi
-PYQT_ROOT=$PYQTDIR
-PYQT_INCLUDES="-I$PYQT_SIPS"
-PYQT_LIBS="-L$PYQTDIR -lqtcmodule"
+if test -d $PYQTDIR/lib/python${PYTHON_VERSION}/site-packages; then
+ PYQTLIB=$PYQTDIR/lib/python${PYTHON_VERSION}/site-packages
+else
+ if test -d $PYQTDIR/lib; then
+ PYQTLIB=$PYQTDIR/lib
+ else
+ PYQTLIB=$PYQTDIR
+ fi
+fi
-AC_CHECK_FILES($PYQTDIR/qt.py $PYQTDIR/qt/qt.py $PYQTDIR/lib/qt.py,pyqt_ok=yes,pyqt_ok=no)
-if test "x$pyqt_ok" = xno ; then
- AC_MSG_WARN(qt.py not found)
+if test -d $PYQTDIR/bin; then
+ PYQTBIN=$PYQTDIR/bin
else
- AC_CHECK_FILE("$PYQTDIR/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no)
- if test "x$pyqt_ok" = xyes ; then
- PYQT_ROOT=$PYQTDIR
- PYQT_LIBS="-L$PYQTDIR -lqtcmodule"
- fi
- if test "x$pyqt_ok" = xno ; then
- AC_CHECK_FILE("$PYQTDIR/lib/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no)
- if test "x$pyqt_ok" = xyes ; then
- PYQT_ROOT=$PYQTDIR
- PYQT_LIBS="-L$PYQTDIR/lib -lqtcmodule"
- fi
- fi
-
- AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=$pyqt_ok,pyqt_ok=no)
- if test "x$pyqt_ok" = xyes ; then
- PYQT_INCLUDES="-I$PYQT_SIPS"
- fi
+ PYQTBIN=$PYQTDIR
fi
-AC_SUBST(PYQT_ROOT)
-AC_SUBST(PYQT_INCLUDES)
-AC_SUBST(PYUIC)
-AC_SUBST(PYQT_SIPS)
-AC_SUBST(PYQT_LIBS)
+AC_CHECK_FILE("$PYQTBIN/pyuic",pyqt_ok=yes,pyqt_ok=no)
+
+if test "x$pyqt_ok" = xyes ; then
+ AC_CHECK_FILES("$PYQTLIB/qt.py",pyqt_ok=yes,pyqt_ok=no)
+fi
+
+if test "x$pyqt_ok" = xyes ; then
+ AC_CHECK_FILE("$PYQTLIB/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no)
+fi
-AC_MSG_RESULT(for pyqt: $pyqt_ok)
+if test "x$pyqt_ok" = xyes ; then
+ AC_CHECK_FILES("$PYQT_SIPS/qtmod.sip",pyqt_ok=yes,pyqt_ok=no)
+fi
+if test "x$pyqt_ok" = xyes ; then
+ AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=yes,pyqt_ok=no)
+fi
+if test "x$pyqt_ok" = xyes ; then
+ PYQT_ROOT=$PYQTDIR
+ PYQT_INCLUDES="-I$PYQT_SIPS"
+ PYQT_LIBS="-L$PYQTLIB -lqtcmodule"
+ AC_SUBST(PYQT_ROOT)
+ AC_SUBST(PYQT_INCLUDES)
+ AC_SUBST(PYQT_LIBS)
+ AC_SUBST(PYQT_SIPS)
+ AC_SUBST(PYUIC)
fi
+
])dnl
dnl
if test "x$qt_ok" = "xyes"
then
- AC_MSG_CHECKING(include of qt headers)
CPPFLAGS_old=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
if test "x$qt_ok" = "xno"
then
- AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
- AC_MSG_RESULT(QTDIR environment variable may be wrong)
+ AC_MSG_WARN(qt headers not found, or too old qt version, in $QTDIR/include)
+ AC_MSG_WARN(QTDIR environment variable may be wrong)
else
- AC_MSG_RESULT(yes)
- QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
+ QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
fi
fi
sip_vers=new ;;
3.5*)
sip_vers=new ;;
+ 3.6*)
+ sip_vers=new ;;
+ 3.7*)
+ sip_vers=new ;;
+ 3.8*)
+ sip_vers=new ;;
+ 3.9*)
+ sip_vers=new ;;
*)
sip_vers=no ;;
esac
-
sip_ok=no
if test "x$sip_vers" = "xold"
if test "x$sip_vers" = "xnew"
then
- if test -d ${SIPDIR}/include ; then
- sip_ok=yes
+ sip_ok=yes
+ if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
SIP_ROOT="$SIPDIR"
- SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include"
- SIP_LIBS="-L${SIPDIR}/lib -lsip"
+ SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}"
+ SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
else
sip_ok=yes
SIP_ROOT="$SIPDIR"
AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output)
fi
+if test "x$x_libraries" != "x"
+then
+ LXLIB="-L$x_libraries"
+else
+ LXLIB=""
+fi
LOCAL_INCLUDES="$OGL_INCLUDES"
-LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS -L$x_libraries -lX11 -lXt"
-TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS -L$x_libraries -lX11 -lXt"
+LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS $LXLIB -lX11 -lXt"
+TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt"
if test -z $VTKHOME
then
dnl vtk headers
CPPFLAGS_old="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES -Wno-deprecated"
+CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
# LIBS="$LIBS $TRY_LINK_LIBS"
LIBS="$LIBS $LOCAL_LIBS"
CPPFLAGS_old="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $VTK_INCLUDES -Wno-deprecated"
+ CPPFLAGS="$CPPFLAGS $VTK_INCLUDES"
dnl VTKPY_MODULES="$VTKHOME/python"
if test "X$enable_production" = "Xyes"; then
CFLAGS="$CFLAGS -O"
- CXXFLAGS="$CXXFLAGS -O -Wno-deprecated "
+ CXXFLAGS="$CXXFLAGS -O "
fi
])
if test "X$enable_debug" = "Xyes"; then
CFLAGS="$CFLAGS -g -D_DEBUG_ "
- CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ -Wno-deprecated "
+ CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ "
fi
])
AC_MSG_CHECKING([if we need libdb])
PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
if test "x$PY_NEEDOPENDB" != "x"; then
- PYTHON_LIBS="$PYTHON_LIBS -ldb"
AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(db,dbopen,PYTHON_LIBS="$PYTHON_LIBS -ldb",db_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need libdl])
PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
if test "x$PY_NEEDOPENDL" != "x"; then
- PYTHON_LIBS="$PYTHON_LIBS -ldl"
AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(dl,dlopen,PYTHON_LIBS="$PYTHON_LIBS -ldl",dl_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need libutil])
PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
if test "x$PY_NEEDOPENPTY" != "x"; then
- PYTHON_LIBS="$PYTHON_LIBS -lutil"
AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(util,openpty,PYTHON_LIBS="$PYTHON_LIBS -lutil",openpty_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need tcltk])
PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
if test "x$PY_NEEDTCLTK" != "x"; then
- PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk"
AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(tcl,Tcl_Init,PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk",tclinit_ok=no)
else
AC_MSG_RESULT(no)
fi
## otherwise the file is changed and a backup is saved by appending a
## tilde to the file name.
##
+
+DEPCC = @DEPCC@
+DEPCXX = @DEPCXX@
+DEPCXXFLAGS = @DEPCXXFLAGS@
+
$(srcdir)/Dependencies: .depend
@if test "$(srcdir)" != "."; then \
echo '## This file is machine generated on GNU systems.' >$@; \
echo Building dependencies for $$dep; \
obj=`basename $$dep .c`.lo; \
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
- $(CC) $(C_DEPEND_FLAG) $(CPPFLAGS) $$dep 2>/dev/null | \
+ $(DEPCC) $(C_DEPEND_FLAG) $(CPPFLAGS) $$dep 2>/dev/null | \
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
echo Building dependencies for $$dep; \
obj=`basename $$dep .cc`.lo; \
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
- $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \
+ $(DEPCXX) $(CXX_DEPEND_FLAG) $(DEPCXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
echo Building dependencies for $$dep; \
obj=`basename $$dep .cxx`.lo; \
sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
- $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \
+ $(DEPCXX) $(CXX_DEPEND_FLAG) $(DEPCXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \
sed 's% $(srcdir)/% $$(srcdir)/%g' | \
sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \
sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \
inc_builddir=$(top_builddir)/include/salome
@SET_MAKE@
-SHELL=/bin/sh
+# Modifcation B. Secher portage sur osf
+SHELL=@SHELL@
# header missing
LIBS=@LIBS@
-LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker -L$(top_builddir)/lib/salome
+# LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker -L$(top_builddir)/lib/salome
+LDFLAGS= @LDFLAGS@ -L$(top_builddir)/lib/salome
# add libstdc++ to link c++ library with libtool !
-LDFLAGS+= -lstdc++
+LDFLAGS+= @STDLIB@
CP=@CP@
# PYQT
PYQT_SIPS = @PYQT_SIPS@
+PYQT_INCLUDES = @PYQT_INCLUDES@
PYQT_LIBS = @PYQT_LIBS@
# openGL
CAS_MODELER=@CAS_MODELER@
CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@
CAS_LDPATH=@CAS_LDPATH@
+# MPI
+MPI_INCLUDES=@MPI_INCLUDES@
+MPI_LIBS=@MPI_LIBS@
# MPICH
-
MPICH_INCLUDES=@MPICH_INCLUDES@
MPICH_LIBS=@MPICH_LIBS@
ln -sf $(CURDIR)/$< $@
$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
- $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS)
# copy python scripts in $(top_builddir)/bin/salome
#
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_Component_i.hxx"
#include "RegistryConnexion.hxx"
#include "OpUtil.hxx"
#include <stdio.h>
#include <dlfcn.h>
#include "utilities.h"
+using namespace std;
extern bool _Sleeping ;
static Engines_Component_i * theEngines_Component ;
return CORBA::string_dup( _nodeName.c_str() ) ;
}
-bool Engines_Component_i::Killer( int ThreadId , int signum ) {
+bool Engines_Component_i::Killer( pthread_t ThreadId , int signum ) {
if ( ThreadId ) {
if ( signum == 0 ) {
if ( pthread_cancel( ThreadId ) ) {
return cpu ;
}
-long Engines_Component_i::CpuUsed_impl() {
+CORBA::Long Engines_Component_i::CpuUsed_impl() {
long cpu = 0 ;
if ( _ThreadId || _Executed ) {
if ( _ThreadId > 0 ) {
// Module : SALOME
// $Header$
-using namespace std;
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Component)
#include "SALOME_Container_i.hxx"
#include <unistd.h>
#include "utilities.h"
+using namespace std;
bool _Sleeping = false ;
extern "C" {void ActSigIntHandler() ; }
extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; }
+Engines_Container_i::Engines_Container_i () :
+ _numInstance(0)
+{
+}
+
Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
char *containerName ,
- int argc , char* argv[] ) :
+ int argc , char* argv[],
+ bool regist,
+ bool activ ) :
_numInstance(0)
{
_pid = (long)getpid();
- ActSigIntHandler() ;
+ if(regist)
+ ActSigIntHandler() ;
_ArgC = argc ;
_ArgV = argv ;
}
string hostname = GetHostname();
MESSAGE(hostname << " " << getpid() << " Engines_Container_i starting argc "
- << _argc << " Thread " << pthread_self() ) ;
+ << _argc << " Thread " << pthread_self() ) ;
i = 0 ;
while ( _argv[ i ] ) {
MESSAGE(" argv" << i << " " << _argv[ i ]) ;
_orb = CORBA::ORB::_duplicate(orb) ;
_poa = PortableServer::POA::_duplicate(poa) ;
- MESSAGE("activate object");
- _id = _poa->activate_object(this);
-
-// _NS = new SALOME_NamingService(_orb);
- _NS = SINGLETON_<SALOME_NamingService>::Instance() ;
- ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting()) ;
- _NS->init_orb( orb ) ;
-
- Engines::Container_ptr pCont
- = Engines::Container::_narrow(_this());
- SCRUTE(_containerName);
- _NS->Register(pCont, _containerName.c_str());
-}
+ // Pour les containers paralleles: il ne faut pas activer le container generique, mais le container specialise
+ if(activ){
+ MESSAGE("activate object");
+ _id = _poa->activate_object(this);
+ }
-// Constructeur pour composant parallele : ne pas faire appel au naming service
-Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- char *containerName,
- int flag )
- : _numInstance(0)
-{
- _pid = (long)getpid();
- string hostname = GetHostname();
- SCRUTE(hostname);
+ // Pour les containers paralleles: il ne faut pas enregistrer le container generique, mais le container specialise
+ if(regist){
- _containerName = "/Containers/";
- if (strlen(containerName)== 0)
- {
- _containerName += hostname;
- }
- else
- {
- _containerName += containerName;
- }
+ // _NS = new SALOME_NamingService(_orb);
+ _NS = SINGLETON_<SALOME_NamingService>::Instance() ;
+ ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting()) ;
+ _NS->init_orb( orb ) ;
- _orb = CORBA::ORB::_duplicate(orb) ;
- _poa = PortableServer::POA::_duplicate(poa) ;
+ Engines::Container_ptr pCont
+ = Engines::Container::_narrow(_this());
+ SCRUTE(_containerName);
+ _NS->Register(pCont, _containerName.c_str());
+ }
}
MESSAGE("Engines_Container_i::ping() pid "<< getpid());
}
+ // Kill current container
bool Engines_Container_i::Kill_impl() {
MESSAGE("Engines_Container_i::Kill() pid "<< getpid() << " containerName "
<< _containerName.c_str() << " machineName "
exit( 0 ) ;
}
+// Launch a new container from the current container
Engines::Container_ptr Engines_Container_i::start_impl(
const char* ContainerName ) {
MESSAGE("start_impl argc " << _argc << " ContainerName " << ContainerName
}
if ( !nilvar ) {
_numInstanceMutex.unlock() ;
- MESSAGE("start_impl container found without runSession") ;
+ MESSAGE("start_impl container found without new launch") ;
return Engines::Container::_narrow(obj);
}
int i = 0 ;
MESSAGE(" argv" << i << " " << _argv[ i ]) ;
i++ ;
}
-// string shstr( "rsh -n " ) ;
-// shstr += machineName() ;
-// shstr += " " ;
-// shstr += _argv[ 0 ] ;
-// string shstr( _argv[ 0 ] ) ;
- string shstr( "./runSession SALOME_Container " ) ;
+ string shstr = string(getenv("KERNEL_ROOT_DIR")) + "/bin/salome/SALOME_Container ";
+// string shstr( "./runSession SALOME_Container " ) ;
shstr += ContainerName ;
if ( _argc == 4 ) {
shstr += " " ;
MESSAGE("system(" << shstr << ")") ;
int status = system( shstr.c_str() ) ;
if (status == -1) {
- INFOS("Engines_Container_i::start_impl runSession(SALOME_Container) failed (system command status -1)") ;
+ INFOS("Engines_Container_i::start_impl SALOME_Container failed (system command status -1)") ;
}
else if (status == 217) {
- INFOS("Engines_Container_i::start_impl runSession(SALOME_Container) failed (system command status 217)") ;
- }
- INFOS(machineName() << " Engines_Container_i::start_impl runSession(SALOME_Container) done");
-#if 0
- pid_t pid = fork() ;
- if ( pid == 0 ) {
- string anExe( _argv[ 0 ] ) ;
- anExe += "runSession" ;
- char * args[ 6 ] ;
- args[ 0 ] = "runSession" ;
- args[ 1 ] = "SALOME_Container" ;
- args[ 2 ] = strdup( ContainerName ) ;
- args[ 3 ] = strdup( _argv[ 2 ] ) ;
- args[ 4 ] = strdup( _argv[ 3 ] ) ;
- args[ 5 ] = NULL ;
- MESSAGE("execl(" << anExe.c_str() << " , " << args[ 0 ] << " , "
- << args[ 1 ] << " , " << args[ 2 ] << " , " << args[ 3 ]
- << " , " << args[ 4 ] << ")") ;
- int status = execv( anExe.c_str() , args ) ;
- if (status == -1) {
- INFOS("Engines_Container_i::start_impl execl failed (system command status -1)") ;
- perror( "Engines_Container_i::start_impl execl error ") ;
- }
- else {
- INFOS(machineName() << " Engines_Container_i::start_impl execl done");
- }
- exit(0) ;
+ INFOS("Engines_Container_i::start_impl SALOME_Container failed (system command status 217)") ;
}
-#endif
+ INFOS(machineName() << " Engines_Container_i::start_impl SALOME_Container launch done");
+
+// pid_t pid = fork() ;
+// if ( pid == 0 ) {
+// string anExe( _argv[ 0 ] ) ;
+// anExe += "runSession" ;
+// char * args[ 6 ] ;
+// args[ 0 ] = "runSession" ;
+// args[ 1 ] = "SALOME_Container" ;
+// args[ 2 ] = strdup( ContainerName ) ;
+// args[ 3 ] = strdup( _argv[ 2 ] ) ;
+// args[ 4 ] = strdup( _argv[ 3 ] ) ;
+// args[ 5 ] = NULL ;
+// MESSAGE("execl(" << anExe.c_str() << " , " << args[ 0 ] << " , "
+// << args[ 1 ] << " , " << args[ 2 ] << " , " << args[ 3 ]
+// << " , " << args[ 4 ] << ")") ;
+// int status = execv( anExe.c_str() , args ) ;
+// if (status == -1) {
+// INFOS("Engines_Container_i::start_impl execl failed (system command status -1)") ;
+// perror( "Engines_Container_i::start_impl execl error ") ;
+// }
+// else {
+// INFOS(machineName() << " Engines_Container_i::start_impl execl done");
+// }
+// exit(0) ;
+// }
obj = Engines::Container::_nil() ;
try {
}
_numInstanceMutex.unlock() ;
if ( !nilvar ) {
- MESSAGE("start_impl container found after runSession(SALOME_Container)") ;
+ MESSAGE("start_impl container found after new launch of SALOME_Container") ;
}
return Engines::Container::_narrow(obj);
}
INFOS(machineName() << "Caught unknown exception.");
}
_numInstanceMutex.unlock() ;
- MESSAGE("start_impl container not found after runSession(SALOME_Container)") ;
+ MESSAGE("start_impl container not found after new launch of SALOME_Container") ;
return Engines::Container::_nil() ;
}
LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
-LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
+LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS)
@CONCLUDE@
void Names( const char * graphName , const char * nodeName ) ;
char * graphName() ;
char * nodeName() ;
- bool Killer( int ThreadId , int signum );
+ bool Killer( pthread_t ThreadId , int signum );
bool Kill_impl();
bool Stop_impl();
bool Suspend_impl();
bool Resume_impl();
void SetCurCpu() ;
long CpuUsed() ;
- long CpuUsed_impl() ;
+ CORBA::Long CpuUsed_impl() ;
protected:
string _instanceName ;
Engines_Container_i(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
char * containerName ,
- int argc, char* argv[]);
-// Constructeur pour composant parallele : ne pas faire appel au naming service
- Engines_Container_i(CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- char * containerName,
- int flag);
+ int argc, char* argv[],
+ bool regist = true,
+ bool activ = true);
virtual ~Engines_Container_i();
-
+ // Launch a new container from the current container
Engines::Container_ptr start_impl(const char* ContainerName);
+ // Load component in current container
Engines::Component_ptr load_impl(const char* nameToRegister,
const char* componentName);
+
+ // Unload component from current container
void remove_impl(Engines::Component_ptr component_i);
void finalize_removal();
char* name();
char* machineName();
void ping();
+
+ // Kill current container
bool Kill_impl() ;
char* getHostName();
long getPID();
protected:
SALOME_NamingService *_NS ;
- string _library_path;
- string _containerName;
+ std::string _library_path;
+ std::string _containerName;
CORBA::ORB_var _orb;
PortableServer::POA_var _poa;
PortableServer::ObjectId * _id ;
int _numInstance ;
- map<string, void *> handle_map ;
- map<string, void *> remove_map ;
+ std::map<std::string, void *> handle_map ;
+ std::map<std::string, void *> remove_map ;
omni_mutex _numInstanceMutex ; // if several threads on the same object
-private:
+ //private:
int _argc ;
char** _argv ;
// File : SALOME_DataTypeCatalog_Client.cxx
// Module : SALOME
-using namespace std;
/* $Header$ */
-#include <iostream.h>
+#include <iostream>
#include "SALOME_NamingService.hxx"
#include "SALOME_DataTypeCatalog.hh"
#include <string>
#include "utilities.h"
+using namespace std;
int main(int argc,char **argv)
{
// Module : SALOME
// $Header$
-using namespace std;
#define WRITE_CATA_DATA_TYPE
#include "SALOME_DataTypeCatalog_Handler.hxx"
+using namespace std;
//----------------------------------------------------------------------
// Function : SALOME_DataTypeCatalog_Handler
// Module : SALOME
// $Header$
-#include <iostream.h>
+#include <iostream>
#include "SALOME_NamingService.hxx"
#include "SALOME_DataTypeCatalog_impl.hxx"
#include "utilities.h"
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_DataTypeCatalog_impl.hxx"
#include <fstream>
+using namespace std;
//----------------------------------------------------------------------
// Function : SALOME_DataTypeCatalogImpl
-using namespace std;
// File : SALOMEDS_Tool.cxx
// Created : Mon Oct 21 16:24:34 2002
// Author : Sergey RUIN
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
+using namespace std;
bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp);
bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp);
// File : HDFattribute.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
#include "HDFexception.hxx"
#include "HDFattribute.hxx"
#include "HDFinternalObject.hxx"
+using namespace std;
HDFattribute::HDFattribute(char *name,HDFinternalObject *father,hdf_type type, size_t size)
: HDFobject(name)
size_t HDFattribute::GetSize()
{
+ int size;
if(_size == 0) {
- if((_size = HDFattrGetSize(_id)) < 0)
+ if((size = HDFattrGetSize(_id)) < 0)
throw HDFexception("Can't determine the size of data in the attribute");
+ else
+ _size = size;
}
return _size;
}
// File : HDFcontainerObject.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
#include "HDFcontainerObject.hxx"
#include "HDFexception.hxx"
#include "utilities.h"
+using namespace std;
HDFcontainerObject::HDFcontainerObject(char *name)
: HDFinternalObject(name)
// File : HDFconvert.cc
// Module : SALOME
-using namespace std;
#include "HDFconvert.hxx"
+using namespace std;
int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_container, const string& nomdataset)
{
#endif
// Creation du Dataset utilisateur
- hdf_dataset = new HDFdataset::HDFdataset( (char *) nomdataset.c_str(), /*discard const */
- (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par référence */
- HDF_STRING,
- &length_long,1);
+ hdf_dataset = new HDFdataset( (char *) nomdataset.c_str(), /*discard const */
+ (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par référence */
+ HDF_STRING,
+ &length_long,1);
// Cree le Dataset sur le disk
hdf_dataset->CreateOnDisk();
perror("HDFConvert::FromAscii");
return -1;
};
+
+ return 0;
};
public:
-static int FromAscii(const string& file, const HDFcontainerObject& hdf_container, const string& nomdataset);
+static int FromAscii(const std::string& file, const HDFcontainerObject& hdf_container, const std::string& nomdataset);
};
// File : HDFdataset.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
-#include <string.h>
}
+#include <string>
#include "HDFdataset.hxx"
#include "HDFcontainerObject.hxx"
#include "HDFexception.hxx"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
herr_t dataset_attr(hid_t loc_id, const char *attr_name, void *operator_data)
{
else
ndim = _ndim;
_dim = new hdf_size[ndim];
- if ((ret == HDFdatasetGetDim(_id,_dim)) < 0)
+ if ((ret = HDFdatasetGetDim(_id,_dim)) < 0)
throw HDFexception("Can't determine the size dimensions of the dataset ");
}
{
public :
HDFexception(const char *message) {
- cerr << message << endl;
+ std::cerr << message << std::endl;
}
};
// File : HDFexplorer.cc
// Module : SALOME
-using namespace std;
#include "HDFcontainerObject.hxx"
#include "HDFexception.hxx"
#include "HDFinternalObject.hxx"
#include "HDFexplorer.hxx"
+using namespace std;
HDFexplorer::HDFexplorer(HDFcontainerObject *container)
{
// File : HDFfile.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
#include <unistd.h>
-#include <string.h>
}
-#include <iostream.h>
+#include <string>
+#include <iostream>
#include "HDFfile.hxx"
#include "HDFexception.hxx"
+using namespace std;
herr_t file_attr(hid_t loc_id, const char *attr_name, void *operator_data)
{
// File : HDFgroup.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
-#include <string.h>
}
+#include <string>
#include "HDFgroup.hxx"
#include "HDFexception.hxx"
+using namespace std;
herr_t group_attr(hid_t loc_id, const char *attr_name, void *operator_data)
{
// File : HDFinternalObject.cc
// Module : SALOME
-using namespace std;
extern "C"
{
#include "hdfi.h"
}
#include "HDFinternalObject.hxx"
+using namespace std;
HDFinternalObject::HDFinternalObject(char *name)
: HDFobject(name)
// File : HDFobject.cc
// Module : SALOME
-using namespace std;
#include "HDFobject.hxx"
extern "C"
{
#include "hdfi.h"
-#include <string.h>
}
+#include <string>
#include "utilities.h"
+using namespace std;
HDFobject::HDFobject(char *name)
{
#-------------------------------------------------------------------------
def ComputerPath(self, ComputerName ):
+ # Modification provisoire B. Secher en attendant
+ # le gestionnaire de ressources 21/10/2003
+ # Le KERNEL_ROOT_DIR sera a lire dans le catalogue de machines
+ # en attendant on suppose qu'il est identique au KERNEL_ROOT_DIR local
try:
- path = self._catalog.GetPathPrefix( ComputerName )
+ #path = self._catalog.GetPathPrefix( ComputerName )
+ path = os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/"
except SALOME_ModuleCatalog.NotFound, ex:
path = ""
return path
else :
rshstr = "rsh -n " + theComputer + " "
path = self.ComputerPath( theComputer )
- if path != "" :
- rshstr = rshstr + path + "/../bin/"
- else :
- rshstr = rshstr + os.getenv( "SALOME_ROOT_DIR" ) + "/bin/"
+## if path != "" :
+## rshstr = rshstr + path + "/../bin/"
+## else :
+## rshstr = rshstr + os.getenv( "KERNEL_ROOT_DIR" ) + "/bin/"
if theContainer == "FactoryServer" :
- rshstr = rshstr + "./runSession ./SALOME_Container "
+ rshstr = rshstr + path + "SALOME_Container "
else :
- rshstr = rshstr + "./runSession ./SALOME_ContainerPy.py '"
+ rshstr = rshstr + path + "SALOME_ContainerPy.py '"
rshstr = rshstr + theContainer + " -"
omniORBcfg = os.getenv( "OMNIORB_CONFIG" )
file = os.open( omniORBcfg , os.O_RDONLY )
return aContainer
return aContainer
- #os.system("rsh -n dm2s0017 /export/home/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515")
+ #os.system("rsh -n dm2s0017 /export/home/KERNEL_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515")
#-------------------------------------------------------------------------
// Module : SALOME
// $Header$
-using namespace std;
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
+using namespace std;
#include "OpUtil.hxx"
#include "utilities.h"
string SALOME_LifeCycleCORBA::ComputerPath(
const char * theComputer ) {
- CORBA::String_var path;
- CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var Catalog =
- SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ;
- try {
- path = Catalog->GetPathPrefix( theComputer );
- }
- catch (SALOME_ModuleCatalog::NotFound&) {
- MESSAGE("GetPathPrefix(" << theComputer << ") not found!");
- path = "" ;
- }
+// CORBA::String_var path;
+// CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog");
+// SALOME_ModuleCatalog::ModuleCatalog_var Catalog =
+// SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ;
+// try {
+// path = Catalog->GetPathPrefix( theComputer );
+// }
+// catch (SALOME_ModuleCatalog::NotFound&) {
+// MESSAGE("GetPathPrefix(" << theComputer << ") not found!");
+// path = "" ;
+// }
+// Modification provisoire B. Secher en attendant le gestionnaire de ressources
+// 21/10/2003
+// Le KERNEL_ROOT_DIR sera a lire dans le catalogue de machines
+// en attendant on suppose qu'il est identique au KERNEL_ROOT_DIR local
+ string path = string(getenv("KERNEL_ROOT_DIR")) + "/bin/salome/";
SCRUTE( path ) ;
- return CORBA::string_dup( path ) ;
+ return path;
}
Engines::Container_var SALOME_LifeCycleCORBA::FindContainer(const char *containerName ) {
}
aFactoryServer = FindContainer( FactoryServer.c_str() ) ;
if ( CORBA::is_nil( aFactoryServer ) ) {
-// rsh -n ikkyo /export/home/rahuel/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515 &
+// rsh -n machine_name ${KERNEL_ROOT_DIR}/bin/salome SALOME_Container -ORBInitRef NameService=corbaname::localhost:1515 &
string rsh( "" ) ;
if ( theComputer!= GetHostname() ) {
rsh += "rsh -n " ;
}
string path = ComputerPath( theComputer.c_str() ) ;
SCRUTE( path ) ;
- if ( path[0] != '\0' ) {
- rsh += path ;
- rsh += "/../bin/" ;
- }
- rsh += "runSession " ;
+ rsh += path;
+// rsh += "runSession " ;
if ( pyCont ) {
rsh += "SALOME_ContainerPy.py " ;
rsh += "FactoryServerPy -" ;
protected:
SALOME_NamingService *_NS;
Engines::Container_var _FactoryServer ;
-
-private:
+ std::string ComputerPath( const char * theComputer ) ;
std::string ContainerName( const char * aComputerContainer ,
std::string * theComputer ,
std::string * theContainer ) ;
- std::string ComputerPath( const char * theComputer ) ;
+
+private:
Engines::Container_var FindOrStartContainer(const std::string aComputerContainer ,
const std::string theComputer ,
const std::string theContainer ) ;
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include <iostream>
#include <unistd.h>
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include <OpUtil.hxx>
+using namespace std;
int main (int argc, char * argv[])
{
// Module : SALOME
// $Header$
-using namespace std;
#include "InquireServersQThread.h"
#include <qlabel.h>
#include "SALOME_NamingService.hxx"
#include "utilities.h"
#include "OpUtil.hxx"
+using namespace std;
#include CORBA_CLIENT_HEADER(SALOME_Session)
#include CORBA_CLIENT_HEADER(SALOME_Registry)
int InquireServersGUI::getExitStatus()
{
myThread->getExitStatus();
+ return 0;
}
InquireServersQThread::InquireServersQThread( InquireServersGUI* r )
// Module : SALOME
// $Header$
-using namespace std;
/*! \file SALOME_Session_loader.cxx
*/
#include "Utils_SINGLETON.hxx"
#include "SALOME_NamingService.hxx"
#include "utilities.h"
+using namespace std;
//! CORBA client for SALOME Session server : launch GUI
/*!
// Author : Vasily Rusyaev
// Module : SALOME
-using namespace std;
#include <iostream>
+
#include "SALOME_Logger_Server.hxx"
#include <SALOMEconfig.h>
#include <sys/types.h>
#include <unistd.h>
+using namespace std;
omni_mutex Logger::myLock;
/////////////////////////////////////////////////////////////////////
// Author : Vasily Rusyaev
// Module : SALOME
-using namespace std;
#include "SALOME_Trace.hxx"
#include <memory.h>
#include <string>
-//#include <stdio.h>
#include <stdlib.h>
#include <iostream>
+#include "SALOME_Trace.hxx"
+using namespace std;
+
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
# endif /* WNT */
-using namespace std;
-
#include <strstream.h>
+
#include "Logger.hh"
+using namespace std;
class SALOME_Trace : public ostrstream
{
// File : MPIContainer_i.cxx
// Module : SALOME
-using namespace std;
#include <iostream.h>
#include <dlfcn.h>
#include <stdio.h>
#include "MPIContainer_i.hxx"
+#include "SALOME_NamingService.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
#include "utilities.h"
+using namespace std;
-MPIContainer_i::MPIContainer_i(int nbproc, int numproc,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- char * containerName)
- : Engines_Container_i(orb,poa,containerName,0), MPIObject_i(nbproc,numproc)
+// 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,
+ PortableServer::POA_ptr poa,
+ char * containerName,
+ int argc, char *argv[])
+ : Engines_Container_i(orb,poa,containerName,argc,argv,false,false), MPIObject_i(nbproc,numproc)
{
+ MESSAGE("[" << numproc << "] activate object");
_id = _poa->activate_object(this);
- MESSAGE("[" << _numproc << "] containerName=" << _containerName);
- if( _numproc == 0 ){
+ if(numproc==0){
+
+ // _NS = new SALOME_NamingService(_orb);
_NS = SINGLETON_<SALOME_NamingService>::Instance() ;
ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting()) ;
_NS->init_orb( orb ) ;
Engines::Container_ptr pCont
= Engines::Container::_narrow(POA_Engines::MPIContainer::_this());
- _NS->Register(pCont, _containerName.c_str());
+ SCRUTE(_containerName);
+ _NS->Register(pCont, _containerName.c_str());
}
// Root recupere les ior des container des autre process
BCastIOR(_orb,pobj,true);
}
-MPIContainer_i::~MPIContainer_i(void)
+Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc)
+ : Engines_Container_i(), MPIObject_i(nbproc,numproc)
+{
+}
+
+Engines_MPIContainer_i::~Engines_MPIContainer_i(void)
{
+ MESSAGE("[" << _numproc << "] Engines_MPIContainer_i::~Engines_MPIContainer_i()");
if( !handle_map.empty() ){
- MESSAGE("[" << _numproc << "] MPIContainer_i::~MPIContainer_i: warning destroy a not empty container");
+ MESSAGE("[" << _numproc << "] Engines_MPIContainer_i::~Engines_MPIContainer_i: warning destroy a not empty container");
}
}
+// Start MPI Container
+Engines::MPIContainer_ptr Engines_MPIContainer_i::start_MPIimpl(
+ const char* ContainerName,
+ CORBA::Short nbproc )
+{
+
+ char nbp[1024];
+
+ MESSAGE("[" << _numproc << "] start_impl argc " << _argc << " ContainerName " << ContainerName
+ << hex << this << dec) ;
+ _numInstanceMutex.lock() ; // lock on the instance number
+
+ CORBA::Object_var obj = Engines::MPIContainer::_nil() ;
+ bool nilvar = true ;
+ try {
+ string cont("/Containers/");
+ cont += machineName() ;
+ cont += "/" ;
+ cont += ContainerName;
+ INFOS("[" << _numproc << "] " << machineName() << " start_impl unknown container " << cont.c_str()
+ << " try to Resolve" );
+ obj = _NS->Resolve( cont.c_str() );
+ nilvar = CORBA::is_nil( obj ) ;
+ if ( nilvar ) {
+ INFOS("[" << _numproc << "] " << machineName() << " start_impl unknown container "
+ << ContainerName);
+ }
+ }
+ catch (ServiceUnreachable&) {
+ INFOS("[" << _numproc << "] " << machineName() << "Caught exception: Naming Service Unreachable");
+ }
+ catch (...) {
+ INFOS("[" << _numproc << "] " << machineName() << "Caught unknown exception.");
+ }
+ if ( !nilvar ) {
+ _numInstanceMutex.unlock() ;
+ MESSAGE("[" << _numproc << "] start_impl container found without new launch") ;
+ return Engines::MPIContainer::_narrow(obj);
+ }
+ int i = 0 ;
+ while ( _argv[ i ] ) {
+ MESSAGE("[" << _numproc << "] argv" << i << " " << _argv[ i ]) ;
+ i++ ;
+ }
+ sprintf(nbp,"mpirun -np %d SALOME_MPIContainer ",nbproc);
+ string shstr(nbp);
+ shstr += ContainerName ;
+ if ( _argc == 4 ) {
+ shstr += " " ;
+ shstr += _argv[ 2 ] ;
+ shstr += " " ;
+ shstr += _argv[ 3 ] ;
+ }
+ shstr += " > /tmp/" ;
+ shstr += ContainerName ;
+ shstr += ".log 2>&1 &" ;
+ MESSAGE("system(" << shstr << ")") ;
+ int status = system( shstr.c_str() ) ;
+ if (status == -1) {
+ INFOS("[" << _numproc << "] Engines_MPIContainer_i::start_impl SALOME_MPIContainer failed (system command status -1)") ;
+ }
+ else if (status == 217) {
+ INFOS("[" << _numproc << "] Engines_MPIContainer_i::start_impl SALOME_MPIContainer failed (system command status 217)") ;
+ }
+ INFOS("[" << _numproc << "] " << machineName() << " Engines_MPIContainer_i::start_impl SALOME_MPIContainer launch done");
+
+ obj = Engines::MPIContainer::_nil() ;
+ try {
+ string cont("/Containers/");
+ cont += machineName() ;
+ cont += "/" ;
+ cont += ContainerName;
+ nilvar = true ;
+ int count = 20 ;
+ while ( nilvar && count >= 0) {
+ sleep( 1 ) ;
+ obj = _NS->Resolve(cont.c_str());
+ nilvar = CORBA::is_nil( obj ) ;
+ if ( nilvar ) {
+ INFOS("[" << _numproc << "] " << count << ". " << machineName()
+ << " start_impl unknown container " << cont.c_str());
+ count -= 1 ;
+ }
+ }
+ _numInstanceMutex.unlock() ;
+ if ( !nilvar ) {
+ MESSAGE("[" << _numproc << "] start_impl container found after new launch of SALOME_MPIContainer") ;
+ }
+ return Engines::MPIContainer::_narrow(obj);
+ }
+ catch (ServiceUnreachable&) {
+ INFOS("[" << _numproc << "] " << machineName() << "Caught exception: Naming Service Unreachable");
+ }
+ catch (...) {
+ INFOS("[" << _numproc << "] " << machineName() << "Caught unknown exception.");
+ }
+ _numInstanceMutex.unlock() ;
+ MESSAGE("[" << _numproc << "] start_impl MPI container not found after new launch of SALOME_MPIContainer") ;
+ return Engines::MPIContainer::_nil() ;
+}
+
// Load component
-Engines::Component_ptr MPIContainer_i::load_impl(const char* nameToRegister,
+Engines::Component_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister,
const char* componentName)
{
int ip;
- Engines::Component_var iobject;
- Engines::MPIObject_var pobj;
- char cproc[4];
if( _numproc == 0 ){
// Invocation du chargement du composant dans les autres process
for(ip= 1;ip<_nbproc;ip++)
- (Engines::MPIContainer::_narrow((*_tior)[ip]))->load_impl(nameToRegister,
+ (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPload_impl(nameToRegister,
componentName);
}
+ return Lload_impl(nameToRegister,componentName);
+
+}
+
+// Load component
+void Engines_MPIContainer_i::SPload_impl(const char* nameToRegister,
+ const char* componentName)
+{
+ Lload_impl(nameToRegister,componentName);
+}
+
+Engines::Component_ptr Engines_MPIContainer_i::Lload_impl(
+ const char* nameToRegister,
+ const char* componentName)
+{
+ Engines::Component_var iobject;
+ Engines::MPIObject_var pobj;
+ char cproc[4];
+
sprintf(cproc,"_%d",_numproc);
- BEGIN_OF("[" << _numproc << "] MPIContainer_i::load_impl");
+ BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lload_impl");
_numInstanceMutex.lock() ; // lock on the instance number
_numInstance++ ;
char _aNumI[12];
sprintf(_aNumI,"%d",_numInstance) ;
- _numInstanceMutex.unlock() ;
string _impl_name = componentName;
- string instanceName = string(nameToRegister) + "_inst_" + _aNumI + cproc;
+ string _nameToRegister = nameToRegister;
+ string instanceName = _nameToRegister + "_inst_" + _aNumI + cproc;
+ MESSAGE("[" << _numproc << "] instanceName=" << instanceName);
string absolute_impl_name(_impl_name);
MESSAGE("[" << _numproc << "] absolute_impl_name=" << absolute_impl_name);
return Engines::Component::_nil() ;
}
- string factory_name = string(nameToRegister) + string("Engine_factory");
+ string factory_name = _nameToRegister + string("Engine_factory");
MESSAGE("[" << _numproc << "] factory_name=" << factory_name) ;
PortableServer::ObjectId * (*MPIComponent_factory) (int,int,
if ((error = dlerror()) != NULL){
// Try to load a sequential component
MESSAGE("[" << _numproc << "] Try to load a sequential component");
+ _numInstanceMutex.unlock() ;
iobject = Engines_Container_i::load_impl(nameToRegister,componentName);
if( CORBA::is_nil(iobject) ) return Engines::Component::_duplicate(iobject);
}
// 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);
+ (_nbproc,_numproc,_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) ;
- iobject = Engines::Component::_narrow(pobj) ;
+ iobject = Engines::Component::_narrow(o) ;
}
- // Root recupere les ior des composants des autre process
- BCastIOR(_orb,pobj,false);
-
if( _numproc == 0 ){
// utiliser + tard le registry ici :
// register the engine under the name containerName.dir/nameToRegister.object
- string component_registerName = _containerName + "/" + nameToRegister;
+ string component_registerName = _containerName + "/" + _nameToRegister;
_NS->Register(iobject, component_registerName.c_str()) ;
}
- _numInstanceMutex.lock() ; // lock on the add on handle_map (necessary ?)
handle_map[instanceName] = handle;
_numInstanceMutex.unlock() ;
- END_OF("[" <<_numproc << "] MPIContainer_i::load_impl");
+
+ // Root recupere les ior des composants des autre process
+ BCastIOR(_orb,pobj,false);
+
+ END_OF("[" <<_numproc << "] MPIContainer_i::Lload_impl");
return Engines::Component::_duplicate(iobject);
}
-void MPIContainer_i::remove_impl(Engines::Component_ptr component_i)
+void Engines_MPIContainer_i::remove_impl(Engines::Component_ptr component_i)
{
int ip;
Engines::Component_ptr cptr;
for(ip= 1;ip<_nbproc;ip++){
spcptr = Engines::MPIObject::_narrow((*(pcptr->tior()))[ip]);
cptr = (Engines::Component_ptr)spcptr;
- (Engines::MPIContainer::_narrow((*_tior)[ip]))->remove_impl(cptr);
+ (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPremove_impl(cptr);
}
}
+ Lremove_impl(component_i);
+}
+
+void Engines_MPIContainer_i::SPremove_impl(Engines::Component_ptr component_i)
+{
+ Lremove_impl(component_i);
+}
+
+void Engines_MPIContainer_i::Lremove_impl(Engines::Component_ptr component_i)
+{
+ int ip;
+ Engines::Component_ptr cptr;
+ Engines::MPIObject_ptr pcptr;
+ Engines::MPIObject_ptr spcptr;
+
+ BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl");
+
+ ASSERT(! CORBA::is_nil(component_i));
+
string instanceName = component_i->instanceName() ;
MESSAGE("[" << _numproc << "] unload component " << instanceName);
component_i->destroy() ;
{
MESSAGE("[" << _numproc << "] stay " << (*im).first);
}
+
+ END_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl");
+
}
-void MPIContainer_i::finalize_removal()
+void Engines_MPIContainer_i::finalize_removal()
{
int ip;
- MESSAGE("[" << _numproc << "] finalize unload : dlclose");
-
if( _numproc == 0 ){
// Invocation de la destruction du composant dans les autres process
for(ip= 1;ip<_nbproc;ip++)
- (Engines::MPIContainer::_narrow((*_tior)[ip]))->finalize_removal();
+ (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPfinalize_removal();
}
+ Lfinalize_removal();
+}
+
+void Engines_MPIContainer_i::SPfinalize_removal()
+{
+ Lfinalize_removal();
+}
+
+void Engines_MPIContainer_i::Lfinalize_removal()
+{
+ BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal");
+
map<string, void *>::iterator im ;
- _numInstanceMutex.lock() ; // lock on the explore remove_map & dlclose
+ // lock on the explore remove_map & dlclose
+ _numInstanceMutex.lock() ;
for (im = remove_map.begin() ; im != remove_map.end() ; im ++)
{
void * handle = (*im).second ;
- dlclose(handle) ;
MESSAGE("[" << _numproc << "] dlclose " << (*im).first);
+ dlclose(handle) ;
}
+ MESSAGE("[" << _numproc << "] remove_map.clear()");
remove_map.clear() ;
_numInstanceMutex.unlock() ;
- MESSAGE("[" << _numproc << "] remove_map.clear()");
+
+ END_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal");
}
#define _SALOME_PCONTAINER_
#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(MPIContainer)
+#include CORBA_SERVER_HEADER(SALOME_MPIContainer)
#include "SALOME_Container_i.hxx"
-#include "SALOME_NamingService.hxx"
-#include "Utils_SINGLETON.hxx"
-#include "OpUtil.hxx"
#include "MPIObject_i.hxx"
-class MPIContainer_i : public POA_Engines::MPIContainer,
- public Engines_Container_i,
- public MPIObject_i
+class Engines_MPIContainer_i : public POA_Engines::MPIContainer,
+ public Engines_Container_i,
+ public MPIObject_i
{
public:
// Constructor
- MPIContainer_i( int nbproc, int numproc,
- CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- char * containerName);
+ Engines_MPIContainer_i( int nbproc, int numproc,
+ CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ char * containerName,
+ int argc, char *argv[]);
+ Engines_MPIContainer_i(int nbproc, int numproc);
// Destructor
- ~MPIContainer_i();
+ ~Engines_MPIContainer_i();
- // Load a component
+ // Launch a new MPI container from the current container
+ Engines::MPIContainer_ptr start_MPIimpl(const char* ContainerName,
+ CORBA::Short nbproc);
+
+ // Load a component in current MPI container
+ // synchronous version for process 0
Engines::Component_ptr load_impl(const char* nameToRegister,
const char* componentName);
+ // asynchronous version for other process
+ void SPload_impl(const char* nameToRegister, const char* componentName);
- // Unload a component
+ // Unload a component from current MPI container
+ // synchronous version for process 0
void remove_impl(Engines::Component_ptr component_i);
+ // asynchronous version for other process
+ void SPremove_impl(Engines::Component_ptr component_i);
+
+ // synchronous version for process 0
void finalize_removal();
+ // asynchronous version for other process
+ void SPfinalize_removal();
+
+ private:
+ // local version to not duplicate code
+ // called by synchronous and asynchronous version
+ Engines::Component_ptr Lload_impl(const char* nameToRegister,
+ const char* componentName);
+ void Lremove_impl(Engines::Component_ptr component_i);
+ void Lfinalize_removal();
};
#endif
// File : MPIObject_i.cxx
// Module : SALOME
-using namespace std;
#include "MPIObject_i.hxx"
#include "utilities.h"
#include <mpi.h>
+using namespace std;
MPIObject_i::MPIObject_i()
{
}
else{
// On envoie l'IOR au process 0
- n = strlen((char*)sior);
+ ior = sior._retn();
+ n = strlen(ior) + 1;
err = MPI_Send(&n,1,MPI_INTEGER,0,_numproc,MPI_COMM_WORLD);
if(err){
MESSAGE("[" << _numproc << "] MPI_SEND error");
exit(1);
}
- err = MPI_Send((char*)sior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD);
+ err = MPI_Send(ior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD);
if(err){
MESSAGE("[" << _numproc << "] MPI_SEND error");
exit(1);
}
}
+ MPI_Barrier(MPI_COMM_WORLD);
+
}
#define _SALOME_POBJECT_I_H_
#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(MPIObject)
+#include CORBA_SERVER_HEADER(SALOME_MPIObject)
class MPIObject_i: public POA_Engines::MPIObject
{
LIB = libSalomeMPIContainer.la
LIB_SRC = MPIObject_i.cxx MPIContainer_i.cxx
-LIB_SERVER_IDL = TypeData.idl MPIObject.idl MPIContainer.idl
+LIB_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl
# Executables targets
BIN = SALOME_MPIContainer
BIN_SRC =
-BIN_SERVER_IDL = TypeData.idl MPIObject.idl MPIContainer.idl
+BIN_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl
-CXXFLAGS+=${MPICH_INCLUDES}
-CXX_DEPEND_FLAG+=${MPICH_INCLUDES}
-LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil ${MPICH_LIBS}
+LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
+ifeq (@WITHMPICH@,yes)
+ CXXFLAGS+=${MPICH_INCLUDES}
+ CXX_DEPEND_FLAG+=${MPICH_INCLUDES}
+ LDFLAGS+= ${MPICH_LIBS}
+endif
+
+ifeq (@WITHMPI@,yes)
+ CXXFLAGS+=${MPI_INCLUDES}
+ CXX_DEPEND_FLAG+=${MPI_INCLUDES}
+ LDFLAGS+= ${MPI_LIBS}
+endif
@CONCLUDE@
-// SALOME MPIContainer : implemenation of container based on MPI libraries
-//
-// Copyright (C) 2003 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_MPIContainer.cxx
-// Module : SALOME
-
-using namespace std;
#include <iostream>
#include "MPIContainer_i.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
#include "utilities.h"
#include <mpi.h>
+using namespace std;
int main(int argc, char* argv[])
{
int nbproc, numproc;
- MPIContainer_i * myContainer;
+ int flag;
+ Engines_MPIContainer_i * myContainer=NULL;
BEGIN_OF(argv[0])
try {
MESSAGE("Connection MPI");
-
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&nbproc);
MPI_Comm_rank(MPI_COMM_WORLD,&numproc);
- MESSAGE("Initialisation CORBA");
+ MESSAGE("[" << numproc << "] Initialisation CORBA");
// Initialise the ORB.
- CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+ // CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+ 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.
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
containerName = argv[1] ;
}
- MESSAGE("Chargement container sur proc: " << numproc);
- myContainer = new MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName);
- MESSAGE("Fin chargement container");
+ MESSAGE("[" << numproc << "] Chargement container");
+ myContainer = new Engines_MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName,argc,argv);
pman->activate();
orb->run();
orb->destroy();
- delete myContainer;
- MPI_Finalize();
}
- catch(CORBA::SystemException&) {
- INFOS("Caught CORBA::SystemException.")
+ catch(CORBA::SystemException&){
+ INFOS("Caught CORBA::SystemException.");
}
- catch(PortableServer::POA::WrongPolicy&)
- {
- INFOS("Caught CORBA::WrongPolicyException.")
+ catch(PortableServer::POA::WrongPolicy&){
+ INFOS("Caught CORBA::WrongPolicyException.");
}
- catch(PortableServer::POA::ServantAlreadyActive&)
- {
- INFOS("Caught CORBA::ServantAlreadyActiveException")
+ catch(PortableServer::POA::ServantAlreadyActive&){
+ INFOS("Caught CORBA::ServantAlreadyActiveException");
}
- catch(CORBA::Exception&) {
- INFOS("Caught CORBA::Exception.")
+ catch(CORBA::Exception&){
+ INFOS("Caught CORBA::Exception.");
}
- catch(...) {
- INFOS("Caught unknown exception.")
- }
+ catch(...){
+ INFOS("Caught unknown exception.");
+ }
+
+ if(myContainer)
+ delete myContainer;
+ MPI_Initialized(&flag);
+ if(flag)
+ MPI_Finalize();
+
END_OF(argv[0]);
}
--- /dev/null
+#==============================================================================
+# File : MPILifeCycleCORBA.py
+# Created : ven may 30 08:42:01 CEST 2003
+# Author : Bernard SECHER, CEA
+# Project : SALOME
+# Copyright : CEA 2003
+# $Header$
+#==============================================================================
+
+from LifeCycleCORBA import *
+
+class MPILifeCycleCORBA(LifeCycleCORBA):
+ #-------------------------------------------------------------------------
+
+ def __init__(self, orb):
+ MESSAGE( "MPILifeCycleCORBA::__init__" )
+ LifeCycleCORBA.__init__(self, orb)
+
+ #-------------------------------------------------------------------------
+
+ def FindOrStartMPIContainer(self, theComputer , theMPIContainerRoot, nbproc ):
+ theMPIContainer = theMPIContainerRoot + "_" + str(nbproc)
+ MESSAGE( "FindOrStartMPIContainer" + theComputer + theMPIContainer )
+ aMPIContainer = self.FindContainer( theComputer + "/" + theMPIContainer )
+ if aMPIContainer is None :
+ if (theMPIContainerRoot == "MPIFactoryServer") | (theMPIContainerRoot == "MPIFactoryServerPy") :
+ if theComputer == os.getenv("HOSTNAME") :
+ rshstr = ""
+ else :
+ rshstr = "rsh -n " + theComputer + " "
+ path = self.ComputerPath( theComputer )
+## if path != "" :
+## rshstr = rshstr + path + "/../bin/salome/"
+## else :
+## rshstr = rshstr + os.getenv( "KERNEL_ROOT_DIR" ) + "/bin/"
+# rshstr = rshstr + os.getenv( "PWD" ) + "/"
+ if theMPIContainerRoot == "MPIFactoryServer" :
+ rshstr = rshstr + "mpirun -np " + str(nbproc) + " " + path + "SALOME_MPIContainer "
+ else :
+ rshstr = rshstr + path + "SALOME_MPIContainerPy.py '"
+ rshstr = rshstr + theMPIContainer + " -"
+ omniORBcfg = os.getenv( "OMNIORB_CONFIG" )
+# omniORBcfg = os.getenv( "HOME" ) + "/.omniORB.cfg"
+ file = os.open( omniORBcfg , os.O_RDONLY )
+ ORBInitRef = os.read(file,132)
+ if ORBInitRef[len(ORBInitRef)-1] == '\n' :
+ ORBInitRef,bsn = ORBInitRef.split('\n')
+ os.close( file )
+ rshstr = rshstr + ORBInitRef
+ if theMPIContainerRoot == "MPIFactoryServerPy" :
+ rshstr = rshstr + "'"
+ rshstr = rshstr + " > /tmp/" + theMPIContainer + "_"
+ rshstr = rshstr + theComputer
+ rshstr = rshstr + ".log 2>&1 &"
+ os.system( rshstr )
+ MESSAGE( "FindOrStartMPIContainer" + rshstr + " done" )
+ else :
+ if theMPIContainer.find('Py') == -1 :
+ aMPIContainer = self.FindContainer( theComputer + "/" + "MPIFactoryServer_" + str(nbproc) )
+ else :
+ aMPIContainer = self.FindContainer( theComputer + "/" + "MPIFactoryServerPy_" + str(nbproc) )
+ aMPIContainer = aMPIContainer.start_impl( theMPIContainer )
+
+ count = 21
+ while aMPIContainer is None :
+ time.sleep(1)
+ count = count - 1
+ MESSAGE( str(count) + ". Waiting for " + theComputer + "/" + theMPIContainer )
+ aMPIContainer = self.FindContainer( theComputer + "/" + theMPIContainer )
+ if count == 0 :
+ return aMPIContainer
+
+ return aMPIContainer
+ #os.system("rsh -n dm2s0017 /export/home/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515")
+
+ #-------------------------------------------------------------------------
+
+ def FindOrLoadMPIComponent(self, MPIcontainerName, MPIcomponentName, nbproc):
+
+ theComputer,theMPIContainerRoot = self.ContainerName( MPIcontainerName )
+ theMPIContainer = theMPIContainerRoot + "_" + str(nbproc)
+ name = [CosNaming.NameComponent(theComputer,"dir"),
+ CosNaming.NameComponent(theMPIContainer,"dir"),
+ CosNaming.NameComponent(MPIcomponentName,"object")]
+ try:
+ obj = self._containerRootContext.resolve(name)
+ except CosNaming.NamingContext.NotFound, ex:
+ MESSAGE( "component " + MPIcomponentName + " not found, trying to load" )
+ MPIcontainer = self.FindContainer(theComputer + "/" + theMPIContainer)
+ if MPIcontainer is None:
+ MESSAGE( "MPIcontainer " + theComputer + "/" + theMPIContainer + " not found in Naming Service, trying to start" )
+ if (theMPIContainerRoot != "MPIFactoryServer") & (theMPIContainerRoot != "MPIFactoryServerPy") :
+ if theMPIContainer.find('Py') == -1 :
+ theMPIFactorycontainerRoot = "MPIFactoryServer"
+ theMPIFactorycontainer = theMPIFactorycontainerRoot + "_" + str(nbproc)
+ else :
+ theMPIFactorycontainerRoot = "MPIFactoryServerPy"
+ theMPIFactorycontainer = theMPIFactorycontainerRoot + "_" + str(nbproc)
+ MPIFactorycontainer = self.FindContainer(theComputer + "/" + theMPIFactorycontainer)
+ if MPIFactorycontainer is None:
+ MESSAGE( "MPIcontainer " + theComputer + "/" + theMPIFactorycontainer + " not found in Naming Service, trying to start" )
+ MPIFactorycontainer = self.FindOrStartMPIContainer(theComputer,theMPIFactorycontainerRoot,nbproc)
+ else:
+ MPIFactorycontainer = self.FindOrStartMPIContainer(theComputer,theMPIContainerRoot,nbproc)
+ if MPIFactorycontainer != None :
+ MPIcontainer = self.FindOrStartMPIContainer(theComputer,theMPIContainerRoot,nbproc)
+
+ if MPIcontainer != None:
+ compoinfo = self._catalog.GetComponent(MPIcomponentName)
+ if compoinfo is None:
+ MESSAGE( "MPIcomponent " + MPIcomponentName + " not found in Module Catalog" )
+ else:
+ try:
+ machineName = theComputer
+ path = compoinfo.GetPathPrefix(machineName) + "/"
+ except SALOME_ModuleCatalog.NotFound, ex:
+ MESSAGE( "machine " + machineName + " not found in Module Catalog" )
+ MESSAGE( "trying localhost" )
+ try:
+ path = compoinfo.GetPathPrefix("localhost") + "/"
+ except SALOME_ModuleCatalog.NotFound, ex:
+ path = ""
+ implementation = path + "lib" + MPIcomponentName + "Engine.so"
+ MESSAGE( "Trying to load " + implementation )
+ try:
+ MPIcomponent = MPIcontainer.load_impl(MPIcomponentName, implementation)
+ MESSAGE( "component " + MPIcomponent._get_instanceName() + " launched !" )
+ return MPIcomponent
+ except:
+ MESSAGE( "component " + MPIcomponentName + " NOT launched !" )
+
+ else:
+ try:
+ MPIcomponent = obj._narrow(Engines.Component)
+ if MPIcomponent is None:
+ MESSAGE( MPIcomponentName + " is not a component !" )
+ else:
+ MESSAGE( "MPIcomponent " + MPIcomponent._get_instanceName() + " found !" )
+ return MPIcomponent
+ except:
+ MESSAGE( MPIcomponentName + " failure" )
+ return None
--- /dev/null
+import salome
+from MPILifeCycleCORBA import *
+
+# create an LifeCycleCORBA instance
+lcc = MPILifeCycleCORBA(salome.orb)
--- /dev/null
+#==============================================================================
+# File : Makefile.in
+# Created : lun jui 2 20:32:24 CEST 2001
+# Author : Paul RASCLE, EDF - Marc Tajchman, CEA
+# Project : SALOME
+# Copyright : EDF 2001
+# $Header$
+#==============================================================================
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+EXPORT_HEADERS = SALOME_MPILifeCycleCORBA.hxx
+
+EXPORT_PYSCRIPTS = MPIsalome.py MPILifeCycleCORBA.py
+
+# Libraries targets
+
+LIB = libSalomeMPILifeCycleCORBA.la
+LIB_SRC = SALOME_MPILifeCycleCORBA.cxx
+LIB_CLIENT_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl \
+ SALOME_Component.idl SALOME_ModuleCatalog.idl
+
+# Executables targets
+BIN = TestMPILifeCycleCORBA
+BIN_SRC =
+BIN_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl
+
+LDFLAGS += -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace
+
+@CONCLUDE@
+
--- /dev/null
+//=============================================================================
+// File : SALOME_MPILifeCycleCORBA.cxx
+// Created : mar jui 03 14:55:50 CEST 2003
+// Author : Bernard SECHER CEA
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#include <iostream>
+#include <fstream>
+#include <strstream>
+#include <iomanip>
+#include <stdio.h>
+#include <string.h>
+
+#include "OpUtil.hxx"
+#include "utilities.h"
+
+#include <ServiceUnreachable.hxx>
+
+#include "SALOME_MPILifeCycleCORBA.hxx"
+#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
+#include "SALOME_NamingService.hxx"
+using namespace std;
+
+SALOME_MPILifeCycleCORBA::SALOME_MPILifeCycleCORBA() :
+ SALOME_LifeCycleCORBA()
+{
+ _MPIFactoryServer = NULL;
+}
+
+SALOME_MPILifeCycleCORBA::SALOME_MPILifeCycleCORBA(SALOME_NamingService *ns) :
+ SALOME_LifeCycleCORBA(ns)
+{
+ _MPIFactoryServer = NULL;
+}
+
+SALOME_MPILifeCycleCORBA::~SALOME_MPILifeCycleCORBA()
+{
+}
+
+Engines::MPIContainer_var SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer(
+ const string theComputer ,
+ const string theMPIContainerRoot,
+ const int nbproc)
+{
+ char nbp[1024];
+
+ sprintf(nbp,"_%d",nbproc);
+ string theMPIContainer = theMPIContainerRoot + nbp;
+ string aComputerContainer = theComputer + "/" + theMPIContainer;
+
+ SCRUTE( aComputerContainer ) ;
+ SCRUTE( theComputer ) ;
+ SCRUTE( theMPIContainer ) ;
+
+ // On recherche si le containe rest deja lance
+ Engines::MPIContainer_var aMPIContainer = Engines::MPIContainer::_narrow(FindContainer(aComputerContainer.c_str()));
+
+ //On a trouve le container: on renvoie une poigne dessus
+ if ( !CORBA::is_nil( aMPIContainer ) ) {
+ MESSAGE("MPIContainer " << aComputerContainer << " found!!!");
+ return aMPIContainer ;
+ }
+ // On a pas trouve le container
+ else {
+ MESSAGE("MPIContainer " << aComputerContainer << " not found!!!");
+ // On recherche un container generique
+ bool pyCont = false ;
+ int len = theMPIContainer.length() ;
+ if ( !strcmp( &theMPIContainerRoot.c_str()[len-2] , "Py" ) ) {
+ pyCont = true ;
+ }
+ string MPIFactoryServer = theComputer ;
+ if ( pyCont ) {
+ MPIFactoryServer += "/MPIFactoryServerPy" ;
+ }
+ else {
+ MPIFactoryServer += "/MPIFactoryServer" ;
+ }
+ MPIFactoryServer += nbp;
+ Engines::MPIContainer_var aMPIFactoryServer = Engines::MPIContainer::_narrow(FindContainer( MPIFactoryServer.c_str()));
+
+ // On n'a pas trouve le container generique: on lance le container demande
+ if ( CORBA::is_nil( aMPIFactoryServer ) ) {
+// rsh -n ikkyo /export/home/rahuel/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515 &
+ string rsh( "" ) ;
+ if ( theComputer!= GetHostname() ) {
+ rsh += "rsh -n " ;
+ rsh += theComputer ;
+ rsh += " " ;
+ }
+ string path = ComputerPath( theComputer.c_str() ) ;
+ SCRUTE( path ) ;
+ // rsh += "runSession " ;
+ if ( pyCont ) {
+ MESSAGE("MPI python container not implemented");
+ return Engines::MPIContainer::_nil();
+// rsh += "SALOME_MPIContainerPy.py " ;
+// rsh += "MPIFactoryServerPy -" ;
+ }
+ else {
+ sprintf(nbp,"mpirun -np %d %sSALOME_MPIContainer ",nbproc,path.c_str());
+ rsh += nbp;
+ rsh += theMPIContainer +" -" ;
+ }
+ string omniORBcfg( getenv( "OMNIORB_CONFIG" ) ) ;
+ ifstream omniORBfile( omniORBcfg.c_str() ) ;
+ char ORBInitRef[12] ;
+ char nameservice[132] ;
+ omniORBfile >> ORBInitRef ;
+ rsh += ORBInitRef ;
+ rsh += " " ;
+ omniORBfile >> nameservice ;
+ omniORBfile.close() ;
+ char * bsn = strchr( nameservice , '\n' ) ;
+ if ( bsn ) {
+ bsn[ 0 ] = '\0' ;
+ }
+ rsh += nameservice ;
+ if ( pyCont ) {
+ rsh += " > /tmp/MPIFactoryServerPy_" ;
+ }
+ else {
+ rsh += " > /tmp/MPIFactoryServer_" ;
+ }
+ sprintf(nbp,"%d_",nbproc);
+ rsh += nbp;
+ rsh += theComputer ;
+ rsh += ".log 2>&1 &" ;
+ SCRUTE( rsh );
+ int status = system( rsh.c_str() ) ;
+ if (status == -1) {
+ INFOS("SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer rsh failed (system command status -1)") ;
+ }
+ else if (status == 217) {
+ INFOS("SALOME_MPILifeCycleCORBA::FindOrStartContainer rsh failed (system command status 217)") ;
+ }
+ else {
+ int count = 21 ;
+ while ( CORBA::is_nil( aMPIFactoryServer ) && count ) {
+ sleep( 1 ) ;
+ count-- ;
+ if ( count != 10 )
+ MESSAGE( count << ". Waiting for FactoryServer on " << theComputer)
+ aMPIFactoryServer = Engines::MPIContainer::_narrow(FindContainer( MPIFactoryServer.c_str()));
+ }
+ if ( CORBA::is_nil( aMPIFactoryServer ) ) {
+ INFOS("SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer rsh failed") ;
+ }
+ else if ( strcmp( theComputer.c_str() , GetHostname().c_str() ) ) {
+ _MPIFactoryServer = aMPIFactoryServer ;
+ }
+ }
+ }
+ // On a trouve le container generique distant: on se sert de lui
+ // pour lancer un nouveau container MPI
+ // a revoir...
+ if ( !CORBA::is_nil( aMPIFactoryServer ) ) {
+ if ( strcmp( theMPIContainer.c_str() , "MPIFactoryServer" ) ||
+ strcmp( theMPIContainer.c_str() , "MPIFactoryServerPy" ) ) {
+ MESSAGE("MPI Container not found ! trying to start " << aComputerContainer);
+ Engines::MPIContainer_var myMPIContainer = aMPIFactoryServer->start_MPIimpl( theMPIContainer.c_str(), nbproc ) ;
+ if ( !CORBA::is_nil( myMPIContainer ) ) {
+ MESSAGE("MPIContainer " << aComputerContainer << " started");
+ return myMPIContainer ;
+ }
+ else {
+ MESSAGE("MPIContainer " << aComputerContainer << " NOT started");
+ }
+ }
+ else {
+ MESSAGE("MPIContainer " << aComputerContainer << " started");
+ return aMPIFactoryServer ;
+ }
+ }
+ }
+ return Engines::MPIContainer::_nil();
+}
+
+// Engines::Component_var SALOME_MPILifeCycleCORBA::FindOrLoad_MPIComponent
+// (const char *MPIcontainerName,
+// const char *MPIcomponentName,
+// const char *implementation,
+// const int nbproc)
+// {
+// BEGIN_OF("FindOrLoad_MPIComponent(1)");
+// ASSERT(_NS != NULL);
+// string theComputer ;
+// string theMPIContainer ;
+// string theComputerContainer = ContainerName( MPIcontainerName ,
+// &theComputer ,
+// &theMPIContainer ) ;
+// Engines::MPIContainer_var cont = FindOrStartMPIContainer( theComputerContainer ,
+// theComputer ,
+// theMPIContainer,
+// nbproc) ;
+// // ASSERT(!CORBA::is_nil(cont));
+
+// string path( theComputerContainer );
+// path = path + "/";
+// path = path + MPIcomponentName;
+// SCRUTE(path);
+// try
+// {
+// CORBA::Object_var obj = _NS->Resolve(path.c_str());
+// if (CORBA::is_nil(obj))
+// {
+// MESSAGE("MPIComponent not found ! trying to load " << path);
+// Engines::Component_var compo
+// = cont->load_impl(MPIcomponentName, implementation);
+// // ASSERT(!CORBA::is_nil(compo));
+// MESSAGE("MPIComponent launched !" << path);
+// return compo;
+// }
+// else
+// {
+// MESSAGE("MPIComponent found !" << path);
+// Engines::Component_var compo = Engines::Component::_narrow(obj);
+// // ASSERT(!CORBA::is_nil(compo));
+// try
+// {
+// compo->ping();
+// }
+// catch (CORBA::COMM_FAILURE&)
+// {
+// INFOS("Caught CORBA::SystemException CommFailure. Engine "
+// << path << "does not respond" );
+// }
+// return compo;
+// }
+// }
+// catch (ServiceUnreachable&)
+// {
+// INFOS("Caught exception: Naming Service Unreachable");
+// }
+// catch (...)
+// {
+// INFOS("Caught unknown exception.");
+// }
+// return Engines::Component::_nil();
+// }
+
+Engines::Component_var SALOME_MPILifeCycleCORBA::FindOrLoad_MPIComponent
+ (const char *MPIcontainerName,
+ const char *MPIcomponentName,
+ const int nbproc)
+{
+
+ char nbp[1024];
+
+ sprintf(nbp,"_%d",nbproc);
+// BEGIN_OF("FindOrLoad_Component(2)");
+ ASSERT(_NS != NULL);
+ string theComputer ;
+ string theMPIContainerRoot ;
+ string theMPIContainer;
+ string theComputerContainer = ContainerName( MPIcontainerName ,
+ &theComputer ,
+ &theMPIContainerRoot ) ;
+ theMPIContainer = theMPIContainerRoot + nbp;
+ Engines::MPIContainer_var cont = FindOrStartMPIContainer( theComputer ,
+ theMPIContainerRoot,
+ nbproc ) ;
+
+ if ( CORBA::is_nil( cont ) ) {
+ MESSAGE("MPIContainer not found ! " << theComputerContainer );
+ return Engines::Component::_nil();
+ }
+
+// char * machine = cont->machineName() ;
+ const char * machine = theComputer.c_str() ;
+
+ string path( theComputerContainer );
+ path += nbp;
+ path += "/";
+ path += MPIcomponentName;
+ SCRUTE(path);
+
+ try {
+ CORBA::Object_var obj = _NS->Resolve(path.c_str());
+ if ( CORBA::is_nil( obj ) ) {
+ MESSAGE("MPIComponent not found ! trying to load " << path);
+ CORBA::Object_var obj2 = _NS->Resolve("/Kernel/ModulCatalog");
+ SALOME_ModuleCatalog::ModuleCatalog_var Catalog =
+ SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj2);
+
+ SALOME_ModuleCatalog::Acomponent_ptr compoInfo =
+ Catalog->GetComponent(MPIcomponentName);
+ if (CORBA::is_nil (compoInfo))
+ {
+ INFOS("Catalog Error : Component not found in the catalog")
+ return Engines::Component::_nil();
+// exit (-1);
+ }
+
+ string path;
+ try
+ {
+ path = compoInfo->GetPathPrefix( machine ) ;
+ path += "/" ;
+ }
+ catch (SALOME_ModuleCatalog::NotFound&)
+ {
+ MESSAGE("GetPathPrefix(" << machine << ") not found!"
+ << "trying localhost");
+ try {
+ path = compoInfo->GetPathPrefix("localhost") ;
+ path += "/" ;
+ }
+ catch (SALOME_ModuleCatalog::NotFound&) {
+ MESSAGE("GetPathPrefix(localhost) not found!") ;
+ path = "" ;
+ }
+ }
+
+ SCRUTE(path);
+ string implementation(path);
+ implementation += "lib";
+ implementation += MPIcomponentName;
+ implementation += "Engine.so";
+
+ Engines::Component_var compo
+ = cont->load_impl(MPIcomponentName, implementation.c_str());
+
+// ASSERT(!CORBA::is_nil(compo));
+// MESSAGE("Component launched !" << path);
+ return compo;
+ }
+ else
+ {
+ MESSAGE("MPIComponent found !" << path);
+ Engines::Component_var compo = Engines::Component::_narrow(obj);
+ // ASSERT(!CORBA::is_nil(compo));
+ try
+ {
+ string instanceName = compo->instanceName();
+ }
+ catch (CORBA::COMM_FAILURE&)
+ {
+ INFOS("Caught CORBA::SystemException CommFailure. Engine "
+ << path << "does not respond" );
+ }
+ return compo;
+ }
+ }
+ catch (ServiceUnreachable&)
+ {
+ INFOS("Caught exception: Naming Service Unreachable");
+ }
+ catch (...)
+ {
+ INFOS("Caught unknown exception.");
+ }
+ return Engines::Component::_nil();
+}
--- /dev/null
+//=============================================================================
+// File : SALOME_MPILifeCycleCORBA.hxx
+// Created : mar jui 03 14:55:45 CEST 2003
+// Author : Bernard SECHER, CEA
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#ifndef _SALOME_MPILIFECYCLECORBA_HXX_
+#define _SALOME_MPILIFECYCLECORBA_HXX_
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string>
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SALOME_MPIContainer)
+#include "SALOME_LifeCycleCORBA.hxx"
+
+class SALOME_MPILifeCycleCORBA : public SALOME_LifeCycleCORBA
+{
+public:
+ SALOME_MPILifeCycleCORBA();
+ SALOME_MPILifeCycleCORBA(SALOME_NamingService *ns);
+ virtual ~SALOME_MPILifeCycleCORBA();
+
+// Engines::Component_var FindOrLoad_MPIComponent(const char *MPIcontainerName,
+// const char *MPIcomponentName,
+// const char *implementationPath,
+// const int nbproc);
+ Engines::Component_var FindOrLoad_MPIComponent(const char *MPIcontainerName,
+ const char *MPIcomponentName,
+ const int nbproc);
+protected:
+ Engines::MPIContainer_var _MPIFactoryServer ;
+
+private:
+ Engines::MPIContainer_var FindOrStartMPIContainer(const string theComputer ,
+ const string theMPIContainerRoot,
+ const int nbproc) ;
+
+} ;
+
+#endif
--- /dev/null
+// using namespace std;
+//=============================================================================
+// File : TestMPILifeCycleCORBA.cxx
+// Created : mer jui 4 13:11:27 CEST 2003
+// Author : Bernard SECHER, 2003
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#include "utilities.h"
+#include <iostream>
+#include <unistd.h>
+#include <string>
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SALOME_MPIContainer)
+#include CORBA_CLIENT_HEADER(SALOME_TestMPIComponent)
+
+# include "Utils_ORB_INIT.hxx"
+# include "Utils_SINGLETON.hxx"
+#include "SALOME_NamingService.hxx"
+#include "SALOME_MPILifeCycleCORBA.hxx"
+#include "OpUtil.hxx"
+
+int main (int argc, char * argv[])
+{
+
+ try{
+ // Initializing omniORB
+ CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+
+ // Obtain a reference to the root POA
+ CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") ;
+ PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) ;
+
+ // Use Name Service to find container
+ SALOME_NamingService NS(orb);
+
+ SALOME_MPILifeCycleCORBA LCC(&NS);
+
+ Engines::Component_var comp = LCC.FindOrLoad_MPIComponent("MPIFactoryServer","TestMPIComponent",2);
+
+ Engines::TestMPIComponent_var m1 = Engines::TestMPIComponent::_narrow(comp);
+ if(CORBA::is_nil(m1)){
+ INFOS("echec recuperation poignee composant");
+ }
+ else{
+
+ INFOS("Lancement de coucou");
+ m1->Coucou(1L);
+ }
+
+ orb->destroy();
+ }
+ catch(CORBA::COMM_FAILURE& ex) {
+ INFOS("Caught system exception COMM_FAILURE -- unable to contact the object.");
+ }
+ catch(CORBA::SystemException&) {
+ INFOS("Caught a CORBA::SystemException.");
+ }
+ catch(CORBA::Exception&) {
+ INFOS("Caught CORBA::Exception.");
+ }
+ catch(...) {
+ INFOS("Caught unknown exception.");
+ }
+
+ return 0;
+}
// File : msg2qm.cxx
// Module : SALOME
-using namespace std;
/****************************************************************************
** $Id$
**
#include <stdio.h>
#include <stdlib.h>
+using namespace std;
static QString* defaultScope = 0;
Session SALOME_SWIG TOOLSGUI SALOME_PY \
RegistryDisplay ModuleGenerator SALOME_PYQT Loader
+ifeq (@WITHMPI@,yes)
+ SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer
+endif
+
ifeq (@WITHMPICH@,yes)
- SUBDIRS+= MPIContainer
+ SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer
endif
@MODULE@
BIN_SERVER_IDL = SALOME_ModuleCatalog.idl
CPPFLAGS+= $(QT_MT_INCLUDES)
-CXXFLAGS+= -ftemplate-depth-42
+CXXFLAGS+= @CXXTMPDPTHFLAGS@
LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
@CONCLUDE@
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
+using namespace std;
//----------------------------------------------------------------------
// Function : SALOME_ModuleCatalog_AcomponentImpl
// File : SALOME_ModuleCatalog_Client.cxx
// Module : SALOME
-using namespace std;
/* $Header$ */
#include <iostream.h>
#include "SALOME_ModuleCatalog.hh"
#include <string>
#include "utilities.h"
+using namespace std;
int main(int argc,char **argv)
{
// Module : SALOME
// $Header$
-using namespace std;
#define WRITE_CATA_COMPONENT
#include "SALOME_ModuleCatalog_Handler.hxx"
+using namespace std;
//----------------------------------------------------------------------
// Function : SALOME_ModuleCatalog_Handler
// Module : SALOME
/* $Header$ */
-
-#include <iostream.h>
+#include <iostream>
#include "SALOME_NamingService.hxx"
#include "SALOME_ModuleCatalog_impl.hxx"
#include "utilities.h"
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_ModuleCatalog_impl.hxx"
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
#include <fstream>
#include <qstringlist.h>
#include <qfileinfo.h>
+using namespace std;
static const char* SEPARATOR = ":";
// Author : Francis KLOSS
// Module : SALOME
-using namespace std;
#include "NOTIFICATION_Swig.hxx"
+using namespace std;
// Swig notification supplier
// --------------------------
// Author : Francis KLOSS
// Module : SALOME
-using namespace std;
#include "NOTIFICATION.hxx"
+using namespace std;
class NOTIFICATION_Supplier_Swig {
public:
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_NamingService.hxx"
#include "ServiceUnreachable.hxx"
#include <iostream>
#include <cstring>
+using namespace std;
//----------------------------------------------------------------------
/*! Function : SALOME_NamingService
// File : ServiceUnreachable.cxx
// Module : SALOME
-using namespace std;
#include "ServiceUnreachable.hxx"
ServiceUnreachable::ServiceUnreachable( void ): SALOME_Exception( "ServiceUnreachable" )
// Author : Laurent DADA / Francis KLOSS
// Module : SALOME
-using namespace std;
#include "NOTIFICATION.hxx"
-using namespace std;
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
+using namespace std;
CosNA_EventChannel_ptr NOTIFICATION_channel() {
ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance(); ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
// Author : Laurent DADA / Francis KLOSS
// Module : SALOME
-using namespace std;
#include "NOTIFICATION.hxx"
+using namespace std;
NOTIFICATION_Consumer::NOTIFICATION_Consumer():
proxy_supplier(0),
// Author : Laurent DADA / Francis KLOSS
// Module : SALOME
-using namespace std;
#include "NOTIFICATION.hxx"
+using namespace std;
long NOTIFICATION_Supplier::_stamp = 0;
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_AISObject.ixx"
+using namespace std;
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_AISShape.ixx"
+using namespace std;
SALOME_AISShape::SALOME_AISShape(const TopoDS_Shape& shape): AIS_Shape(shape) {
}
#ifndef _Handle_SALOME_InteractiveObject_HeaderFile
#include "Handle_SALOME_InteractiveObject.hxx"
#endif
-#include <vector.h>
+#include <vector>
class SALOME_Transform;
class SALOME_TransformFilter;
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class SALOME_InteractiveObject SALOME_InteractiveObject.hxx
\brief ...
*/
#include "SALOME_InteractiveObject.ixx"
+using namespace std;
SALOME_InteractiveObject::SALOME_InteractiveObject()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "OCCViewer.h"
#include "OCCViewer_ViewFrame.h"
+using namespace std;
QAD_ViewFrame* OCCViewer::createView(QAD_RightFrame* parent)
{
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class OCCViewer_AISSelector OCCViewer_AISSelector.h
\brief Selector for AIS interactive context.
*/
#include "OCCViewer_AISSelector.h"
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class OCCViewer_Selector OCCViewer_Selector.h
\brief Base class for object selection in Open CASCADE Viewer.
*/
#include "OCCViewer_Selector.h"
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "OCCViewer_VService.h"
// Open CASCADE Includes
#include <Xdps_Driver.hxx>
#include <Xw_TypeOfMapping.hxx>
#endif
+using namespace std;
// For 2d
#define LOPTIM
// Module : SALOME
// $Header$
-using namespace std;
#include "OCCViewer_ViewFrame.h"
#include "OCCViewer_Viewer3d.h"
#include "OCCViewer_ViewPort.h"
#include <V3d_View.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Visual3d_View.hxx>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include <stdlib.h>
#if !defined WNT
#include <qpixmap.h>
#include <qintdict.h>
+using namespace std;
/* XPM */
const char* imageZoomCursor[] = {
// Module : SALOME
// $Header$
-using namespace std;
#include "OCCViewer_ViewPort3d.h"
#include "QAD.h"
#if !defined WNT
#include <Xw.hxx>
#endif
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class OCCViewer_Viewer3d OCCViewer_Viewer3d.h
\brief Open CASCADE Viewer 3D with viewport 3D and selection.
#include <Geom_Axis2Placement.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
+using namespace std;
/*!
Constructor
// File : qsplitterP.cxx
// Module : SALOME
-using namespace std;
/****************************************************************************
** $Id$
**
#include <qobjectlist.h>
#include <qapplication.h> //sendPostedEvents
+using namespace std;
#define SPLITTER_ICON_WIDTH 10
#define SPLITTER_ICON_HEIGHT 12
// Module : SALOME
// $Header$
-using namespace std;
#include "qworkspaceP.h"
#include <qapplication.h>
#include <private/qapplication_p.h>
#include <private/qinternal_p.h>
+using namespace std;
#define BUTTON_WIDTH 16
#define BUTTON_HEIGHT 14
// Module : SALOME
// $Header$
-using namespace std;
#include "Plot2d_Curve.h"
#include "utilities.h"
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "Plot2d_CurveContainer.h"
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
-using namespace std;
# include "Utils_ORB_INIT.hxx"
# include "RegistryConnexion.hxx"
# include "SALOME_NamingService.hxx"
// Module : SALOME
// $Header$
-using namespace std;
-using namespace std;
# include "RegistryService.hxx"
# include "OpUtil.hxx"
# include "utilities.h"
+using namespace std;
extern "C"
{
const char *_SessionName ;
int _Compteur ;
- map<int,client_infos *> _reg ;
- map<int,client_infos *> _fin ;
+ std::map<int,client_infos *> _reg ;
+ std::map<int,client_infos *> _fin ;
- Registry::AllInfos* makeseq(map<int,client_infos *> &mymap );
+ Registry::AllInfos* makeseq(std::map<int,client_infos *> &mymap );
} ;
// Module : SALOME
// $Header$
-#include <stdlib.h>
-#include <iostream.h>
-#include <fstream.h>
+# include <stdlib.h>
+# include <iostream>
+# include <fstream>
extern "C"
{
#endif
using namespace std;
+//#define CHECKTIME
+#ifdef CHECKTIME
+#include <Utils_Timer.hxx>
+#endif
+
int main( int argc , char **argv )
{
BEGIN_OF( argv[0] )
// Module : SALOME
// $Header$
-using namespace std;
# include "HelpWindow.hxx"
# include "utilities.h"
# include <qpushbutton.h>
# include <qtextstream.h>
# include <qfile.h>
+using namespace std;
HelpWindow::HelpWindow(QWidget* parent, const char* name )
: QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
// Module : SALOME
// $Header$
-using namespace std;
# include <qpushbutton.h>
# include <qlistview.h>
# include <qtabwidget.h>
# include "RegWidget.hxx"
# include "HelpWindow.hxx"
# include "IntervalWindow.hxx"
+using namespace std;
typedef int PIXELS;
RegWidget* RegWidget::myRegWidgetPtr = 0;
// Module : SALOME
// $Header$
-using namespace std;
# include "RegWidget.hxx"
# include "utilities.h"
+using namespace std;
extern "C"
{
// File : SALOME_RessourcesCatalog_Client.cxx
// Module : SALOME
-using namespace std;
/* $Header$ */
-#include <iostream.h>
+#include <iostream>
#include "SALOME_NamingService.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_RessourcesCatalog)
#include <string>
#include "utilities.h"
+using namespace std;
int main(int argc,char **argv)
{
// Module : SALOME
//$Header$
-using namespace std;
#define WRITE_RESSOURCES_TYPE
#include "SALOME_RessourcesCatalog_Handler.hxx"
+using namespace std;
//----------------------------------------------------------------------
//Function : SALOME_RessourcesCatalog_Handler
// Author : Estelle Deville
// Module : SALOME
-using namespace std;
#include "SALOME_RessourcesCatalog_impl.hxx"
#include <fstream>
+using namespace std;
//----------------------------------------------------------------------
// Function : SALOME_RessourcesCatalogImpl
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeComment_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeComment_i::Value()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeDrawable_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Boolean SALOMEDS_AttributeDrawable_i::IsDrawable() {
return (Handle(SALOMEDS_DrawableAttribute)::DownCast(_myAttr)->Get() == 1);
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeExpandable_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Boolean SALOMEDS_AttributeExpandable_i::IsExpandable() {
return (Handle(SALOMEDS_ExpandableAttribute)::DownCast(_myAttr)->Get() == 1);
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeExternalFileDef_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeExternalFileDef_i::Value()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeFileType_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeFileType_i::Value()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeIOR_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
#include "SALOMEDS_Study_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeIOR_i::Value()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeInteger_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Long SALOMEDS_AttributeInteger_i::Value() {
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_AttributeLocalID_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Long SALOMEDS_AttributeLocalID_i::Value() {
return Handle(SALOMEDS_LocalIDAttribute)::DownCast(_myAttr)->Get();
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeName_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeName_i::Value() {
TCollection_ExtendedString S = Handle(TDataStd_Name)::DownCast(_myAttr)->Get();
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeOpened_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Boolean SALOMEDS_AttributeOpened_i::IsOpened() {
return (Handle(SALOMEDS_OpenedAttribute)::DownCast(_myAttr)->Get() == 1);
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributePersistentRef_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributePersistentRef_i::Value()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributePixMap_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TCollection_AsciiString.hxx>
+using namespace std;
CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap() {
TCollection_ExtendedString S = Handle(SALOMEDS_PixMapAttribute)::DownCast(_myAttr)->Get();
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributePythonObject_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include <TColStd_HArray1OfCharacter.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) {
CheckLocked();
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeReal_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Double SALOMEDS_AttributeReal_i::Value() {
return Handle(TDataStd_Real)::DownCast(_myAttr)->Get();
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeSelectable_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
CORBA::Boolean SALOMEDS_AttributeSelectable_i::IsSelectable() {
return (Handle(SALOMEDS_SelectableAttribute)::DownCast(_myAttr)->Get() == 1);
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfInteger.hxx>
-
+using namespace std;
void SALOMEDS_AttributeSequenceOfInteger_i::Assign(const SALOMEDS::LongSeq& other)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfReal.hxx>
+using namespace std;
void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeStudyProperties_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfExtendedString.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
+using namespace std;
#define CREATION_MODE_NOTDEFINED 0
#define CREATION_MODE_SCRATCH 1
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeTableOfInteger_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfInteger.hxx>
#include <strstream>
#include <string>
+using namespace std;
#define SEPARATOR '\1'
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeTableOfReal_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HSequenceOfReal.hxx>
#include <strstream>
#include <string>
+using namespace std;
#define SEPARATOR '\1'
// Author : Sergey Ruin
// Module : SALOME
-using namespace std;
#include <TCollection_ExtendedString.hxx>
#include <TCollection_AsciiString.hxx>
#include <strstream>
#include <string>
+using namespace std;
#define SEPARATOR '\1'
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_AttributeTarget_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TDF_LabelList.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
+using namespace std;
void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject) {
TDF_Label aLabel;
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeTextColor_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HArray1OfReal.hxx>
+using namespace std;
SALOMEDS::Color SALOMEDS_AttributeTextColor_i::TextColor() {
SALOMEDS::Color TextColor;
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_AttributeTextHighlightColor_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TColStd_HArray1OfReal.hxx>
+using namespace std;
SALOMEDS::Color SALOMEDS_AttributeTextHighlightColor_i::TextHighlightColor() {
SALOMEDS::Color TextHighlightColor;
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_AttributeTreeNode_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include "utilities.h"
+using namespace std;
static Handle(TDataStd_TreeNode) GetNode(SALOMEDS::AttributeTreeNode_ptr value,
const Handle(TDataStd_TreeNode)& aNode) {
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_AttributeUserID_i.hxx"
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
+using namespace std;
char* SALOMEDS_AttributeUserID_i::Value() {
char aGUID[40];
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_ChildIterator_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include "utilities.h"
-
-
+using namespace std;
//============================================================================
/*! Function : constructor
// Module : SALOME
// $Header$
-using namespace std;
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
#include "SALOMEDS_StudyManager_i.hxx"
#include "utilities.h"
#include "SALOMEDS_AttributeName_i.hxx"
+using namespace std;
//============================================================================
/*! Function :
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
#ifndef _Standard_NoSuchObject_HeaderFile
#ifndef _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
#include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
#endif
+using namespace std;
#define TheKey TCollection_ExtendedString
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
#ifndef _Standard_TypeMismatch_HeaderFile
#ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
#endif
+using namespace std;
SALOMEDS_DataMapNodeOfDataMapStringLabel::~SALOMEDS_DataMapNodeOfDataMapStringLabel() {}
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_DataMapStringLabel.hxx"
#ifndef _Standard_DomainError_HeaderFile
#ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
#endif
+using namespace std;
#define TheKey TCollection_ExtendedString
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_DrawableAttribute.ixx"
#include <TDataStd_Integer.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_ExpandableAttribute.ixx"
#include <TDataStd_Integer.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_StudyBuilder_i.hxx"
+using namespace std;
void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) {
if (!_myAttr.IsNull() && _myAttr->IsValid() && !CORBA::is_nil(_myOrb)) {
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_IORAttribute.ixx"
#include <TDataStd_Comment.hxx>
#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_Study_i.hxx"
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_LocalIDAttribute.ixx"
#include <TDataStd_Integer.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_OCAFApplication.ixx"
+using namespace std;
//=======================================================================
//function : SALOMEDS_OCAFApplication
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_OpenedAttribute.ixx"
#include <TDataStd_Integer.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_PersRefAttribute.ixx"
#include <TDataStd_Comment.hxx>
#include <TCollection_ExtendedString.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_PixMapAttribute.ixx"
#include <TDataStd_Comment.hxx>
#include <TCollection_ExtendedString.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_PythonObjectAttribute.ixx"
#include <string>
+using namespace std;
const Standard_GUID& SALOMEDS_PythonObjectAttribute::GetID()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_SComponentIterator_i.hxx"
-
+using namespace std;
//============================================================================
/*! Function : constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEDS_SComponent_i.hxx"
#include "utilities.h"
-
+using namespace std;
//============================================================================
/*! Function : constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOMEDS_SObject_i.hxx"
//SALOMEDS Headers
#include "SALOMEDS_AttributeStudyProperties_i.hxx"
#include "SALOMEDS_AttributePythonObject_i.hxx"
#include <TDF_AttributeIterator.hxx>
+using namespace std;
//============================================================================
/*! Function : ReturnGUIDForAttribute
* Purpose :
*/
//============================================================================
-CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(long atag, SALOMEDS::SObject_out obj)
+CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj)
{
TDF_Label L = _lab.FindChild(atag,false);
if (L.IsNull()) return false;
#define __SALOMEDS_SOBJECT_I_H__
// std C++ headers
-#include <iostream.h>
+#include <iostream>
#include <vector>
#include <string>
char* _name;
char* _value;
char* _type;
- vector<string> _liste_ba_type;
+ std::vector<std::string> _liste_ba_type;
public:
virtual SALOMEDS::SObject_ptr GetFather() ;
virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute);
virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ;
- virtual CORBA::Boolean FindSubObject(long atag, SALOMEDS::SObject_out obj );
+ virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj );
virtual SALOMEDS::Study_ptr GetStudy() ;
virtual char* Name();
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_SelectableAttribute.ixx"
#include <TDataStd_Integer.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_SequenceOfIntegerAttribute.ixx"
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_SequenceOfRealAttribute.ixx"
#include <TDataStd_Real.hxx>
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOMEDS_Study_i.hxx"
//#include "SALOMEDS_StudyBuilder_i.hxx"
#include <HDFOI.hxx>
#include <stdlib.h>
+using namespace std;
#define USE_CASE_LABEL_TAG 2
#define DIRECTORYID 16661
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOME_LifeCycleCORBA.hxx"
#include "SALOMEDS_StudyManager_i.hxx"
#include "Utils_CorbaException.hxx"
#include <strstream>
+using namespace std;
#include <SALOME_GenericObj_i.hh>
if (!strncmp(hdf_dataset->GetName(),"AttributeTreeNode",17)) {
MESSAGE("Create a Attribute : AttributeTreeNode");
char current_strings[5][hdf_dataset->GetSize()/5];
+// char **current_strings = new (char*)[5];
+// for(int i=0;i<5;i++)
+// current_strings[i] = new char[hdf_dataset->GetSize()/5+1];
hdf_dataset->ReadFromDisk(current_strings);
MESSAGE("Create an Attribute : AttributeTreeNode");
if (!aLabel.FindAttribute(aGUID,aNode)) aNode = TDataStd_TreeNode::Set(aLabel,aGUID);
aNewNode->SetFirst(aNode);
}
+// for(int i=0;i<5;i++)
+// delete[] current_strings[i];
+// delete[] current_strings;
} else {
int size = hdf_dataset->GetSize();
// cerr << "HDFexception ! " << endl;
delete aHDFUrl;
char eStr[strlen(aUrl)+17];
+// char *eStr = new char[strlen(aUrl)+17+1];
sprintf(eStr,"Can't open file %s",aUrl);
THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
-
}
MESSAGE("Open : Creating the CORBA servant holding it... ");
// cerr << "HDFexception ! " << endl;
delete aHDFUrl;
char eStr[strlen(aUrl)+17];
+// char *eStr = new char[strlen(aUrl)+17+1];
sprintf(eStr,"Can't open file %s",aUrl);
THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM);
}
MESSAGE("attribute AttributeTreeNode with various GUID wrote on file:");
MESSAGE(aDataSetName);
delete(aDataSetName);
+// for(int i=0;i<5;i++)
+// delete[] Data[i];
+// delete[] Data;
}
}
}
// Module : SALOME
// $Header$
-using namespace std;
#include <SALOMEDS_StudyPropertiesAttribute.ixx>
+using namespace std;
const Standard_GUID& SALOMEDS_StudyPropertiesAttribute::GetID()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOMEDS_Study_i.hxx"
#include "SALOMEDS_LocalIDAttribute.hxx"
#include "SALOMEDS_PersRefAttribute.hxx"
#include "SALOMEDS_UseCaseIterator_i.hxx"
+using namespace std;
#define DIRECTORYID 16661
// Module : SALOME
// $Header$
-using namespace std;
#include <SALOMEDS_TableOfIntegerAttribute.ixx>
#include <Standard_Failure.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <string>
+using namespace std;
const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::GetID()
{
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
-Standard_EXPORT void ConvertToString(ostrstream& theStream);
-Standard_EXPORT bool RestoreFromString(istrstream& theStream);
+Standard_EXPORT void ConvertToString(std::ostrstream& theStream);
+Standard_EXPORT bool RestoreFromString(std::istrstream& theStream);
Standard_EXPORT ~SALOMEDS_TableOfIntegerAttribute();
// Module : SALOME
// $Header$
-using namespace std;
#include <SALOMEDS_TableOfRealAttribute.ixx>
#include <Standard_Failure.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx>
#include <string>
#include <stdio.h>
+using namespace std;
const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID()
{
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
-Standard_EXPORT void ConvertToString(ostrstream& theStream);
-Standard_EXPORT bool RestoreFromString(istrstream& theStream);
+Standard_EXPORT void ConvertToString(std::ostrstream& theStream);
+Standard_EXPORT bool RestoreFromString(std::istrstream& theStream);
Standard_EXPORT ~SALOMEDS_TableOfRealAttribute();
// Author : Sergey Ruin
// Module : SALOME
-using namespace std;
#include <SALOMEDS_TableOfStringAttribute.ixx>
#include <Standard_Failure.hxx>
#include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
#include <string>
#include <stdio.h>
+using namespace std;
const Standard_GUID& SALOMEDS_TableOfStringAttribute::GetID()
{
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_TargetAttribute.ixx"
#include <TDF_Reference.hxx>
#include <TDF_ListIteratorOfAttributeList.hxx>
#include "utilities.h"
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_TextColorAttribute.ixx"
+using namespace std;
//=======================================================================
//function : GetID
// Module : SALOME
// $Header:
-using namespace std;
#include "SALOMEDS_TextHighlightColorAttribute.ixx"
+using namespace std;
//=======================================================================
//function : GetID
// Author : Yves FRICAUD
// Module : SALOME
-using namespace std;
#include "SALOMEDS_UseCaseBuilder_i.hxx"
#include "SALOMEDS_AttributeComment_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include <TDataStd_ChildNodeIterator.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_ChildIterator.hxx>
+using namespace std;
#define USE_CASE_LABEL_TAG 2
#define USE_CASE_GUID "AA43BB12-D9CD-11d6-945D-0050DA506788"
// Author : Yves FRICAUD
// Module : SALOME
-using namespace std;
#include "SALOMEDS_UseCaseIterator_i.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include "utilities.h"
-
-
+using namespace std;
//============================================================================
/*! Function : constructor
// Module : SALOME
// $Header$
-using namespace std;
-using namespace std;
#include "PyInterp_PyQt.h"
#include "utilities.h"
+using namespace std;
extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l);
// Module : SALOME
// $Header$
-using namespace std;
#include "PyInterp_base.h"
#include "utilities.h"
#include <string>
#ifndef _PYINTERP_BASE_H_
#define _PYINTERP_BASE_H_
-using namespace std;
#include <iostream>
#include <Python.h>
#include <list>
#include <string>
+using namespace std;
#define TOP_HISTORY_PY "--- top of history ---"
#define BEGIN_HISTORY_PY "--- begin of history ---"
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_Application QAD_Application.h
\brief Study manager for QAD-based application.
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Failure.hxx>
+using namespace std;
static bool checkPermission(QString fileName) {
if ( QFile::exists( fileName ) ) {
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_Config QAD_Config.h
\brief Settings file management for QAD-based application.
#include <qfile.h>
#include <qregexp.h>
#include <qtextstream.h>
+using namespace std;
/*!
\class QAD_Desktop QAD_Desktop.h
\brief Main desktop of QAD-based application.
*/
-using namespace std;
# include "Utils_ORB_INIT.hxx"
# include "Utils_SINGLETON.hxx"
#include <OSD_LoadMode.hxx>
#include <OSD_Function.hxx>
#include <TCollection_AsciiString.hxx>
+using namespace std;
static const char* SEPARATOR = ":";
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_DirListDlg.h"
#include "QAD_Desktop.h"
#include "QAD_FileDlg.h"
#include <qlabel.h>
#include <qpushbutton.h>
#include <qapplication.h>
+using namespace std;
#define MIN_WIDTH 400
#define MIN_HEIGHT 200
// Module : SALOME
// $Header$
-using namespace std;
#include <qapplication.h>
#include <qdir.h>
#include <qlabel.h>
#include "QAD_FileDlg.h"
#include "QAD_MessageBox.h"
#include "QAD_Tools.h"
+using namespace std;
#define MIN_COMBO_SIZE 100
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_FileValidator.h"
#include "QAD_Application.h"
#include "QAD_Desktop.h"
#include <qfile.h>
#include <qfileinfo.h>
+using namespace std;
/* constructor */
QAD_FileValidator::QAD_FileValidator(QWidget* parent) :
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Help.h"
+using namespace std;
/*!
\class QAD_Help QAD_HelpL.h
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_HelpWindow QAD_HelpWindow.h
\brief Html browser for help.
#include <qtoolbutton.h>
#include <qcombobox.h>
#include <qfileinfo.h>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_LeftFrame.h"
#include "QAD_ObjectBrowser.h"
#include <qlayout.h>
+using namespace std;
/*!
\class QAD_LeftFrame QAD_LeftFrame.h
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ListMenuIdAction.h"
+using namespace std;
QAD_ListMenuIdAction::QAD_ListMenuIdAction(QPopupMenu* theMenu,
int id,
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ListPopupMenu.h"
+using namespace std;
/*!
Constructor.
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ListView.h"
#include <qheader.h>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
+using namespace std;
//////////////////////////////////////////////////////////////////////
// QAD_ListView class implementation
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Menus.h"
+using namespace std;
/*!
Constructor.
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Message.h"
#include "QAD_Application.h"
#include "QAD_Config.h"
#include <qstring.h>
#include <qpopupmenu.h>
#include <qmap.h>
+using namespace std;
enum { IdCopy, IdClear, IdSelectAll };
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_MessageBox QAD_MessageBox.h
\brief Message dialog box for QAD-based application.
// QT Includes
#include <qmessagebox.h>
#include <qapplication.h>
+using namespace std;
/*!
Shows info message box with one button [ static ]
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ObjectBrowserItem.h"
#include "QAD_ObjectBrowser.h"
#include "QAD_Application.h"
#include <qtooltip.h>
#include <qdragobject.h>
#include <qstringlist.h>
+using namespace std;
//VRV: porting on Qt 3.0.5
#if QT_VERSION >= 0x030005
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ObjectBrowserItem.h"
#include <qcolor.h>
#include <qpixmap.h>
#include <qstringlist.h>
#include <qpainter.h>
+using namespace std;
/*!
Constructors
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_Operation QAD_Operation.h
\brief Base class for OCAF operations in QAD-based application.
// QT Include
#include <qapplication.h>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_OperatorMenus.h"
#include "QAD_Desktop.h"
+using namespace std;
/*!
Constructor.
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_ParserSettings.h"
#include <stdio.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
-
+using namespace std;
/*!
Constructor.
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD.h"
#include "QAD_Popup.h"
#include "utilities.h"
+using namespace std;
/*****************************************************************************
** Class QAD_PopupClientServer
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_PyEditor.h"
#include "QAD_PyInterp.h"
#include "QAD_Application.h"
#include "QAD_Tools.h"
#include "QAD_MessageBox.h"
//#include "QAD_RightFrame.h"
+using namespace std;
#include <qapplication.h>
#include <qmap.h>
// Module : SALOME
// $Header$
-using namespace std;
-using namespace std;
#include "QAD_PyInterp.h"
#include "utilities.h"
+using namespace std;
/*!
* constructor : multi Python interpreter, one per SALOME study.
// Module : SALOME
// $Header$
-using namespace std;
-using namespace std;
#include "QAD_PyInterp_mono.h"
#include "utilities.h"
+using namespace std;
/*!
* constructor : only one Python interpreter, shared within SALOME studies.
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_ResourceMgr QAD_ResourceMgr.h
\brief ResourceMgr QAD-based application.
#include <qfileinfo.h>
#include <Standard.hxx>
+using namespace std;
/* configuration file */
static const char* CONFIG_FILE = "config";
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_RightFrame.h"
#include "QAD_Application.h"
#include "QAD_Desktop.h"
// Open CASCADE Include
#include <OSD_SharedLibrary.hxx>
+using namespace std;
/*!
\class QAD_RightFrame QAD_RightFrame.h
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Settings.h"
#include <stdio.h>
#include <qregexp.h>
#include <qstring.h>
#include <qtextstream.h>
+using namespace std;
/*!
Class QAD_Settings is a base class for different kind of settings
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_SpinBoxDbl.h"
#include <qpushbutton.h>
#include <qpainter.h>
#include <qpixmapcache.h>
#include <qapplication.h>
#include <limits.h>
+using namespace std;
//******************************************************************************
// QDblRangeControl class
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Splitter.h"
+using namespace std;
/*!
Constructs an horizontal splitter.
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_Study QAD_Study.h
\brief Study for QAD-based application.
// QT Include
#include <qapplication.h>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_StudyFrame QAD_StudyFrame.h
\brief Frame window which contains QAD_LeftFrame and QAD_RightFrame.
#include "QAD_Study.h"
#include "QAD_ObjectBrowser.h"
#include <qvaluelist.h>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class QAD_Tools QAD_Tools.h
\brief Helpful functions for QAD.
#include <string.h>
#include <ctype.h>
#include <qstringlist.h>
+using namespace std;
static char* tempName()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD.h"
#include "QAD_ViewFrame.h"
#include "QAD_Application.h"
#include <qapplication.h>
#include <qimage.h>
#include "utilities.h"
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#define INCLUDE_MENUITEM_DEF
#include "QAD_Desktop.h"
#include <qaccel.h>
#include <qstringlist.h>
#include <qfileinfo.h>
+using namespace std;
map<int,QString> QAD_XmlHandler::_bibmap;
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_AboutDlg.h"
#include "QAD_Desktop.h"
#include "QAD_Tools.h"
#include <qlayout.h>
#include <qpixmap.h>
#include <qmessagebox.h>
+using namespace std;
/*
* Constructor
// Author : Michael Zorin (mzn)
// Module : SALOME
-using namespace std;
#include "SALOMEGUI_ActivateComponentDlg.h"
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qmessagebox.h>
+using namespace std;
SALOMEGUI_ActivateComponentDlg::SALOMEGUI_ActivateComponentDlg ( QWidget * parent, const char * name, bool modal, WFlags f )
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_Application.h"
#include "SALOMEGUI_Desktop.h"
#include "SALOMEGUI_ImportOperation.h"
// Open CASCADE Include
#include <Standard_Failure.hxx>
#include <TCollection_AsciiString.hxx>
+using namespace std;
/*!
Constructor
// Author : Vasily RUSYAEV (vrv)
// Module : SALOME
-using namespace std;
#include "SALOMEGUI_CloseDlg.h"
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qmessagebox.h>
+using namespace std;
SALOMEGUI_CloseDlg::SALOMEGUI_CloseDlg ( QWidget * parent, const char * name, bool modal, WFlags f )
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_Desktop.h"
#include "SALOME_Selection.h"
#include "SALOME_ListIteratorOfListIO.hxx"
+using namespace std;
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
// Module : SALOME
// $Header: /dn05/salome/CVS/SALOME_ROOT/SALOME/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx
-using namespace std;
#include "SALOMEGUI_ExternalBrowserDlg.h"
#include <qbuttongroup.h>
#include "QAD_FileDlg.h"
#include "QAD_Tools.h"
+using namespace std;
/*
* Constructs a modal SALOMEGUI_ExternalBowserDlg which is a child of 'parent'
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_ImportOperation.h"
+using namespace std;
SALOMEGUI_ImportOperation::SALOMEGUI_ImportOperation( QAD_Study* study ) :
QAD_Operation( study )
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_LoadStudiesDlg.h"
#include <qlabel.h>
#include <qlayout.h>
#include <qlistbox.h>
#include <qpushbutton.h>
+using namespace std;
#define SPACING_SIZE 6
#define MARGIN_SIZE 11
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_NameDlg.h"
#include "QAD_Application.h"
#include "QAD_Desktop.h"
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
+using namespace std;
/*!
Constructor
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_OpenWith.h"
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlistbox.h>
+using namespace std;
#define SPACING_SIZE 6
#define MARGIN_SIZE 11
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_QtCatchCorbaException.hxx"
#include "utilities.h"
#include "QAD_Desktop.h"
#include "QAD_MessageBox.h"
+using namespace std;
void QtCatchCorbaException(const SALOME::SALOME_Exception & S_ex)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_SetValueDlg.h"
#include "QAD_Tools.h"
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvalidator.h>
+using namespace std;
#define MARGIN_SIZE 11
#define SPACING_SIZE 6
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_SetupCurveDlg.h"
#include "QAD_Tools.h"
#include <qlayout.h>
#include <qtoolbutton.h>
#include <qgroupbox.h>
#include <qcolordialog.h>
+using namespace std;
#define MARGIN_SIZE 11
#define SPACING_SIZE 6
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_StudyPropertiesDlg.h"
#include "QAD_Desktop.h"
#include <qpushbutton.h>
#include <qlayout.h>
+using namespace std;
#define DEFAULT_MARGIN 11
#define DEFAULT_SPACING 6
// Module : SALOME
// $Header$
-using namespace std;
#include "QAD_Application.h"
#include "QAD_Desktop.h"
#include "QAD_Study.h"
#include "SALOME_Selection.h"
#include "SALOME_InteractiveObject.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
+using namespace std;
/*!
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_TableDlg.h"
#include "QAD_Tools.h"
#include "QAD_MessageBox.h"
#include <qinputdialog.h>
#include <qlabel.h>
#include "utilities.h"
+using namespace std;
#define MARGIN_SIZE 11
#define SPACING_SIZE 6
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_TrihedronSizeDlg.h"
#include <qbuttongroup.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qlayout.h>
+using namespace std;
#define MARGIN_SIZE 11
#define SPACING_SIZE 6
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOMEGUI_ViewChoiceDlg.h"
#include "QAD_Config.h"
#include "QAD_StudyFrame.h"
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
+using namespace std;
/*
* Constructs a SALOMEGUI_ViewChoiceDlg which is a child of 'parent', with the
// File : SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx"
#ifndef _Standard_NoSuchObject_HeaderFile
#ifndef _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile
#include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx"
#endif
+using namespace std;
#define TheKey Handle_SALOME_InteractiveObject
// File : SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx"
#ifndef _Standard_TypeMismatch_HeaderFile
#ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile
#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx"
#endif
+using namespace std;
+
+
SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger() {}
// File : SALOME_DataMapOfIOMapOfInteger_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_DataMapOfIOMapOfInteger.hxx"
#ifndef _Standard_DomainError_HeaderFile
#ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile
#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx"
#endif
+using namespace std;
#define TheKey Handle_SALOME_InteractiveObject
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_Filter.ixx"
+using namespace std;
Standard_EXPORT Standard_Boolean IsEmpty() const;
Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I) ;
Standard_EXPORT void Prepend(SALOME_ListIO& Other) ;
+Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It);
Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I) ;
+Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It);
Standard_EXPORT void Append(SALOME_ListIO& Other) ;
Standard_EXPORT Handle_SALOME_InteractiveObject& First() const;
Standard_EXPORT Handle_SALOME_InteractiveObject& Last() const;
// File : SALOME_ListIO_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListIO.hxx"
#ifndef _Standard_NoSuchObject_HeaderFile
#ifndef _SALOME_ListNodeOfListIO_HeaderFile
#include "SALOME_ListNodeOfListIO.hxx"
#endif
+using namespace std;
#define Item Handle_SALOME_InteractiveObject
// File : SALOME_ListIteratorOfListIO_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListIteratorOfListIO.hxx"
#ifndef _Standard_NoMoreObject_HeaderFile
#ifndef _SALOME_ListNodeOfListIO_HeaderFile
#include "SALOME_ListNodeOfListIO.hxx"
#endif
+using namespace std;
#define Item Handle_SALOME_InteractiveObject
// File : SALOME_ListIteratorOfListOfFilter_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListIteratorOfListOfFilter.hxx"
#ifndef _Standard_NoMoreObject_HeaderFile
#ifndef _SALOME_ListNodeOfListOfFilter_HeaderFile
#include "SALOME_ListNodeOfListOfFilter.hxx"
#endif
+using namespace std;
#define Item Handle_SALOME_Filter
// File : SALOME_ListNodeOfListIO_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListNodeOfListIO.hxx"
#ifndef _Standard_TypeMismatch_HeaderFile
#ifndef _SALOME_ListIteratorOfListIO_HeaderFile
#include "SALOME_ListIteratorOfListIO.hxx"
#endif
+using namespace std;
+
+
SALOME_ListNodeOfListIO::~SALOME_ListNodeOfListIO() {}
// File : SALOME_ListNodeOfListOfFilter_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListNodeOfListOfFilter.hxx"
#ifndef _Standard_TypeMismatch_HeaderFile
#ifndef _SALOME_ListIteratorOfListOfFilter_HeaderFile
#include "SALOME_ListIteratorOfListOfFilter.hxx"
#endif
+using namespace std;
+
+
+
SALOME_ListNodeOfListOfFilter::~SALOME_ListNodeOfListOfFilter() {}
Standard_EXPORT inline Standard_Boolean IsEmpty() const;
Standard_EXPORT void Prepend(const Handle(SALOME_Filter)& I) ;
Standard_EXPORT void Prepend(SALOME_ListOfFilter& Other) ;
+Standard_EXPORT void Prepend(const Handle(SALOME_Filter)& I,SALOME_ListIteratorOfListOfFilter& It);
Standard_EXPORT void Append(const Handle(SALOME_Filter)& I) ;
Standard_EXPORT void Append(SALOME_ListOfFilter& Other) ;
+Standard_EXPORT void Append(const Handle(SALOME_Filter)& I,SALOME_ListIteratorOfListOfFilter& It);
Standard_EXPORT Handle_SALOME_Filter& First() const;
Standard_EXPORT Handle_SALOME_Filter& Last() const;
Standard_EXPORT void RemoveFirst() ;
// File : SALOME_ListOfFilter_0.cxx
// Module : SALOME
-using namespace std;
#include "SALOME_ListOfFilter.hxx"
#ifndef _Standard_NoSuchObject_HeaderFile
#ifndef _SALOME_ListNodeOfListOfFilter_HeaderFile
#include "SALOME_ListNodeOfListOfFilter.hxx"
#endif
+using namespace std;
#define Item Handle_SALOME_Filter
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_NumberFilter.ixx"
#include "SALOME_Selection.h"
#include "SALOME_InteractiveObject.hxx"
#include "QAD_Application.h"
#include "QAD_Desktop.h"
#include "QAD_Study.h"
+using namespace std;
SALOME_NumberFilter::SALOME_NumberFilter(NumberFilter TheKind, Standard_Integer aValue):
myKind(TheKind),
// Module : SALOME
// $Header$
-using namespace std;
/*!
\class SALOME_Selection SALOME_Selection.h
\brief Selection Mechanism of Interactive Object.
#include "QAD_Desktop.h"
#include "utilities.h"
+using namespace std;
static QList<SALOME_Selection>& SALOME_Sel_GetSelections()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SALOME_TypeFilter.ixx"
#include "SALOME_InteractiveObject.hxx"
+using namespace std;
SALOME_TypeFilter::SALOME_TypeFilter(const Standard_CString TheKind):
myKind(TheKind){}
#include <string>
#include <iostream>
-using namespace std;
-
#include "SALOME_Log.hxx"
+using namespace std;
SALOME_Log* SALOME_Log::_singleton = 0;
# endif /* WNT */
-using namespace std;
#include <iostream>
#include <strstream>
+using namespace std;
class SALOME_Log : public ostrstream
{
// Module : SALOME
// $Header$
-using namespace std;
#include <Python.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include "QAD_Application.h"
#include "QAD_Desktop.h"
#include "VTKViewer_ViewFrame.h"
+using namespace std;
extern "C"
{
# SIP C++ Python
# SIP defined in make_commence.in
-SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) -I $(PYQT_SIPS)
+SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) $(PYQT_INCLUDES)
# SIP input file(s)
CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES)
LIBS+= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) $(OGL_LIBS)
-LDFLAGS+= -lSalomeGUI -lqtcmodule
+LDFLAGS+= -lSalomeGUI
# Custom build step: generate C++ wrapping according to $(SIP_FILES)
-using namespace std;
//=============================================================================
// File : SALOME_PYQT_GUI.cxx
// Created : mer jun 4 17:17:20 UTC 2003
#include <map>
#include <string>
+using namespace std;
static PyInterp_PyQt *interp = NULL;
static map<int,PyInterp_PyQt*> mapInterp;
// File : SalomePyQt.cxx
// Module : SALOME
-using namespace std;
#include "SalomePyQt.hxx"
#include "QAD_Application.h"
#include "QAD_Config.h"
#include "QAD_Settings.h"
+using namespace std;
QWidget* SalomePyQt::getDesktop()
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SUPERVGraph.h"
#include "SUPERVGraph_ViewFrame.h"
+using namespace std;
QAD_ViewFrame* SUPERVGraph::createView(QAD_RightFrame* parent)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "SUPERVGraph_ViewFrame.h"
#include "QAD_Settings.h"
//QT Include
#include <qlayout.h>
#include <qcolordialog.h>
+using namespace std;
SUPERVGraph_View::SUPERVGraph_View(QWidget* theParent): QWidget(theParent){
init(theParent);
// Module : SALOME
// $Header$
-using namespace std;
#include <qapplication.h>
#include <qlabel.h>
// only to use findFile method : perhaps put it in QAD_Tools ???
#include "QAD_ResourceMgr.h"
#include <qlabel.h>
+using namespace std;
#include <SALOMEconfig.h>
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOME_Session_i.hxx"
#include <OSD_SharedLibrary.hxx>
#include <OSD_LoadMode.hxx>
#include <OSD_Function.hxx>
+using namespace std;
//=============================================================================
/*! SALOME_Session_i
-using namespace std;
// File : SALOMEDS_Tool.cxx
// Created : Mon Oct 21 16:24:34 2002
// Author : Sergey RUIN
#include <TCollection_AsciiString.hxx>
#include <stdio.h>
-#include <iostream.h>
-#include <fstream.h>
+#include <iostream>
+#include <fstream>
#include <OSD_Path.hxx>
#include <OSD_File.hxx>
#include <OSD_Directory.hxx>
#include <OSD_Protection.hxx>
#include <OSD_SingleProtection.hxx>
#include <OSD_FileIterator.hxx>
+using namespace std;
#include <sys/time.h>
#include <stdlib.h>
// Module : SALOME
// $Header$
-using namespace std;
#include "ToolsGUI.h"
#include "ToolsGUI_CatalogGeneratorDlg.h"
#include "utilities.h"
#include <stdlib.h>
+using namespace std;
int ToolsGUI::runCommand(string & arg)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "ToolsGUI_CatalogGeneratorDlg.h"
#include "QAD_Application.h"
#include <OSD_Path.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_CString.hxx>
+using namespace std;
#define SPACING_SIZE 6
#define MARGIN_SIZE 11
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include "SALOME_TestComponent_i.hxx"
#include <stdio.h>
+using namespace std;
Engines_TestComponent_i::Engines_TestComponent_i(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
for (int iter = 0; iter < 3 ; iter++)
{
INFOS("----------------------------------------------------" << iter);
- string dirn = getenv("SALOME_ROOT_DIR");
+ string dirn = getenv("KERNEL_ROOT_DIR");
dirn += "/lib/salome/libSalomeTestComponentEngine.so";
obj = iGenFact->load_impl("SalomeTestComponent",dirn.c_str());
m1 = Engines::TestComponent::_narrow(obj);
// Module : SALOME
// $Header$
-using namespace std;
#include "utilities.h"
#include <iostream>
#include <unistd.h>
#include <SALOMEconfig.h>
#include "SALOME_NamingService.hxx"
#include "OpUtil.hxx"
+using namespace std;
int main (int argc, char * argv[])
{
--- /dev/null
+#==============================================================================
+# File : Makefile.in
+# Created : mer jui 04 12:58:13 CEST 2003
+# Author : Bernard SECHER, CEA
+# Project : SALOME
+# Copyright : CEA 2003
+# $Header$
+#==============================================================================
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+@COMMENCE@
+
+EXPORT_PYSCRIPTS =
+
+EXPORT_HEADERS = TestMPIComponentEngine.hxx
+
+# Libraries targets
+
+LIB = libSalomeTestMPIComponentEngine.la
+LIB_SRC = TestMPIComponentEngine.cxx
+LIB_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_TestMPIComponent.idl
+
+# Executables targets
+BIN = TestMPIContainer
+BIN_SRC =
+BIN_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl
+BIN_SERVER_IDL =
+
+LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeMPILifeCycleCORBA -lSalomeLifeCycleCORBA -lSalomeMPIContainer -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace
+
+
+@CONCLUDE@
--- /dev/null
+//=============================================================================
+// File : TestMPIComponentEngine.cxx
+// Created : mer jui 4 12:28:26 CEST 2003
+// Author : Bernard SECHER, 2003
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#include "utilities.h"
+#include "TestMPIComponentEngine.hxx"
+using namespace std;
+
+TestMPIComponentEngine::TestMPIComponentEngine(int nbproc, int numproc,
+ 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)
+{
+ MESSAGE("activate object")
+ _thisObj = this ;
+ _id = _poa->activate_object(_thisObj);
+}
+
+TestMPIComponentEngine::TestMPIComponentEngine(): Engines_Component_i(), MPIObject_i()
+{
+}
+
+TestMPIComponentEngine::~TestMPIComponentEngine()
+{
+}
+
+void TestMPIComponentEngine::Coucou(CORBA::Long L)
+{
+ BEGIN_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()");
+ if(_numproc==0)
+ for(int ip=1;ip<_nbproc;ip++)
+ Engines::TestMPIComponent::_narrow((*_tior)[ip])->SPCoucou(L);
+ MESSAGE("[" << _numproc << "] TestMPIComponentEngine : L = " << L);
+ END_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()");
+}
+
+void TestMPIComponentEngine::SPCoucou(CORBA::Long L)
+{
+ BEGIN_OF("[" << _numproc << "] TestMPIComponentEngine::SPCoucou()");
+ MESSAGE("[" << _numproc << "] TestMPIComponentEngine : L = " << L);
+ END_OF("[" << _numproc << "] TestMPIComponentEngine::SPCoucou()");
+}
+
+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)
+ {
+ bool regist;
+ TestMPIComponentEngine * myTestMPIComponent;
+ MESSAGE("[" << numproc << "] PortableServer::ObjectId * TestMPIComponentEngine_factory()");
+ SCRUTE(interfaceName);
+ if(numproc==0)
+ regist = true;
+ else
+ regist = false;
+
+ myTestMPIComponent
+ = new TestMPIComponentEngine(nbproc,numproc,orb, poa, contId, instanceName, interfaceName,regist);
+ return myTestMPIComponent->getId() ;
+ }
+}
+
--- /dev/null
+//=============================================================================
+// File : TestMPIComponentEngine.hxx
+// Created : mer jui 4 12:28:30 CEST 2003
+// Author : Bernard SECHER, CEA
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#ifndef _SALOME_TESTCOMPONENT_I_HXX_
+#define _SALOME_TESTCOMPONENT_I_HXX_
+
+#include <iostream.h>
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOME_TestMPIComponent)
+#include "SALOME_Component_i.hxx"
+#include "MPIObject_i.hxx"
+
+class TestMPIComponentEngine:
+ public POA_Engines::TestMPIComponent,
+ public Engines_Component_i, public MPIObject_i
+{
+public:
+ TestMPIComponentEngine();
+ TestMPIComponentEngine(int nbproc, int numproc,
+ CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ PortableServer::ObjectId * contId,
+ const char *instanceName,
+ const char *interfaceName,
+ bool regist);
+
+ virtual ~TestMPIComponentEngine();
+
+ void Coucou(CORBA::Long L);
+ void SPCoucou(CORBA::Long L);
+
+};
+
+#endif
--- /dev/null
+// using namespace std;
+//=============================================================================
+// File : TestMPIContainer.cxx
+// Created : mer jui 4 13:11:27 CEST 2003
+// Author : Bernard SECHER, 2003
+// Project : SALOME
+// Copyright : CEA 2003
+// $Header$
+//=============================================================================
+
+#include "utilities.h"
+#include <iostream>
+#include <unistd.h>
+#include <string>
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SALOME_MPIContainer)
+#include CORBA_CLIENT_HEADER(SALOME_TestMPIComponent)
+
+# include "Utils_ORB_INIT.hxx"
+# include "Utils_SINGLETON.hxx"
+#include "SALOME_NamingService.hxx"
+#include "OpUtil.hxx"
+
+int main (int argc, char * argv[])
+{
+
+ try{
+
+ int status;
+
+ MESSAGE("COUCOU");
+ if( argc != 3 || strcmp(argv[1],"-np") ){
+ cout << "Usage: TestMPIContainer -np nbproc" << endl;
+ exit(0);
+ }
+
+ // Initializing omniORB
+ CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+
+ // Obtain a reference to the root POA
+ CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") ;
+ PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) ;
+
+ // Use Name Service to find container
+ SALOME_NamingService NS(orb) ;
+ string containerName = "/Containers/" ;
+ string hostName = GetHostname();
+ containerName += hostName + "/MPIFactoryServer_" + argv[2];
+
+ MESSAGE(containerName);
+
+ string dirn(getenv("KERNEL_ROOT_DIR"));
+ dirn += "/lib/salome/libSalomeTestMPIComponentEngine.so";
+ MESSAGE(dirn.c_str());
+
+ // Try to resolve MPI Container
+ obj = NS.Resolve(containerName.c_str()) ;
+ Engines::Container_var iGenFact = Engines::Container::_narrow(obj);
+
+ if(CORBA::is_nil(iGenFact)){
+
+ // Launch MPI Container
+ string cmd("mpirun -np ");
+ cmd += argv[2];
+ cmd += " ";
+ cmd += getenv("KERNEL_ROOT_DIR");
+ cmd += "/bin/salome/SALOME_MPIContainer MPIFactoryServer_";
+ cmd += argv[2];
+ cmd += " &";
+ MESSAGE(cmd);
+ status = system(cmd.c_str());
+ if (status == -1) {
+ INFOS("TestMPIContainer launch MPI Container failed (system command status -1)") ;
+ }
+ else if (status == 217) {
+ INFOS("TestMPIContainer launch MPI Container failed (system command status 217)") ;
+ }
+
+ // Try to resolve MPI Container
+ int it = 0;
+ do{
+ sleep(1);
+ obj = NS.Resolve(containerName.c_str()) ;
+ iGenFact = Engines::Container::_narrow(obj);
+ MESSAGE("Waiting for MPI Container " << containerName << " : it = " << it );
+ }while( CORBA::is_nil(iGenFact) && (it++<15) );
+
+ }
+
+ if(CORBA::is_nil(iGenFact)){
+ MESSAGE("echec recuperation poignee container");
+ exit(1);
+ }
+
+ Engines::TestMPIComponent_var m1;
+
+ for (int iter = 0; iter < 1 ; iter++){
+ MESSAGE("----------------------------------------------------" << iter);
+ obj = iGenFact->load_impl("TestMPIComponent",dirn.c_str());
+
+ m1 = Engines::TestMPIComponent::_narrow(obj);
+ if(CORBA::is_nil(m1)){
+ INFOS("echec recuperation poignee composant");
+ }
+ else{
+
+ INFOS("recup m1");
+ SCRUTE(m1->instanceName());
+ INFOS("Lancement de coucou");
+ m1->Coucou(1L);
+ INFOS("On remove le composant");
+ iGenFact->remove_impl(m1) ;
+ sleep(5);
+ }
+ }
+ // Clean-up.
+ iGenFact->finalize_removal() ;
+ orb->destroy();
+ }
+ catch(CORBA::COMM_FAILURE& ex) {
+ INFOS("Caught system exception COMM_FAILURE -- unable to contact the object.");
+ }
+ catch(CORBA::SystemException&) {
+ INFOS("Caught a CORBA::SystemException.");
+ }
+ catch(CORBA::Exception&) {
+ INFOS("Caught CORBA::Exception.");
+ }
+ catch(...) {
+ INFOS("Caught unknown exception.");
+ }
+
+ return 0;
+}
// Module : SALOME
// $Header$
-using namespace std;
# include "Utils_CommException.hxx"
CommException::CommException( void ): SALOME_Exception( "CommException" )
// Module : SALOME
// $Header$
-using namespace std;
void Nettoyage( void ) ;
# include <iostream>
# include "utilities.h"
# include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
# include <list>
+using namespace std;
extern "C"
{
# include <stdlib.h>
// Module : SALOME
// $Header$
-using namespace std;
# include "Utils_ORB_INIT.hxx"
# include "utilities.h"
// Module : SALOME
// $Header$
-using namespace std;
#include <iostream>
#include "Utils_SALOME_Exception.hxx"
#include "utilities.h"
{
#include <math.h>
#include <stdio.h>
-#include <string.h>
}
-
+#include <string>
+using namespace std;
const char* duplicate( const char *const str ) ;
-const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber )
+char *makeText( const char *text, const char *fileName, const unsigned int lineNumber )
{
char *newText = 0 ;
{
if ( _text )
{
- delete [] _text ;
- char *& txt = (char*)_text ;
- txt = 0 ;
+ delete [] _text ;
+ _text = NULL;
}
- ASSERT(_text==NULL) ;
}
-SALOME_Exception::SALOME_Exception( const SALOME_Exception &ex ): _text(duplicate(ex._text))
+SALOME_Exception::SALOME_Exception( const SALOME_Exception &ex ): _text((char*)duplicate(ex._text))
{
;
}
#if !defined( __Utils_SALOME_Exception_hxx__ )
#define __Utils_SALOME_Exception_hxx__
-using namespace std;
# include <exception>
# include <iostream>
+using namespace std;
# define LOCALIZED(message) #message , __FILE__ , __LINE__
-class SALOME_Exception : public exception
+class SALOME_Exception : public std::exception
{
private :
SALOME_Exception( void );
protected :
- const char* _text ; // pointeur constant et zone pointee constante !!!!
+ char* _text ; // pointeur
public :
SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 );
// Module : SALOME
# include "Utils_Timer.hxx"
-# include <stream.h>
+# include <iostream>
using namespace std;
static struct timezone *tz=(struct timezone*) malloc(sizeof(struct timezone));
#define COMPILER "KCC"
#elif defined ( __PGI )
#define COMPILER "pgCC"
+#elif defined ( __alpha )
+#define COMPILER "cxx"
#else
#define COMPILER "undefined"
#endif
// Module : SALOME
// $Header$
-using namespace std;
#include "VTKViewer.h"
#include "VTKViewer_ViewFrame.h"
+using namespace std;
QAD_ViewFrame* VTKViewer::createView(QAD_RightFrame* parent)
{
// Module : SALOME
// $Header$
-using namespace std;
#include "VTKViewer_RenderWindow.h"
#include "utilities.h"
#include "QAD_Settings.h"
#include <vtkRendererCollection.h>
#include <vtkXOpenGLRenderWindow.h>
#include <vtkCamera.h>
+using namespace std;
//#include <GL/gl.h>
//#include <GL/glu.h>
#include "VTKViewer_Utilities.h"
#include "VTKViewer_Trihedron.h"
#include "VTKViewer_RenderWindow.h"
-#include "VTKViewer_InteractorStyleSALOME.h"
+//#include "VTKViewer_InteractorStyleSALOME.h"
+
+#include "SALOME_Transform.h"
+#include "SALOME_TransformFilter.h"
+#include "SALOME_PassThroughFilter.h"
+#include "SALOME_GeometryFilter.h"
#include "SALOME_Transform.h"
#include "SALOME_TransformFilter.h"
#include "QAD_Desktop.h"
#include "SALOME_Selection.h"
#include "SALOME_InteractiveObject.hxx"
+#include "VTKViewer_InteractorStyleSALOME.h"
#include "utilities.h"