make-mpif 437 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # usage: make-mpif <fort_real_size> <fort_double_size>
  3. # e.g. make-mpif 4 8
  4. #
  5. # from the template in mpif.master.h, creates mpif.realXdoubleY.h file
  6. #
  7. set -e
  8. if [ $# -ne 2 ]
  9. then echo 'Usage: make-mpif <fort_real_size> <fort_double_size>'
  10. exit 1
  11. fi
  12. RSIZE=$1
  13. DSIZE=$2
  14. DEST=mpif.real${RSIZE}double${DSIZE}.h
  15. /bin/rm -f $DEST
  16. sed -e s/_RSIZE_/$RSIZE/ -e s/_DSIZE_/$DSIZE/ <mpif.master.h >$DEST
  17. chmod -w $DEST