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

Fixing a compiler warning in create_xgrid.c #992

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

BijuThomas-NOAA
Copy link
Contributor

@BijuThomas-NOAA BijuThomas-NOAA commented Oct 10, 2024

DESCRIPTION OF CHANGES:

During HAFS v2.0 operational implementation NCO asked the team to resolve all compiler warnings. The "insertIntersect" function in sorc/fre-nctools.fd/shared_lib/create_xgrid.c is declared implicitly and it raises the
compiler warning. In this pull request, the prototype of "insertIntersect" function is added in create_xgrid.c to fix the compiler warning.

TESTS CONDUCTED:

The proposed change was tested in the HAFS system. No other tests were conducted.
Need assistance to conduct the following tests.

  • Compile branch on all Tier 1 machines using Intel (Orion, Jet, Hera, Hercules and WCOSS2).
  • Compile branch on Hera using GNU.
  • Compile branch in 'Debug' mode on WCOSS2.
  • Run unit tests locally on any Tier 1 machine.
  • Run relevant consistency tests locally on all Tier 1 machines.

Optional test.

  • Run full set of chgres_cube consistency tests on Hera.

Describe any additional tests performed.

DEPENDENCIES:

N/A

DOCUMENTATION:

If this PR is contributing new capabilities that need to be documented, please also include updates to the RST files in the docs/source directory as supporting material.

ISSUE:

If this PR is resolving or referencing one or more issues, in this repository or elsewhere, list them here. For example, "Fixes issue mentioned in #123" or "Related to bug in https://github.com/NOAA-EMC/other_repository/pull/63"

@GeorgeGayno-NOAA
Copy link
Collaborator

@BijuThomas-NOAA - On what machine(s) do you see the warning? Does the warning happen with the 'Release' or 'Debug' compiles?

@BijuThomas-NOAA
Copy link
Contributor Author

@BijuThomas-NOAA - On what machine(s) do you see the warning? Does the warning happen with the 'Release' or 'Debug' compiles?

On WCOSS2, build type is Release

/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafsv1p1a_2023rt/sorc/hafs_utils.fd/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1602): warnin
g #266: function "insertIntersect" declared implicitly            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], 0.0, u2, inbound, p1_1[0], p1_1[1], p1_1[2]);

@GeorgeGayno-NOAA
Copy link
Collaborator

@BijuThomas-NOAA - I compiled 2323761 on Cactus in both 'Release' and 'Debug' mode. I did not see that warning. The only warnings I see concern libjpeg, which I don't know how to fix.

@BijuThomas-NOAA
Copy link
Contributor Author

The warning can be reproduced on Cactus in UFS_UTILS submodule (based on 6dee392 I think) in the HAFS production branch once the prototype is removed:

/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafs_prod.v2/sorc/utils_build.log

/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafs_prod.v2/sorc/hafs_utils.fd/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1602): warning #266: function "insertIntersect" declared implicitly
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], 0.0, u2, inbound, p1_1[0], p1_1[1], p1_1[2]);
            ^                                                                                        
                                                                                                     
/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafs_prod.v2/sorc/hafs_utils.fd/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1605): warning #266: function "insertIntersect" declared implicitly
            insertIntersect(grid1List, intersect[0], intersect[1], intersect[2], u1, u2, inbound, p1_0[0], p1_0[1], p1_0[2]);
            ^                                                                                        
                                                                                                     
/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafs_prod.v2/sorc/hafs_utils.fd/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1619): warning #266: function "insertIntersect" declared implicitly
            insertIntersect(grid2List, intersect[0], intersect[1], intersect[2], 0.0, u1, 0, p2_1[0], p2_1[1], p2_1[2]);
            ^                                                                                        
                                                                                                     
/lfs/h2/emc/hur/noscrub/biju.thomas/save/hafs_prod.v2/sorc/hafs_utils.fd/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1621): warning #266: function "insertIntersect" declared implicitly
            insertIntersect(grid2List, intersect[0], intersect[1], intersect[2], u2, u1, 0, p2_0[0], p2_0[1], p2_0[2]);

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