Debian Codegraph @

debian/tests/yorick-gyoto-mpi

raw
1 #!/bin/sh
2 set -e
3
4 # Name of this script
5 script=`basename "$0"`
6
7 # Handle case of manually running this script
8 if [ "$AUTOPKGTEST_TMP" = "" ]; then
9 AUTOPKGTEST_TMP=`mktemp -d --tmpdir "$script"-XXX`;
10 export AUTOPKGTEST_TMP;
11 echo "AUTOPKGTEST_TMP is $AUTOPKGTEST_TMP";
12 fi
13 if [ "$ADT_ARTIFACTS" = "" ] ; then
14 ADT_ARTIFACTS=${AUTOPKGTEST_TMP}/artifacts
15 fi
16 mkdir -p "${AUTOPKGTEST_TMP}"
17 mkdir -p "${ADT_ARTIFACTS}"
18
19 # Determine default MPI implementation for this arch
20 HOSTFILE="${AUTOPKGTEST_TMP}"/hostfile.${script}
21 eval `grep ARCH_DEFAULT_MPI_IMPL /usr/share/mpi-default-dev/debian_defaults`
22 export ARCH_DEFAULT_MPI_IMPL
23 if [ "x$ARCH_DEFAULT_MPI_IMPL" = x"openmpi" ]
24 # Setup MPI environment to run on localhost with enough slots
25 then export OMPI_MCA_plm_rsh_agent=/bin/false
26 export OMPI_MCA_btl_tcp_if_include=lo
27 HOSTFILE="${AUTOPKGTEST_TMP}"/hostfile.${script}
28 echo localhost slots=9 > "${HOSTFILE}"
29 MPIRUN_CMD="mpirun.openmpi -np 1 --hostfile ${HOSTFILE} --oversubscribe"
30 elif [ "x$ARCH_DEFAULT_MPI_IMPL" = x"mpich" ]
31 then echo localhost > "${HOSTFILE}"
32 MPIRUN_CMD="mpirun.mpich -np 1 --hostfile ${HOSTFILE}"
33 else echo "unknown MPI implementation: " $ARCH_DEFAULT_MPI_IMPL
34 exit 1
35 fi
36
37 # Run yorick script
38 ${MPIRUN_CMD} /usr/bin/yorick -i ./debian/tests/yorick-gyoto.i
39
40 exit 0