From: secher Date: Wed, 28 Jan 2004 13:39:32 +0000 (+0000) Subject: gestion parallelisme sur CCRT X-Git-Tag: BSEC_br1_20040202~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=53be8c484c22805363339ae6759a6d73cfa40e2e;p=modules%2Fkernel.git gestion parallelisme sur CCRT --- diff --git a/configure.in.base b/configure.in.base index f946353c7..08f6fe1c1 100644 --- a/configure.in.base +++ b/configure.in.base @@ -144,6 +144,7 @@ dnl testing MPICH dnl --------------------------------------------- dnl +CHECK_MPI CHECK_MPICH echo @@ -305,7 +306,7 @@ echo --------------------------------------------- echo echo Configure -variables="cc_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" +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) diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 new file mode 100644 index 000000000..51f271a9f --- /dev/null +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -0,0 +1,70 @@ +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 diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index 608947b34..f54cc072e 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -112,8 +112,12 @@ OCC_VIEWER_LIBS=@CAS_VIEWER@ OCC_MODELER_LIBS=@CAS_MODELER@ OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@ OCC_LIBS=@CAS_LDFLAGS@ -# MPICH +# MPI +MPI_INCLUDES=@MPI_INCLUDES@ +MPI_LIBS=@MPI_LIBS@ + +# MPICH MPICH_INCLUDES=@MPICH_INCLUDES@ MPICH_LIBS=@MPICH_LIBS@ diff --git a/src/MPIContainer/Makefile.in b/src/MPIContainer/Makefile.in index 3c582f719..9295763aa 100644 --- a/src/MPIContainer/Makefile.in +++ b/src/MPIContainer/Makefile.in @@ -51,8 +51,17 @@ BIN = SALOME_MPIContainer BIN_SRC = 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 +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@ diff --git a/src/Makefile.in b/src/Makefile.in index 6bdf3f75d..a6ddad5ac 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -38,6 +38,10 @@ SUBDIRS = MSG2QM Logger Utils PatchQt NamingService Registry ModuleCatalog DataT SALOME_SWIG TOOLSGUI SALOME_PY RegistryDisplay ModuleGenerator \ SALOME_PYQT Loader +ifeq (@WITHMPI@,yes) + SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer +endif + ifeq (@WITHMPICH@,yes) SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer endif