Skip to content
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

Request support for gfortran + IntelMPI #974

Open
rileychall opened this issue Dec 7, 2023 · 2 comments
Open

Request support for gfortran + IntelMPI #974

rileychall opened this issue Dec 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@rileychall
Copy link

rileychall commented Dec 7, 2023

Description

I'm trying to build an MPI Fortran program using gfortran and Intel MPI. However it immediately fails with this message:

$ fpm build --flag '-ffree-line-length-none'
<ERROR> *cmd_build* Model error: local MPICH library wrapper does not support flag -compile-info
STOP 1

To my knowledge, there is no MPICH on this system. Also, the mpif90 that is in the path does correctly respond to -compile-info:

$ mpif90 -compile-info
gfortran -I"/home/hallrc/intel/oneapi/mpi/2021.11/include/mpi/gfortran/9.1.0" [...]

The --verbose option does not show any more information.* Adding --compiler 'mpif90' gives the same result, so it looks like it's finding the wrapper I intend. --compiler 'mpiifort' appears to work correctly. The code is incompatible and it fails, but it does successfully compile the first few files:

$ fpm build --compiler 'mpiifort'
 + which mpiexec
/home/hallrc/intel/oneapi/mpi/2021.11/bin/mpiexec
emuinit.F                              done.
md_io.F                                done.
[... until actual compile error]

compiler 'mpiifx' also immediately fails, but with a different message:

$ fpm build --compiler 'mpiifx'
<ERROR> *cmd_build* Model error: cannot find MPI wrappers or libraries for ifx compiler
STOP 1

This seems like a separate issue to me, but I'm including it just in case. I am using the recently released 2024 Intel compilers, so I could see this just being something needs to updated to accommodate.

Expected Behaviour

I was expecting this to work the same way as on the other systems I've tried. In the event that it didn't work, I was expecting a more relevant error message.

Version of fpm

0.9.0

Platform and Architecture

Ubuntu 22.04

Additional Information

  • gfortran 9.5.0
  • Intel MPI 2021.11

Just for some context, this is using "Bad system 1" from #973. I ran into this while trying Intel MPI as an alternative to Open MPI.

Here is the full mpif90 -compile-info/mpif90 -show, in case it contains any clues:

$ mpif90 -compile-info
gfortran -I"/home/hallrc/intel/oneapi/mpi/2021.11/include/mpi/gfortran/9.1.0" -I"/home/hallrc/intel/oneapi/mpi/2021.11/include" -I"/home/hallrc/intel/oneapi/mpi/2021.11/include/mpi" -L"/home/hallrc/intel/oneapi/mpi/2021.11/lib" -L"/home/hallrc/intel/oneapi/mpi/2021.11/lib" -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker "/home/hallrc/intel/oneapi/mpi/2021.11/lib" -Xlinker -rpath -Xlinker "/home/hallrc/intel/oneapi/mpi/2021.11/lib" -lmpifort -lmpi -lrt -lpthread -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl

*With this line, it looks like --verbose should have printed something useful but didn't. Though I could definitely be misunderstanding it.

@rileychall rileychall added the bug Something isn't working label Dec 7, 2023
@perazz
Copy link
Contributor

perazz commented Dec 8, 2023

gfortran + IntelMPI is not among the supported use cases yet.
It seems relatively straightforward to support it, I will leave here a reference to the relevant piece of code:

if (compiler%is_intel()) then

@rileychall
Copy link
Author

Ah, of course. I did miss that. Do you know why it would produce that error? And is there any significance to gfortran + Intel MPI working on a different system, as on the "Good system" in my other issue?

@perazz perazz changed the title MPI build fails to start and gives seemingly incorrect error message Request support for gfortran + IntelMPI Dec 13, 2023
@perazz perazz added enhancement New feature or request and removed bug Something isn't working labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants