I’d like to use FFTW’s distributed memory routines and I have several doubts on how to achieve this. I guess one should be able to build that on top of MPI.jl and FFTW.jl, right?
I’m still stuck in very conceptual doubts, so, I’d be really grateful if someone could point me to articles/documentation that could help me better understand those issues.
Here are some of my doubts so far:
1) How julia handles libraries dependencies?
FFTW produces a separate shared library for it’s mpi related stuff “libfftw3_mpi”, which depends on fftw’s serial library “libfftw3”. Of course, it must also be linked to the mpi library.
Although there is no explicit
Libdl.dlopen(lib) in MPI.jl and FFTW.jl, where
lib is the appropriate shared library, my understanding is that it happens implicitly when one
ccalls directly the library, right?
Does that makes the symbols exported by each shared library globally available to other libraries opened in julia?
My understanding from the docs is that, with appropriate flags, that is indeed the case.
2) MPI.jl linked library
It seems MPI.jl builds it’s own library in
/MPI/deps/usr/lib/libjuliampi.dylib (I’m on a mac) and that is the library used in package. Why building this library is necessary, as opposed to linking to mpi libraries directly?
Also, it doesn’t seem this library exports MPI functions:
> nm libjuliampi.dylib U _MPI_Finalize U _MPI_Finalized U _MPI_Initialized U _atexit 0000000000002e90 T _finalize_atexit 0000000000002ee0 T _install_finalize_atexit_hook 0000000000002ef2 T _juliampi_empty_ U _mpi_finalize_ U _mpi_init_ U dyld_stub_binder
I have zero knowledge on MPI’s internals and I’m very confused about what is done on this package.