annotate src/fftw-3.3.3/mpi/f03-wrap.sh @ 134:41e769c91eca
Add Capnp and KJ builds for OSX
author |
Chris Cannam <cannam@all-day-breakfast.com> |
date |
Tue, 25 Oct 2016 14:48:23 +0100 |
parents |
89f5e221ed7b |
children |
|
rev |
line source |
cannam@95
|
1 #! /bin/sh
|
cannam@95
|
2
|
cannam@95
|
3 # Script to generate Fortran 2003 wrappers for FFTW's MPI functions. This
|
cannam@95
|
4 # is necessary because MPI provides no way to deal with C MPI_Comm handles
|
cannam@95
|
5 # from Fortran (where MPI_Comm == integer), but does provide a way to
|
cannam@95
|
6 # deal with Fortran MPI_Comm handles from C (via MPI_Comm_f2c). So,
|
cannam@95
|
7 # every FFTW function that takes an MPI_Comm argument needs a wrapper
|
cannam@95
|
8 # function that takes a Fortran integer and converts it to MPI_Comm.
|
cannam@95
|
9
|
cannam@95
|
10 echo "/* Generated automatically. DO NOT EDIT! */"
|
cannam@95
|
11 echo
|
cannam@95
|
12
|
cannam@95
|
13 echo "#include \"fftw3-mpi.h\""
|
cannam@95
|
14 echo "#include \"ifftw-mpi.h\""
|
cannam@95
|
15 echo
|
cannam@95
|
16
|
cannam@95
|
17 # Declare prototypes using FFTW_EXTERN, important for Windows DLLs
|
cannam@95
|
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/$/;/'
|
cannam@95
|
19
|
cannam@95
|
20 grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl
|
cannam@95
|
21
|
cannam@95
|
22
|