Salome HOME
CMake: set the flag Boost_NO_BOOST_CMAKE to avoid that the *standard* FindBoost.cmake
[modules/kernel.git] / src / MPIContainer / launch_testMPI2.csh
1 #! /bin/csh -f
2 # debug mode display informations about communication
3 if $1 == "--debug" then
4   set debug="-debug"
5 else
6   set debug=""
7 endif
8 # get pid of ompi-server
9 setenv OMPI_URI_FILE ${HOME}/.urifile_$$
10 set lpid1=`pidof ompi-server`
11 ompi-server -r ${OMPI_URI_FILE}
12 set lpid2=`pidof ompi-server`
13 foreach i ($lpid2)
14   set flag=0
15   foreach j ($lpid1)
16     if ($i == $j) then
17       set flag=1
18     endif
19   end
20   if ($flag == 0) then
21     set pid=$i
22   endif
23 end
24 sleep 2
25 # launch two instances of executable to create communication between both
26 mpirun -np 2 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug &
27 mpirun -np 3 -ompi-server file:${OMPI_URI_FILE} ${KERNEL_ROOT_DIR}/bin/salome/testMPI2 -vsize 32 $debug
28 set res=$status
29 sleep 1
30 # kill ompi-server
31 kill -9 $pid
32 # delete uri file
33 rm -f  ${OMPI_URI_FILE}
34 # give result of test
35 if $res == 0 then
36   echo "OK"
37 else
38   echo "KO"
39 endif
40 exit $res