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

mppnccombine.c: move inline function above the calls to the function. #31

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

harshula
Copy link

@harshula harshula commented Mar 3, 2025

  • Needed to support oneapi 2025 compiler.
/tmp/root/spack-stage/spack-stage-mom5-git.2023.11.09_access-om2-ug23iu66zow46gga3b7jkd2e25sg7i3l/spack-src/src/postprocessing/mppnccombine/mppnccombine.c:463:39: error: call to undeclared function 'min'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  463 |                  for (r=block * bf; r<min((block+1)*bf, nrecs); r++)
      |                                       ^

@harshula harshula self-assigned this Mar 3, 2025
@harshula harshula marked this pull request as draft March 3, 2025 00:51
@harshula
Copy link
Author

harshula commented Mar 3, 2025

Testing

==> Waiting for mom5-git.fix-for-oneapi=access-om2-dtmdrj2mmm4h456sheu7fq37dpvlc==> Installing mom5-git.fix-for-oneapi=access-om2-dtmdrj2mmm4h456sheu7fq37dpvlcmlf [25/26]
==> No binary for mom5-git.fix-for-oneapi=access-om2-dtmdrj2mmm4h456sheu7fq37dpvlcmlf found: installing from source
==> No patches needed for mom5
==> mom5: Executing phase: 'edit'
==> mom5: Executing phase: 'build'
==> mom5: Executing phase: 'install'
==> mom5: Successfully installed mom5-git.fix-for-oneapi=access-om2-dtmdrj2mmm4h456sheu7fq37dpvlcmlf
  Stage: 7.77s.  Edit: 0.01s.  Build: 5m 22.78s.  Install: 0.03s.  Post-install: 0.22s.  Total: 5m 31.00s
[+] /opt/release/linux-rocky8-x86_64/oneapi-2025.0.4/mom5-git.fix-for-oneapi_access-om2-dtmdrj2mmm4h456sheu7fq37dpvlcmlf
    mom5:
      require:
        - '@git.fix-for-oneapi=access-om2'
...
    all:
      require:
        - '%[email protected]'
        - 'target=x86_64'
diff --git a/packages/mom5/package.py b/packages/mom5/package.py
index f3ef4fc..8a3bbbf 100644
--- a/packages/mom5/package.py
+++ b/packages/mom5/package.py
@@ -256,14 +256,14 @@ FFLAGS := -fno-alias -safe-cray-ptr -fpe0 -ftz -assume byterecl -i4 -r8 -nowarn
 FFLAGS_OPT := {FFLAGS_OPT}
 FFLAGS_REPORT := -qopt-report=5 -qopt-report-annotate
 FFLAGS_DEBUG := -g3 -O0 -debug all -check -check noarg_temp_created -check nopointer -warn -warn noerrors -ftrapuv -traceback
-FFLAGS_REPRO := -fp-model precise -fp-model source -align all
+FFLAGS_REPRO := -fp-model precise -align all
 FFLAGS_VERBOSE := -v -V -what
 
 CFLAGS := -D__IFC $(INCLUDE)
 CFLAGS_OPT := {CFLAGS_OPT}
 CFLAGS_REPORT := -qopt-report=5 -qopt-report-annotate
 CFLAGS_DEBUG := -O0 -g -ftrapuv -traceback
-CFLAGS_REPRO := -fp-model precise -fp-model source
+CFLAGS_REPRO := -fp-model precise
 
 LDFLAGS :=
 LDFLAGS_VERBOSE := -Wl,-V,--verbose,-cref,-M

@harshula harshula marked this pull request as ready for review March 3, 2025 01:12
@harshula
Copy link
Author

harshula commented Mar 3, 2025

Next step is to fix the MOM5 SPR.

Copy link
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM. Seems a fairly innocuous change.

Copy link

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

LGTM2

@harshula harshula merged commit 75d4eb9 into master Mar 3, 2025
4 checks passed
@harshula harshula deleted the fix-for-oneapi branch March 3, 2025 12:39
harshula added a commit that referenced this pull request Mar 4, 2025
@harshula
Copy link
Author

harshula commented Mar 4, 2025

[gadi-login-03 test-oneapi-2025]$ spack find
==> In environment om2
==> 1 root specs
[+] access-om2@access-om2

==> Installed packages
-- linux-rocky8-x86_64 / [email protected] ------------------------------
[email protected]

-- linux-rocky8-x86_64 / [email protected] ------------------------
access-om2@access-om2             [email protected]=access-om2
[email protected]=access-om2  [email protected]=access-om2
[email protected]                      [email protected]
[email protected]            [email protected]
[email protected]                        [email protected]=access-om2
[email protected]                       [email protected]
[email protected]                       [email protected]
[email protected]     [email protected]
[email protected]                [email protected]
==> 19 installed packages

harshula added a commit that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants