The MPI_Comm_f2c errors make me nervous; I don't know the FFTW code base
at all, but that's a kind of error that you typically see when the
programmer is incorrectly manipulating MPI handles.
Poking through mpi/fftw_f77_mpi.c in the FFTW 2.1.5 code base, I see
stuff like this:
-----
void F77_FUNC_(fftw_f77_mpi_create_plan,FFTW_F77_MPI_CREATE_PLAN)
(fftw_mpi_plan *p, void *comm, int *n, int *idir, int *flags)
{
fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD;
*p = fftw_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *n,dir,*flags);
}
-----
Notice that the type for "comm" is (void *). I'm guessing that it
should be (int *), because this is an MPI handle that will be coming in
from Fortran code (where MPI handles are defined to always be integers).
Additionally, the FFTW_MPI_COMM_F2C macro is currently defined as:
-----
#if defined(HAVE_MPI_COMM_F2C)
# define FFTW_MPI_COMM_F2C(comm) MPI_Comm_f2c(*((MPI_Comm *) comm))
#elif defined(FFTW_USE_F77_MPI_COMM)
# define FFTW_MPI_COMM_F2C(comm) (* ((MPI_Comm *) comm))
-----
Those (MPI_Comm*)'s should be (int *)'s because these are arguments that
are coming in from Fortran (and therefore should be integers).
Depending on the type of MPI_Comm, this macro could lead to erroneous
behavior on 64 bit machines where using FFTW with Fortran codes.
> -----Original Message-----
> From: lam-bounces_at_[hidden]
> [mailto:lam-bounces_at_[hidden]] On Behalf Of Brad Krane
> Sent: Monday, April 24, 2006 10:51 PM
> To: General LAM/MPI mailing list; FFTW List
> Subject: Re: LAM: Compiling FFTW under LAM/MPI
>
> I tried your suggestion just now Ralf, by using make
> LDFLAGS=--no-undefined and it solved all of the undefined reference
> errors but the rest of them are still there and it added another error
> "cc1: error" near the end there.
>
> I've included the output of this lattest attempt (LD_LIBRARY_PATH has
> been set previous to this) below and it should look ok limited to 80
> character per line and a fixed width font, instead of putting it in a
> jpg image.
>
> $ make LDFLAGS=--no-undefined > make.txt
> libtool: link: warning: undefined symbols not allowed in
> i686-pc-cygwin shared libraries
> libtool: link: warning: undefined
> symbols not allowed in i686-pc-cygwin shared libraries
> Info: resolving
> _optarg by linking to __imp__optarg (auto-import) Info:
> resolving _optind by linking to __imp__optind (auto-import)
> Info: resolving _optarg by linking to __imp__optarg (auto-import)
> Info: resolving _optind by linking to __imp__optind
> (auto-import) fftw_f77_mpi.c: In function
> `fftw_f77_mpi_create_plan__': fftw_f77_mpi.c:35:
> warning: passing arg 1 of `MPI_Comm_f2c' makes integer from pointer
> without a cast
> fftw_f77_mpi.c: In function `fftwnd_f77_mpi_create_plan__':
> fftw_f77_mpi.c:71: warning: passing arg 1 of `MPI_Comm_f2c'
> makes integer from pointer without a cast
> fftw_f77_mpi.c: In function
> `fftw2d_f77_mpi_create_plan__': fftw_f77_mpi.c:81:
> warning: passing arg 1 of `MPI_Comm_f2c' makes integer from pointer
> without a cast
> fftw_f77_mpi.c: In function `fftw3d_f77_mpi_create_plan__':
> fftw_f77_mpi.c:90: warning: passing arg 1 of `MPI_Comm_f2c'
> makes integer from pointer without a cast
> libtool: link: warning: undefined symbols
> not allowed in i686-pc-cygwin shared libraries
> rfftw_f77_mpi.c: In
> function `rfftwnd_f77_mpi_create_plan__':
> rfftw_f77_mpi.c:39: warning: passing arg 1 of `MPI_Comm_f2c' makes
> integer from pointer without a cast
> rfftw_f77_mpi.c: In function
> `rfftw2d_f77_mpi_create_plan__': rfftw_f77_mpi.c:49:
> warning: passing arg 1 of `MPI_Comm_f2c' makes integer from pointer
> without a cast
> rfftw_f77_mpi.c: In function `rfftw3d_f77_mpi_create_plan__':
> rfftw_f77_mpi.c:58: warning: passing arg 1 of `MPI_Comm_f2c'
> makes integer from pointer without a cast
> $ ~~
> ibraries
> cc1: error: unrecognized
> command line option "-fno-undefined" mpicc: No such
> file or directory
> make[1]: *** [test_sched] Error 1
> make: *** [all-recursive] Error 1
>
> On 4/24/06, Ralf Wildenhues <Ralf.Wildenhues_at_[hidden]> wrote:
> > Hi Brad,
> >
> > * Brad Krane wrote on Mon, Apr 24, 2006 at 10:26:54PM CEST:
> > > Hello I was wondering if someone would be able to give me some
> > > direction that would help me to compile the FFTW 2.1.5
> library in my
> > > Cygwin environment. After some trouble and some work I managed to
> > > compile LAM succesfully but when I try and compile the
> FFTW library
> > > (following all of the installation instructins to the T
> of course) I
> > > keep getting neumerious libtool warnings and then finally
> a collect2
> > > exit error and a mpicc not found. Could it be that a LAM
> directory is
> > > not in my path?
> >
> > I reported a related issue to the FFTW developers a few weeks ago.
> > You could try (untested)
> > make LDFLAGS=-no-undefined
> >
> > for now (after removing all FFTW libs you may have built
> already), but I
> > don't know whether it will work; I can look further into
> this issue, but
> > it may be a few days until I get to it.
> >
> > Cheers,
> > Ralf
> > _______________________________________________
> > This list is archived at http://www.lam-mpi.org/MailArchives/lam/
> >
>
>
> --
> Brad
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
|