3 # Copyright (C) 2011-2020 CEA/DEN, EDF R&D, OPEN CASCADE
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # debug mode display information about communication
23 if $1 == "--debug" then
28 # get mpi implementation
29 ${KERNEL_ROOT_DIR}/bin/salome/getMPIImplementation
33 else if $res == 2 then
36 if $mpi == "openmpi" then
38 setenv OMPI_URI_FILE ${HOME}/.urifile_$$
39 set lpid1=`pidof ompi-server`
40 ompi-server -r ${OMPI_URI_FILE}
41 set lpid2=`pidof ompi-server`
42 else if $mpi == "mpich" then
43 # launch hydra_nameserver
44 set lpid1=`pidof hydra_nameserver`
48 set lpid2=`pidof hydra_nameserver`
50 # get pid of mpi server
64 # launch two instances of executable to create communication between both
65 if $mpi == "openmpi" then
66 mpirun -np 2 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug &
67 mpirun -np 3 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug
68 else if $mpi == "mpich" then
69 mpirun -np 2 -nameserver $HOSTNAME ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug &
70 mpirun -np 3 -nameserver $HOSTNAME ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug
78 if $mpi == "openmpi" then
80 rm -f ${OMPI_URI_FILE}