Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.5/mpi/f03-wrap.sh @ 42:2cd0e3b3e1fd
Current fftw source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:40:26 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
41:481f5f8c5634 | 42:2cd0e3b3e1fd |
---|---|
1 #! /bin/sh | |
2 | |
3 # Script to generate Fortran 2003 wrappers for FFTW's MPI functions. This | |
4 # is necessary because MPI provides no way to deal with C MPI_Comm handles | |
5 # from Fortran (where MPI_Comm == integer), but does provide a way to | |
6 # deal with Fortran MPI_Comm handles from C (via MPI_Comm_f2c). So, | |
7 # every FFTW function that takes an MPI_Comm argument needs a wrapper | |
8 # function that takes a Fortran integer and converts it to MPI_Comm. | |
9 | |
10 echo "/* Generated automatically. DO NOT EDIT! */" | |
11 echo | |
12 | |
13 echo "#include \"fftw3-mpi.h\"" | |
14 echo "#include \"ifftw-mpi.h\"" | |
15 echo | |
16 | |
17 # Declare prototypes using FFTW_EXTERN, important for Windows DLLs | |
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/$/;/' | |
19 | |
20 grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl | |
21 | |
22 |