From be7049e6cfe83e492999afd994de4d99b7350b1a Mon Sep 17 00:00:00 2001 From: secher Date: Tue, 6 Sep 2011 13:44:06 +0000 Subject: [PATCH] add test MPI2 communication --- src/MPIContainer/Makefile.am | 9 ++++++++- src/MPIContainer/launch_testMPI2.csh | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 src/MPIContainer/launch_testMPI2.csh diff --git a/src/MPIContainer/Makefile.am b/src/MPIContainer/Makefile.am index db286fcb5..5e9e3f55a 100644 --- a/src/MPIContainer/Makefile.am +++ b/src/MPIContainer/Makefile.am @@ -42,6 +42,10 @@ salomeinclude_HEADERS = \ MPIObject_i.hxx \ MPIContainer_i.hxx +# These files are executable scripts +dist_salomescript_SCRIPTS = \ + launch_testMPI2.csh + # # =============================================================== # Local definitions @@ -102,4 +106,7 @@ SALOME_MPIContainer_SOURCES = SALOME_MPIContainer.cxx SALOME_MPIContainer_LDADD = libSalomeMPIContainer.la $(COMMON_LIBS) @PYTHON_LIBS@ @MPI_LIBS@ SALOME_MPIContainer_CPPFLAGS = $(COMMON_CPPFLAGS) - +bin_PROGRAMS = testMPI2 +testMPI2_SOURCES = testMPI2.cxx +testMPI2_LDADD = @MPI_LIBS@ +testMPI2_CPPFLAGS = @MPI_INCLUDES@ diff --git a/src/MPIContainer/launch_testMPI2.csh b/src/MPIContainer/launch_testMPI2.csh new file mode 100755 index 000000000..d7b78d760 --- /dev/null +++ b/src/MPIContainer/launch_testMPI2.csh @@ -0,0 +1,24 @@ +#! /bin/csh -f +set nbproc1=2 +set nbproc2=3 +set vsize=32 +if $1 == "--debug" then + set debug="-debug" +else + set debug="" +endif +if $status == 0 then + setenv OMPI_URI_FILE /home/secher/ARCH_COMPO/mpi2_pub/essai/URI + ompi-server -r ${OMPI_URI_FILE} + sleep 2 + mpirun -np $nbproc1 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize $vsize $debug & + mpirun -np $nbproc2 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize $vsize $debug + set res=$status + sleep 1 + killall ompi-server +endif +if $res == 0 then + echo "OK" +else + echo "KO" +endif -- 2.39.2