Open jornbr opened 1 year ago
For some reason MPI_INIT
is marked private at https://github.com/microsoft/Microsoft-MPI/blob/7ff6bdcdb1d5dc7b791e47457ee2686cd6b3d355/src/mpi/msmpi/dll/msmpi.def#L2304.
No idea why
Not sure about that. But I suspect the MPI_INIT
symbol is normally (in MS builds) added to msmpifec.lib by this: https://github.com/microsoft/Microsoft-MPI/blob/7ff6bdcdb1d5dc7b791e47457ee2686cd6b3d355/src/mpi/msmpi/fortran/amd64.cdecl.alias#L2346
Note sure why that does not happen in the feedstock build...
I am working on a Python extension module that includes Fortran code with an MPI dependency. When built stand-alone on Windows (without conda), it is compiled with MS Visual Studio and Intel Fortran, and linked against Microsoft's own msmpifec.lib/msmpi.lib. These are detected automatically by cmake, which we use as basis for our build system. This all works fine.
Now we are in the process of migrating to conda distribution, and therefore are switching to conda-build. For our Windows distribution, we would like to build on top of the msmpi distributed via conda-forge. However, it seems the libraries (.lib) that are distributed with that are different from the ones MS provides - possibly because the msmpi feedstock builds from source? In particular, the combination msmpifec.lib/msmpi.lib no longer seems to contain all required symbols (at least not under the name expected by Intel Fortran), leading cmake to consider MPI broken. In fact, "dumpbin /symbols msmpifec.lib" seems to indicate that the msmpifec.lib created by the feedstock lacks the aliases (e.g., MPI_INIT) needed for Fortran linking. The MS original has entries like:
but these seem absent in the msmpifec.lib distributed via conda-forge. Is this something that can be worked around (are these aliases perhaps in another of the .lib files included with the conda-forge msmpi distribution?) Or is msmpi on conda-forge broken in this respect (or simply not suitable for linking to from Intel Fortran?)