| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
if [ "$1" = "configure" ]; then |
| 6 |
|
| 7 |
if update-alternatives --list mpiexec >/dev/null 2>&1; then |
| 8 |
# OK, that case sucks. Apparently, we still have a mpiexec alternative, maybe |
| 9 |
# from a different package (like openmpi). In that case, the only thing we |
| 10 |
# can do is --remove-all... |
| 11 |
update-alternatives --remove-all mpiexec |
| 12 |
fi |
| 13 |
|
| 14 |
update-alternatives \ |
| 15 |
--install /usr/bin/mpicc mpi /usr/bin/mpicc.mpich 40 \ |
| 16 |
--slave /usr/bin/mpic++ mpic++ /usr/bin/mpicxx.mpich \ |
| 17 |
--slave /usr/bin/mpicxx mpicxx /usr/bin/mpicxx.mpich \ |
| 18 |
--slave /usr/bin/mpiCC mpiCC /usr/bin/mpicxx.mpich \ |
| 19 |
--slave /usr/bin/mpifort mpifort /usr/bin/mpifort.mpich \ |
| 20 |
--slave /usr/bin/mpif77 mpif77 /usr/bin/mpifort.mpich \ |
| 21 |
--slave /usr/bin/mpif90 mpif90 /usr/bin/mpifort.mpich \ |
| 22 |
|
| 23 |
update-alternatives \ |
| 24 |
--install /usr/bin/mpirun mpirun /usr/bin/mpirun.mpich 40 \ |
| 25 |
--slave /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.mpich \ |
| 26 |
|
| 27 |
fi |
| 28 |
|
| 29 |
#DEBHELPER# |