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

Autoconf configuration of Python #326

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

marshallward
Copy link
Member

The introduction of makedep means that Python is now a dependency of the MOM6 compilation. On some systems, we cannot assume that python is the name of the interpreter, and strictly should not even assume that it exists.

This is notably an issue on the recent MacOS M1 systems, which use python3 as its interpreter, and do not provide one named python.

This patch adds macros to the MOM6 and FMS autoconf builds to detect if Python is on the system, and makes a few attempts to determine the name of the interpreter (python, python3, python2). Perhaps more can be done here, but this is probably sufficient in nearly all cases.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #326 (92b95a0) into dev/gfdl (4c3b409) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 92b95a0 differs from pull request most recent head fd22b66. Consider uploading reports for the commit fd22b66 to get more accurate results

@@            Coverage Diff            @@
##           dev/gfdl     #326   +/-   ##
=========================================
  Coverage     37.16%   37.16%           
=========================================
  Files           265      265           
  Lines         74505    74505           
  Branches      13837    13837           
=========================================
+ Hits          27687    27690    +3     
+ Misses        41724    41720    -4     
- Partials       5094     5095    +1     
Impacted Files Coverage Δ
src/framework/MOM_document.F90 73.14% <0.00%> (+0.65%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

The introduction of makedep means that Python is now a dependency of the
MOM6 compilation.  On some systems, we cannot assume that `python` is
the name of the interpreter, and strictly should not even assume that it
exists.

This is notably an issue on the recent MacOS M1 systems, which use
`python3` as its interpreter, and do not provide one named `python`.

This patch adds macros to the MOM6 and FMS autoconf builds to detect if
Python is on the system, and makes a few attempts to determine the name
of the interpreter (python, python3, python2).  Perhaps more can be done
here, but this is probably sufficient in nearly all cases.
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

This PR seems sensible enough, and it has passed the TC testing. It has only partially passed the pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/18314 due to known ongoing issues with the Gaea file system. However, given the nature of this PR, it has passed enough tests that I am satisfied that there is no problem here.

@Hallberg-NOAA Hallberg-NOAA merged commit 37b030a into NOAA-GFDL:dev/gfdl Feb 24, 2023
@marshallward marshallward deleted the ac_python_config branch April 21, 2023 15:23
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.

2 participants