cannam@127: #! /bin/sh cannam@127: cannam@127: # Script to generate Fortran 2003 wrappers for FFTW's MPI functions. This cannam@127: # is necessary because MPI provides no way to deal with C MPI_Comm handles cannam@127: # from Fortran (where MPI_Comm == integer), but does provide a way to cannam@127: # deal with Fortran MPI_Comm handles from C (via MPI_Comm_f2c). So, cannam@127: # every FFTW function that takes an MPI_Comm argument needs a wrapper cannam@127: # function that takes a Fortran integer and converts it to MPI_Comm. cannam@127: cannam@127: echo "/* Generated automatically. DO NOT EDIT! */" cannam@127: echo cannam@127: cannam@127: echo "#include \"fftw3-mpi.h\"" cannam@127: echo "#include \"ifftw-mpi.h\"" cannam@127: echo cannam@127: cannam@127: # Declare prototypes using FFTW_EXTERN, important for Windows DLLs cannam@127: grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl | grep "MPI_Fint" | sed 's/^/FFTW_EXTERN /;s/$/;/' cannam@127: cannam@127: grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl cannam@127: cannam@127: