-
Notifications
You must be signed in to change notification settings - Fork 900
[feature request] packaging for multiple Fortran compilers #2056
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
Comments
Fujitsu MPI, which is based on Open MPI, also provides multiple compiler support unofficially (not general product). The issue is not specific to Fortran (and removed C++). Even for C, OpenMP support is not ABI compatible. So Fujitsu MPI provides The implementation is not same as the one which @jeffhammond suggested. But if someone need this, I can contribute it to Open MPI. User's viewAll MPI wrapper compilers are installed in the same directory ( All shared libraries have distinct names (e.g.
Developer's viewDevelopers need to run Though this does not save sysadmin's time, but saves filesystem metadata. |
@kawashima-fj It sounds like Fujitsu MPI does what users are doing already, meaning recompiling the full library for every compiler toolchain. Did I misunderstand you? I was hoping for an implementation that would only compile the Fortran interface faces for every Fortran compiler, but reuse the C object codes for all Fortran compilers, for a single C compiler. OpenMP might break C ABI compatibility when used to build object files but this should not affect the compilation of C source files in Open-MPI because it does not use OpenMP constructs, nor does it include |
@jeffhammond You understood correctly. The mechanism I described is not a solution for you. It's slightly off topic. The merit of the mechanism is mainly for end users, not sysadmins. My OpenMP description was not related to this topic, sorry. Please ignore it. |
@jeffhammond i think we should decouple end user experience and sysadmin experience. sysadmins can script openmpi build/install, and run several builds in parallel. an other nice feature to have is the use of a single fortran wrapper that picks the "right" modules and libs. for example iirc, IntelMPI wrappers do a great job at that about saving disk space, i am afraid you assume all fortran compilers work just fine with the GNU C compiler. though that is very likely true for the Intel Fortran compilers, PGI Fortran compilers do not work out of the box with GNU C compiler (and you can consider this is an Open MPI bug) last but not least, an other nice to have feature is the ability to generate wrappers for both the native compiler and the (several ?) cross compilers |
@ggouaillardet It is a user experience issue if the sysadmin users experience is such that the latter does not build every case. Some sysadmins believe in validating libraries before exposing them to users. Because we have both observed that C correctness can depend on Fortran, at least when PGI is involved (e.g. http://trac.mpich.org/projects/mpich/ticket/1869), sysadmins need to validate the entire build, so building the entire library for N Fortran compilers forces the sysadmin to run N times as many tests. At least in the case where the C library correctness is not dependent on the Fortran compiler, my proposal reduces sysadmin effort. You are right that switching between 32b and 64b I don't see any reason for the wrapper to need to know about MPI thread support. That should be selectable at runtime the same as choosing a BTL/MTL. It is great that all of your filesystems are infinitely large. I use both laptops and supercomputers where this is not the case. |
if you might need iirc, Intel MPI does the same thing under the hood (well, if you use Open MP, then the we previously had a discussion of how Open MPI (or any MPI implementaion) should behave when configure'd with below are two additional though weaker reasons why i'd rather have multiple Open MPI install dir the install dir of the latest master, built with if i assume a sysadmin has already scripted the installation and validation process of Open MPI, then running several instances (one for each C&Fortran compiler) in parallel might require a shorter elapsed time than running one instance with all the Fortran compilers. |
…-mpi-fortran-dir=DIR configure option Refs open-mpi#2056
i made a proof-of-concept at #2070 here is how it can be used
and then you can use note
the Intel built library before you
the GNU build library
Under the hood, when configured with |
…-mpi-fortran-dir=DIR configure option Refs open-mpi#2056 Signed-off-by: Gilles Gouaillardet <[email protected]>
As a note, IBM's Spectrum MPI provides GNU, PGI, and XL Fortran modules that work with the same core MPI library: |
Summary
Please support the ability to build Open-MPI Fortran bindings for multiple Fortran compilers in the same build. This will dramatically improve user experience.
I recognize this is not a small thing to implement, but at least two vendors do this already, and since some vendors use Open-MPI as the basis for their MPI product, it might be the sort of thing that makes sense for the project to support.
Alternative / Workaround
The current solution for multiple Fortran compilers is to build the MPI library once for every toolchain, e.g. one has installation directories
open-mpi-intel15
,open-mpi-intel16
,open-mpi-gcc5
,open-mpi-gcc6
, etc. This naturally leads tompi.mod
andmpi_f08.mod
for every Fortran compiler.While simple, the current solution is a waste of sysadmin time, processor cycles, filesystem metadata, etc. given that one could instead build Open-MPI once with the preferred C compiler once and then support O(n) Fortran compiler wrappers and modules.
Future Workaround
In theory, there could be an implementation-agnostic implementation of the MPI Fortran 2008 bindings that could be compiled independent of the MPI C library, but such a project does not yet exist and in any case, very few users have adopted
use mpi_f08
.Background
The Fortran bindings are largely if not completely independent of the internals of MPI, which are compiled with a C compiler, and C allows for a standard ABI. On the other hand, Fortran does not have a standard ABI and modules must be generated for every compiler vendor, and possibly also multiple (major) versions of the compiler from a single vendor.
Suggested implementation
FCn
for n=1,2,... as an alternative toFC
. The build system would then generate MPI Fortran scripts namedmpi$FC1
,mpi$FC2
, etc., assumingFCn
do not have the full paths, otherwise they will be stripped.-enable-fortran-compilers=$FC1,$FC2
. This is just different syntax for option 1.Ideally, the user can do something like
$PATH_TO_OMPI/configure FC1=ifort FC2=gfortran
and get$OMPI_PREFIX/bin/mpiifort
,$OMPI_PREFIX/bin/mpigfortran
,$OMPI_PREFIX/include/ifort/mpi.mod
,$OMPI_PREFIX/include/gfortran/mpi.mod
,$OMPI_PREFIX/include/ifort/mpi_f08.mod
,$OMPI_PREFIX/include/gfortran/mpi_f08.mod
, and any companion files.Prior Engineering / Proof-of-Principle
Intel MPI
Intel MPI packages the wrappers and modules for Intel Fortran and GNU Fortran.
IBM Blue Gene/Q
IBM supported this on Blue Gene/Q. I do not know the implementation details but can demonstrate the results if anyone needs to see it.
The text was updated successfully, but these errors were encountered: