Skip to content

Modules fix explicit interface compiler warnings in post#1351

Merged
BenjaminBlake-NOAA merged 12 commits into
NOAA-EMC:developfrom
NickSzapiro-NOAA:warnings_upp
Oct 30, 2025
Merged

Modules fix explicit interface compiler warnings in post#1351
BenjaminBlake-NOAA merged 12 commits into
NOAA-EMC:developfrom
NickSzapiro-NOAA:warnings_upp

Conversation

@NickSzapiro-NOAA
Copy link
Copy Markdown
Contributor

For UFSATM to have explicit interfaces to UPP subroutines (NOAA-EMC/ufsatm#1008), those subroutines are added to modules on UPP side with minimal code changes.

Compiler then raised some intent in vs. inout errors on UPP side when calling EXCH, and those are changed here too

@WenMeng-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA Per the UPP code process requirements, could you open a UPP github issue to link this PR?

@WenMeng-NOAA WenMeng-NOAA added the enhancement New feature or request label Oct 27, 2025
@NickSzapiro-NOAA
Copy link
Copy Markdown
Contributor Author

Thank you, @WenMeng-NOAA . Please see #1352

@WenMeng-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA The UPP build test on WCOSS2 failed as:

[ 96%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/INITPOST.F.o
[ 97%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/INITPOST_MPAS.F.o
[ 97%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/getIVariableN.f.o
[ 98%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/getVariable.f.o
[ 99%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/INITPOST_NEMS.f.o
[100%] Linking Fortran executable upp.x
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: libjpeg.so.62, needed by /apps/spack/jasper/2.0.25/intel/19.1.3.304/sjib74krrorkyczqpqah4tvewmlnqdx4/lib64/libjasper.so, may conflict with libjpeg.so.9
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/INITPOST.F.o: in function `initpost_':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST.F:3037:(.text+0x33b7d): undefined reference to `table_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST.F:3040:(.text+0x33bb4): undefined reference to `tableq_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/INITPOST_MPAS.F.o: in function `initpost_mpas_':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_MPAS.F:2798:(.text+0x34ba1): undefined reference to `table_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_MPAS.F:2801:(.text+0x34bd8): undefined reference to `tableq_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/INITPOST_NETCDF.f.o: in function `initpost_netcdf_':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_NETCDF.f:3901:(.text+0x20450): undefined reference to `table_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_NETCDF.f:3904:(.text+0x20487): undefined reference to `tableq_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/WRFPOST.F.o: in function `MAIN__':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/WRFPOST.F:757:(.text+0x3af7): undefined reference to `de_allocate_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/INITPOST_GFS_NEMS_MPIIO.f.o: in function `initpost_gfs_nems_mpiio_':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f:3938:(.text+0x50949): undefined reference to `table_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f:3941:(.text+0x50980): undefined reference to `tableq_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/upp.x.dir/INITPOST_NEMS.f.o: in function `initpost_nems_':
/u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_NEMS.f:2697:(.text+0x1d31a): undefined reference to `table_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /u/wen.meng/ptmp/nick/UPP/sorc/ncep_post.fd/INITPOST_NEMS.f:2700:(.text+0x1d351): undefined reference to `tableq_'
make[2]: *** [sorc/ncep_post.fd/CMakeFiles/upp.x.dir/build.make:324: sorc/ncep_post.fd/upp.x] Error 1
make[1]: *** [CMakeFiles/Makefile2:115: sorc/ncep_post.fd/CMakeFiles/upp.x.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Could you take a look at that?

@NickSzapiro-NOAA
Copy link
Copy Markdown
Contributor Author

Thanks @WenMeng-NOAA . I've updated those to use the modules too.

I also see that the GCC Linux Build GHAction is failing but I can't find lines for the errors (?)

@BenjaminBlake-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA I tested the build on WCOSS2 and it now works for me - thanks!

I compared the GCC Linux Build log file to one that completed successfully and it looks like the error occurs on line 759:
/home/runner/work/UPP/UPP/UPP/sorc/ncep_post.fd/ALLOCATE_ALL.f:48: error: Member allocate_all() (function) of module allocate_all_upp_mod is not documented. (warning treated as error, aborting now)

@NickSzapiro-NOAA
Copy link
Copy Markdown
Contributor Author

Thanks @BenjaminBlake-NOAA ! Looks GCC Linux Build error is from doxygen WARN_AS_ERROR. Adding doc lines fixes it, if there is preference for what the comments should say

@WenMeng-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA Could you run a test with your latest commit from ufsatm side before we wrap up this PR for processing?

@BenjaminBlake-NOAA BenjaminBlake-NOAA added the No Baseline Change No baseline of the UPP regression tests are made. label Oct 28, 2025
@NickSzapiro-NOAA
Copy link
Copy Markdown
Contributor Author

Sure. ufs-weather-model RTs pass bit-for-bit (ufs-community/ufs-weather-model#2958) and related compiler warnings are resolved.

@BenjaminBlake-NOAA
Copy link
Copy Markdown
Collaborator

The RTs completed successfully on WCOSS2 with no baseline changes.

@WenMeng-NOAA
Copy link
Copy Markdown
Collaborator

@clyden-noaa This PR is ready for the UPP RTs on R&D machines. There should be no baseline changes expected.

@clyden-noaa clyden-noaa moved this to Review in PRs to Process Oct 29, 2025
@clyden-noaa clyden-noaa moved this from Review to Ready for Testing in PRs to Process Oct 29, 2025
Copy link
Copy Markdown
Collaborator

@clyden-noaa clyden-noaa left a comment

Choose a reason for hiding this comment

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

@WenMeng-NOAA @NickSzapiro-NOAA @BenjaminBlake-NOAA
Testing is now complete.
All RTs passed successfully with no errors, and all tests completed within timing thresholds.

Copy link
Copy Markdown
Collaborator

@BenjaminBlake-NOAA BenjaminBlake-NOAA left a comment

Choose a reason for hiding this comment

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

Testing has been completed on all platforms and this PR is now ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request No Baseline Change No baseline of the UPP regression tests are made. Ready for commit queue Ready for Review This PR is ready for code review.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

"Explicit interface or EXTERNAL declaration is required" compiler warnings in UFSATM associated with UPP subroutines

4 participants