Skip to content

gh-106962: Detect mpicc in configure.ac #106961

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

Merged
merged 4 commits into from
Jul 22, 2023
Merged

Conversation

LukasvdWiel
Copy link
Contributor

@LukasvdWiel LukasvdWiel commented Jul 21, 2023

title:
Fixing Python configure script to handle MPI wrapper around GCC compiler.

summary of the changes made:
Added mpicc to the list of possible compilers that the configure script checks for.

Issue: gh-106962

Full description:

When compiling Python with the MPI wrapper around the GNU C-compilers: mpicc, the configure script that determines the compiler options sees mpicc 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 error is prevented.

hen compiling Python with the MPI wrapper around the GNU C-compilers: mpicc, the configure script
that determines the compiler options sees mpicc 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 error is prevented.
@ghost
Copy link

ghost commented Jul 21, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@LukasvdWiel
Copy link
Contributor Author

LukasvdWiel commented Jul 21, 2023

This does not only apply to configure.ac, but exactly the same thing to the main configure script.

Have created issue number: 106962

@sunmy2019 sunmy2019 changed the title Update configure.ac gh-106962: Update configure.ac Jul 22, 2023
@sunmy2019
Copy link
Member

You also need to regenerate configure with autoconf

@erlend-aasland erlend-aasland changed the title gh-106962: Update configure.ac gh-106962: Detect mpicc in configure.ac Jul 22, 2023
@erlend-aasland erlend-aasland added the needs backport to 3.12 only security fixes label Jul 22, 2023
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@@ -2656,6 +2656,9 @@ yes)
esac

case "$CC" in
*mpicc*)
CFLAGS_NODIST="$CFLAGS_NODIST"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly, this line is not needed; we could for example do:

Suggested change
CFLAGS_NODIST="$CFLAGS_NODIST"

I'm also fine with the current line.

@erlend-aasland erlend-aasland enabled auto-merge (squash) July 22, 2023 22:37
@erlend-aasland erlend-aasland merged commit 9a6b278 into python:main Jul 22, 2023
@miss-islington
Copy link
Contributor

Thanks @LukasvdWiel for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-107081 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 22, 2023
erlend-aasland pushed a commit that referenced this pull request 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 <[email protected]>
jtcave pushed a commit to jtcave/cpython that referenced this pull request 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 pull request 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants