Skip to content

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

Closed
@LukasvdWiel

Description

@LukasvdWiel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions