File: gyoto-lorene-mpi

package info (click to toggle)
gyoto 2.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,444 kB
  • sloc: cpp: 42,330; sh: 4,512; python: 3,436; xml: 2,865; makefile: 691; ansic: 346
file content (66 lines) | stat: -rwxr-xr-x 2,094 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
set -e

# Name of this script
script=`basename "$0"`

# Handle case of manually running this script
if [ "$AUTOPKGTEST_TMP" = "" ]; then
    AUTOPKGTEST_TMP=`mktemp -d --tmpdir "$script"-XXX`;
    echo "AUTOPKGTEST_TMP is $AUTOPKGTEST_TMP";
fi
if [ "$ADT_ARTIFACTS" = "" ] ; then
    ADT_ARTIFACTS=${AUTOPKGTEST_TMP}/artifacts
fi
mkdir -p "${AUTOPKGTEST_TMP}"
mkdir -p "${ADT_ARTIFACTS}"

# Save current directory (must be top of source tree)
SRC_ROOT=`pwd`

# Compute Lorene metric using Nrotstar "code"
export HOME_LORENE=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/lorene
mkdir -p ${AUTOPKGTEST_TMP}/${script}
cd ${AUTOPKGTEST_TMP}/${script}
rm -Rf .check-lorene
cp -a ${HOME_LORENE}/Codes/Nrotstar ./.check-lorene
cd .check-lorene
rm -f nrotstar *.o
cp -f Parameters/GR/Kepler/*.d ./
sed -i.bak 's/1       graph/0       graph/' par_rot.d
make
./nrotstar
cd ..

# Get list of Lorene examples
EXAMPLES_DIR=${SRC_ROOT}/doc/examples
BASE_NAMES=`basename -s.xml ${EXAMPLES_DIR}/*-rotstar3_1.xml`

# Build Gyoto command line
GYOTO="/usr/bin/gyoto --nprocesses=4 --nthreads=1 --resolution=32 --plugins=stdplug,lorene"

# Determine default MPI implementation for this arch
HOSTFILE="${AUTOPKGTEST_TMP}"/hostfile.${script}
eval `grep ARCH_DEFAULT_MPI_IMPL /usr/share/mpi-default-dev/debian_defaults`
if [ "x$ARCH_DEFAULT_MPI_IMPL" = x"openmpi" ]
# Setup MPI environment to run on localhost with enough slots
then export OMPI_MCA_plm_rsh_agent=/bin/false
     export OMPI_MCA_btl_tcp_if_include=lo
     HOSTFILE="${AUTOPKGTEST_TMP}"/hostfile.${script}
     echo localhost slots=5 > "${HOSTFILE}"
     MPIRUN_CMD="mpirun.openmpi -np 1 --hostfile ${HOSTFILE} --oversubscribe"
elif [ "x$ARCH_DEFAULT_MPI_IMPL" = x"mpich" ]
then echo localhost > "${HOSTFILE}"
     MPIRUN_CMD="mpirun.mpich -np 1 --hostfile ${HOSTFILE}"
else echo "unknown MPI implementation: " $ARCH_DEFAULT_MPI_IMPL
     exit 1
fi

# Run each example in this environment
for base in ${BASE_NAMES} ; do
    ${MPIRUN_CMD} ${GYOTO} \
		  ${EXAMPLES_DIR}/${base}.xml \
		  \!${ADT_ARTIFACTS}/${base}-mpi.fits ;
done

exit 0