]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
add test MPI2 communication
authorsecher <secher>
Tue, 6 Sep 2011 13:44:06 +0000 (13:44 +0000)
committersecher <secher>
Tue, 6 Sep 2011 13:44:06 +0000 (13:44 +0000)
src/MPIContainer/Makefile.am
src/MPIContainer/launch_testMPI2.csh [new file with mode: 0755]

index db286fcb5255b2cfb15c33e0f5ca36766abc2b93..5e9e3f55ae8f936b2d6f0429a83f3e0522608eca 100644 (file)
@@ -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 (executable)
index 0000000..d7b78d7
--- /dev/null
@@ -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