/usr/bin/smpif90 is in libsimgrid-dev 3.10-7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
| 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 | #! /bin/sh
F90=/usr/bin/gfortran
INCLUDEARGS="-I/usr/include -I/usr/include/smpi"
CMAKE_LINKARGS="-L/usr/lib"
FFLAGS="-ff2c  -fno-second-underscore"
LINKARGS="-lsimgrid -lm -lgfortran"
main_name=main
TMPFILES=""
trap 'rm -f ${TMPFILES}' EXIT
# $1: prefix, $2: suffix
mymktemp () {
    tmp=$(mktemp --suffix="$2" "$1_XXXXXXXXXX" 2> /dev/null)
    if [ -z "$tmp" ]; then
        # mktemp failed (unsupported --suffix ?), try unsafe mode
        tmp=$(mktemp -u "$1_XXXXXXXXXX" 2> /dev/null)
        if [ -z "$tmp" ]; then
            # mktemp failed again (doesn't exist ?), try very unsafe mode
            tmp="$1_$$x$RANDOM"
        fi
        tmp="${tmp}$2"
        # create temp file, and exit if it existed before
        sh -C -c "true > \"${tmp}\"" || exit 1
    fi
    echo "${tmp}"
}
CMDLINE=""
while [ -n "$1" ]; do
  ARG="$1"
  shift
  case "${ARG}" in
   -c)
      CMAKE_LINKARGS=""
      LINKARGS=""
      CMDLINE="${CMDLINE} -c "
      ;;
   *.f90|*.F90)
      TMPFILE=$(mymktemp "${ARG}" ".f90")
      TMPFILES="${TMPFILES} ${TMPFILE}"
      #replace "program main_name by subroutine user\_main (and the end clause as well)"
      sed 's/[[:space:]]*program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/subroutine user\_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI'  ${ARG} > ${TMPFILE}
      SRCFILE="${TMPFILE}"
      CMDLINE="${CMDLINE} ${SRCFILE} "
      ;;
   *)
      CMDLINE="${CMDLINE} ${ARG} "
      ;;
  esac
done
CMDLINE="${F90} ${FFLAGS} ${CMDLINE} ${INCLUDEARGS} ${CMAKE_LINKARGS} ${LINKARGS}"
#echo "${CMDLINE}"
${CMDLINE}
 |