New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: fftw.pc.in conditional MPI library inclusion #57
Comments
|
I'd like this, I'm compiling with FFTW MPI long precision and it would be nice to just have a pkg-config line in my configure.ac and be done. As it is, I have to check for fftw3l and then add the mpi myself, and there's no guarantee that fftw3 hasn't been compiled without mpi support, even if mpi is present. |
|
I don't think code linking to the serial FFTW should pull in an MPI dependency. (Particularly as there can be multiple conflicting MPI libraries installed on the same system.) Maybe there should just be a |
|
Definitely not a dependency! I'm just hoping for a pc file that reflects whether or not FFTW was compiled with MPI enabled. |
|
@stevengj Like I said, I don't know how other systems/distributions handle MPI vs non-MPI pgk-config files, but in Fedora they will be installed into different directories and will not conflict with one another (even with multiple MPI libraries on the same system). When the user desires to link against the MPI versions, For generalizing to systems without environment modules and separate pkg-config directories, your suggestion of an alternatively named MPI pkg-config file might be appropriate, though. |
|
@mkrupcale, you don't switch between serial and MPI versions of the FFTW library. Because we install both the serial and MPI libraries simultaneously, it would make sense to me to install both serial and MPI pkgconfig files simultaneously. |
|
@stevengj Yes, I know that both the serial and MPI versions of the library must be linked in order to use MPI FFTW. This is why the MPI library is conditionally added to the pkg-config libs for the MPI version: |
Seems like a classic pkg-config |
I understand that the position of those working on FFTW is to minimize library dependencies (at least with regards to
pthreadsandfftw3*_threads), but when building FFTW with MPI enabled, it may be desirable to include-lfftw3*_mpiin the pkg-config libraries portion. I'm not sure if this may cause problems on other systems, but at least in Fedora, thefftw3*.pcfiles will be installed in their respective MPIPKG_CONFIG_PATH(i.e./usr/lib64/mpich/lib/pkgconfigor similar) and will not conflict with those non-MPI pc files when the user loads the corresponding MPI module (i.e.module load mpi/mpich-x86_64) for configuring and building with MPI.In any case, an easy way to conditionally include
-lfftw3*_mpiis in theconfigure.acfile add under theif test "$enable_mpi" = "yes"; thentest the linesLIBFFTW3MPI=-lfftw3${PREC_SUFFIX}_mpiAC_SUBST(LIBFFTW3MPI)and change the
Libs:infftw.pc.intoLibs: -L${libdir} @LIBFFTW3MPI@ -lfftw3@PREC_SUFFIX@ @LIBQUADMATH@.The text was updated successfully, but these errors were encountered: