Giter Club home page Giter Club logo

Comments (8)

stevengj avatar stevengj commented on June 16, 2024 1

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 fftw_mpi.pc file installed?

from fftw3.

joelfrederico avatar joelfrederico commented on June 16, 2024

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.

from fftw3.

joelfrederico avatar joelfrederico commented on June 16, 2024

Definitely not a dependency! I'm just hoping for a pc file that reflects whether or not FFTW was compiled with MPI enabled.

from fftw3.

mkrupcale avatar mkrupcale commented on June 16, 2024

@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, module load mpi/mpich-x86_64 or similar will set PKG_CONFIG_PATH appropriately to handle this; unloading (or not loading) the module will search the default search path to link against the serial versions alone. Thus, no unnecessary dependencies will be pulled into code linking against the serial version FFTW in this case.

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.

from fftw3.

stevengj avatar stevengj commented on June 16, 2024

@mkrupcale, you don't switch between serial and MPI versions of the FFTW library. libfftw_mpi is a library that is installed in addition to the serial FFTW, and you need to link both the serial libfftw and the MPI libfftw_mpi in order to use the MPI FFTW.

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.

from fftw3.

mkrupcale avatar mkrupcale commented on June 16, 2024

@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: Libs: -L${libdir} @LIBFFTW3MPI@ -lfftw3@PREC_SUFFIX@ @LIBQUADMATH@. Indeed, both the serial and MPI pkg-config files will be installed, albeit in different directories and with the same name.

from fftw3.

morrisonlevi avatar morrisonlevi commented on June 16, 2024

libfftw_mpi is a library that is installed in addition to the serial FFTW, and you need to link both the serial libfftw and the MPI libfftw_mpi in order to use the MPI FFTW.

Seems like a classic pkg-config Requires. Is there any opposition to an fftw3_mpi.pc.in template? I can try my hand at a PR for it, though it will probably be incomplete and incorrect since it's my first time working with such tools (I usually do CMake packages).

from fftw3.

paugier avatar paugier commented on June 16, 2024

It seems that fftw3_mpi.pc would indeed be useful. I don't see how to cleanly use libfftw_mpi with Meson without this file.

from fftw3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.