Skip to content

parallel nfu building + CI clarity changes#410

Open
ilaflott wants to merge 8 commits into
NOAA-GFDL:mainfrom
ilaflott:nfu.parallel.and.CI.clarity
Open

parallel nfu building + CI clarity changes#410
ilaflott wants to merge 8 commits into
NOAA-GFDL:mainfrom
ilaflott:nfu.parallel.and.CI.clarity

Conversation

@ilaflott

@ilaflott ilaflott commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

Closes #405 and #408

How Has This Been Tested?
see checks

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

underwoo and others added 2 commits June 10, 2026 15:17
  Under make -j, make scheduled two independent jobs that both compiled
  libnfu/nfu.F90: the .F90.o rule (producing nfu.o for libnfu.a) and the
  .F90.$(FC_MODEXT) suffix rule (producing nfu_mod.mod for
  nfu_compress.o's prerequisite). Because AM_FCFLAGS uses $(FC_MODOUT)$(@d),
  both gfortran processes wrote to the same libnfu/nfu_mod.mod0 temp file
  and raced to rename it, causing the intermittent error:

    f951: Fatal Error: Cannot rename module file 'libnfu/nfu_mod.mod0'
    to 'libnfu/nfu_mod.mod': No such file or directory

  Fix by adding an explicit no-op rule in lib/libnfu/local.mk:

    libnfu/nfu_mod.$(FC_MODEXT): libnfu/nfu.$(OBJEXT)
        @:

  This overrides the .F90.$(FC_MODEXT) suffix rule so nfu.F90 is compiled
  only once. nfu_mod.mod is treated as a side effect of building nfu.o,
  and nfu_compress.o waits for it via the existing prerequisite.

  Also replace the duplicate clean-local rule in local.mk (which produced
  a make warning) with CLEANFILES += entries, and add CLEANFILES = in
  lib/Makefile.am to initialise the variable before local.mk uses +=.

  Fix a typo in tools/simple_hydrog/lakes/Makefile.am: the prerequisite
  horiz_intrep.$(OBJEXT) did not match any source file; corrected to
  horiz_interp.$(OBJEXT).

  Closes: NOAA-GFDL#405
The Fortran compiler writes .mod files into .mods/ subdirectories
(src/.mods/, src/plevel/.mods/) but clean-local never removed those
directories, causing distcleancheck to report leftover files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ilaflott ilaflott linked an issue Jun 11, 2026 that may be closed by this pull request
@ilaflott ilaflott changed the title Nfu.parallel.and.ci.clarity parallel nfu building + CI clarity changes Jun 11, 2026
ilaflott and others added 5 commits June 11, 2026 13:27
@ilaflott ilaflott force-pushed the nfu.parallel.and.CI.clarity branch from 23e0b94 to 353e49b Compare June 11, 2026 17:27
@ilaflott

Copy link
Copy Markdown
Member Author

i think that's it.

sanity_check_file.md only for verification that the right code is being configured- this file can/will be removed pre-merge

Comment thread sanity_check_file.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

removing pre-merge, leaving for now to assist with review

@ilaflott

Copy link
Copy Markdown
Member Author

this is ready for a solid review

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.

make CI jobs / workflow clearer Intermittent parallel build failure: f951 cannot rename nfu_mod.mod0 under make -j

2 participants