xref: /petsc/lib/petsc/bin/petsc-mpiexec.uni (revision 0b3a6bba120a0cdd0b26cdef79233fff1bc80a01)
1#!/usr/bin/env sh
2
3if  [ "$1" = "-hosts" ]; then
4    shift 2
5fi
6if [ "$1" = "-np" -o "$1" = "-n" ]; then
7    if [ "$2" = 1 ]; then
8        shift 2
9    else
10        echo "Uniprocessor version of MPI can only use one processor"
11        exit 1
12    fi
13fi
14
15# Execute the program with options
16os=$(uname)
17if [ "$os" = "Darwin" ]; then export DYLD_LIBRARY_PATH="${LIBRARY_PATH}"; fi
18exec "$@"
19