annotate src/fftw-3.3.3/mpi/f03-wrap.sh @ 10:37bf6b4a2645

Add FFTW3
author Chris Cannam
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
Chris@10 1 #! /bin/sh
Chris@10 2
Chris@10 3 # Script to generate Fortran 2003 wrappers for FFTW's MPI functions. This
Chris@10 4 # is necessary because MPI provides no way to deal with C MPI_Comm handles
Chris@10 5 # from Fortran (where MPI_Comm == integer), but does provide a way to
Chris@10 6 # deal with Fortran MPI_Comm handles from C (via MPI_Comm_f2c). So,
Chris@10 7 # every FFTW function that takes an MPI_Comm argument needs a wrapper
Chris@10 8 # function that takes a Fortran integer and converts it to MPI_Comm.
Chris@10 9
Chris@10 10 echo "/* Generated automatically. DO NOT EDIT! */"
Chris@10 11 echo
Chris@10 12
Chris@10 13 echo "#include \"fftw3-mpi.h\""
Chris@10 14 echo "#include \"ifftw-mpi.h\""
Chris@10 15 echo
Chris@10 16
Chris@10 17 # Declare prototypes using FFTW_EXTERN, important for Windows DLLs
Chris@10 18 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/$/;/'
Chris@10 19
Chris@10 20 grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl
Chris@10 21
Chris@10 22