File: mpi-compile-run

package info (click to toggle)
mpi-defaults 1.20
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 68 kB
  • sloc: makefile: 110; cpp: 16; ansic: 15; sh: 14; fortran: 9; f90: 9
file content (21 lines) | stat: -rwxr-xr-x 281 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e

AUTOPKGTEST_TMP=${AUTOPKGTEST_TMP:-$(mktemp -d)}

COMPILER=$1
SOURCE=$2
shift 2

cp debian/tests/$SOURCE $AUTOPKGTEST_TMP/
cd $AUTOPKGTEST_TMP

FLAGS=
if [ "$1" = "pkg-config" ]; then
	FLAGS=$($*)
fi

set -x
$COMPILER -o hello $SOURCE $FLAGS

mpirun -n 1 ./hello