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