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

Python cannot be compiled with the MPI wrapper around the GCC compiler #106962

Closed
LukasvdWiel opened this issue Jul 21, 2023 · 1 comment
Closed
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@LukasvdWiel
Copy link
Contributor

LukasvdWiel commented Jul 21, 2023

The configure script and configure.ac check for compiler:

case "$CC" in
*icc*)
    # ICC needs -fp-model strict or floats behave badly
    CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
    ;;
*xlc*)
    CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
    ;;
esac

The MPI GCC compiler: mpicc is qualified as the intel compiler, because of the 'icc' in the name, and applies the fp-model strict option to the arguments, which is invalid syntax for GCC, causing multiple compile time errors with recent GCC versions:

gcc: error: unrecognized command-line option ‘-fp-model’; did you mean ‘-fipa-modref’?

By first filtering out the mpicc compiler case, this mistake is prevented:

case "$CC" in
*mpicc*)
    CFLAGS_NODIST="$CFLAGS_NODIST"
    ;;
*icc*)
    # ICC needs -fp-model strict or floats behave badly
    CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
    ;;
*xlc*)
    CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
    ;;
esac

(Now that I have this created, I can no doubt use its issue number to get the pull request with this fix through the pipeline)

Linked PRs

@LukasvdWiel LukasvdWiel added the type-bug An unexpected behavior, bug, or error label Jul 21, 2023
@AlexWaygood AlexWaygood added the build The build process and cross-build label Jul 21, 2023
erlend-aasland pushed a commit that referenced this issue Jul 22, 2023
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 22, 2023
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
(cherry picked from commit 9a6b278)

Co-authored-by: Lukas van de Wiel <30800501+LukasvdWiel@users.noreply.github.com>
erlend-aasland pushed a commit that referenced this issue Jul 23, 2023
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
(cherry picked from commit 9a6b278)

Co-authored-by: Lukas van de Wiel <30800501+LukasvdWiel@users.noreply.github.com>
jtcave pushed a commit to jtcave/cpython that referenced this issue Jul 23, 2023
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
mementum pushed a commit to mementum/cpython that referenced this issue Jul 23, 2023
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
@hugovk
Copy link
Member

hugovk commented Nov 10, 2023

Looks like this has now been fixed, thanks for the report!

@hugovk hugovk closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants