ufs-community / UFS_UTILS

Utilities for the NCEP models.
Other
21 stars 104 forks source link

Code compilation warning issue found during the AQMv7 code delivery #868

Closed JianpingHuang-NOAA closed 6 months ago

JianpingHuang-NOAA commented 9 months ago

UFS_UTILS is part of the AQMv7 code delivery package. AQMv7 code delivery package was returned due to the violation of EE2 compliance. Code compilation warning is part of the reasons.

1) Code checkout for UFS_UTILS repo_url = https://github.com/ufs-community/UFS_UTILS hash = ebbe14b

2) Warning message:

/lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1602): warning #266: function "insertIntersect" declared implicitly /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1605): warning #266: function "insertIntersect" declared implicitly /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1619): warning #266: function "insertIntersect" declared implicitly /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/sorc/fre-nctools.fd/shared_lib/create_xgrid.c(1621): warning #266: function "insertIntersect

We need to get those warnings fixed as soon as possible. Your support is critical for us to redeliver the AQMv7 package.

Thanks,

Jianping

GeorgeGayno-NOAA commented 9 months ago

@JianpingHuang-NOAA - Does your implementation use the fre-nctools? If not, we can easily turn off the compilation of that code. In fact, the build was updated so users can build only what they need.

GeorgeGayno-NOAA commented 9 months ago

Also, are you using release v1.10.0? https://github.com/ufs-community/UFS_UTILS/releases/tag/ufs_utils_1_10_0

JianpingHuang-NOAA commented 9 months ago

It seems not, the hash number (ebbe14b) we used is different from the one you mentioned (d1e928b). Should we update this hash number (d1e928b)?

GeorgeGayno-NOAA commented 9 months ago

It seems not, the hash number (ebbe14b) we used is different from the one you mentioned (d1e928b). Should we update this hash number (d1e928b)?

I recommend that users point to official releases if possible. The latest release is v1.11.0: https://github.com/ufs-community/UFS_UTILS/releases/tag/ufs_utils_1_11_0

JianpingHuang-NOAA commented 9 months ago

[ufs_utils] protocol = git repo_url = https://github.com/ufs-community/UFS_UTILS branch = ufs_utils_1_11_0 local_path = UFS_UTILS required = True

Please confirm the way that I am doing is correct. Thanks

GeorgeGayno-NOAA commented 9 months ago

[ufs_utils] protocol = git repo_url = https://github.com/ufs-community/UFS_UTILS branch = ufs_utils_1_11_0 local_path = UFS_UTILS required = True

Please confirm the way that I am doing is correct. Thanks

Try it.

JianpingHuang-NOAA commented 9 months ago

@GeorgeGayno-NOAA

I did re-check out the UFS_UTILs code with hash = 72701ab, which corresponds to the release branch, ufs_utils_1_11_0 but still got the same error message.

Please see the UFS_UTILS code on Dogwood at /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS

and the compile log files /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/ buildup.log_ufs_utils_1_11_0 warning.log_ufs_utils_1_11_0

Thanks !

GeorgeGayno-NOAA commented 9 months ago

@JianpingHuang-NOAA - using v1.11.0 allows you to turn off the compilation of unused programs. Does your implementation use fre-nctools.fd? If not, you can turn off the compilation as follows:

export CMAKE_OPTS="-DFRENCTOOLS=OFF"

Then invoke build_all.sh.

JianpingHuang-NOAA commented 9 months ago

@GeorgeGayno-NOAA I did a quick compiling test by following your suggestion. I did not see those warnings anymore. I will test the package once Cactus is available for developers' use. Thanks !

GeorgeGayno-NOAA commented 9 months ago

@GeorgeGayno-NOAA I did a quick compiling test by following your suggestion. I did not see those warnings anymore. I will test the package once Cactus is available for developers' use. Thanks !

I am curious. Which UFS_UTILS programs are used by AQMv7? The ones that are not used can also be turned off at compile time.

JianpingHuang-NOAA commented 9 months ago

@GeorgeGayno-NOAA AQMv7 is the first UFS-based online-CMAQ model. This means that we need to run the UFS-based atmospheric model and chemistry model simultaneously. We use UFS_Utils to generate lateral boundary and initial conditions for meteorological fields. I need to figure out how many of the UFS_Utils that AQMv7 requires.

JianpingHuang-NOAA commented 9 months ago

@GeorgeGayno-NOAA I did a test by turning off fre-nctools.fd through the following setting in the build.sh script. export CMAKE_OPTS="-DFRENCTOOLS=OFF"

The run was completed successfully and the results were identical to the ones from our real-time runs.

In addition, it is noticed that only one utility, chgres_cube.fd is used by the AQMv7 package. Can you create a release branch or tag by turning off other utilities to support the AQMv7 implementation? Thanks !

GeorgeGayno-NOAA commented 8 months ago

@JianpingHuang-NOAA - I would like to avoid creating special tags for every specific implementation. Use can use the existing logic to turn off the build of unneeded programs. For example, in your instructions to NCO you can specify how to build the repo, maybe in a small script. Example:

#!/bin/bash

set -x

CMAKE_OPTS="-DFRENCTOOLS=OFF -DICEBLEND=OFF -DSNOW2MDL=OFF -DGCYCLE=OFF -DGRIDTOOLS=OFF"
CMAKE_OPTS="${CMAKE_OPTS} -DOROG_MASK_TOOLS=OFF -DSFC_CLIMO_GEN=OFF -DVCOORD_GEN=OFF"
CMAKE_OPTS="${CMAKE_OPTS} -DFVCOMTOOLS=OFF -DGBLEVENTS=OFF -DCPLD_GRIDGEN=OFF -DWEIGHT_GEN=OFF"

export CMAKE_OPTS

./build_all.sh

exit
JianpingHuang-NOAA commented 8 months ago

@GeorgeGayno-NOAA I tried the way you suggested or modified buil_all.sh directly to turn off all other utilities except for chgres_cube, but still seeing that other 11 more exec files were created. Please see the modified build_all.sh at /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/

and the exec files at /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/exec

GeorgeGayno-NOAA commented 8 months ago

@GeorgeGayno-NOAA I tried the way you suggested or modified buil_all.sh directly to turn off all other utilities except for chgres_cube, but still seeing that other 11 more exec files were created. Please see the modified build_all.sh at /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/

and the exec files at /lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/exec

Remove the exec directory, then try again.

JianpingHuang-NOAA commented 8 months ago

@GeorgeGayno-NOAA It works. Thanks !

@chan-hoo . Can you update the UFS_UTILS with hash = 72701ab and modify the devbuild.sh script with the updated build_all.sh for UFS_UTILS at

/lfs/h2/emc/physics/noscrub/jianping.huang/nwdev/packages/aqm.v7.0.88c/sorc/UFS_UTILS/build_all.sh

or include the following cmake options for UFS_UTILS

CMAKE_OPTS="-DFRENCTOOLS=OFF -DICEBLEND=OFF -DSNOW2MDL=OFF -DGCYCLE=OFF -DGRIDTOOLS=OFF" CMAKE_OPTS="${CMAKE_OPTS} -DOROG_MASK_TOOLS=OFF -DSFC_CLIMO_GEN=OFF -DVCOORD_GEN=OFF " CMAKE_OPTS="${CMAKE_OPTS} -DFVCOMTOOLS=OFF -DGBLEVENTS=OFF -DCPLD_GRIDGEN=OFF -DWEIGHT_GEN=OFF"

export CMAKE_OPTS

JianpingHuang-NOAA commented 8 months ago

@chan-hoo In addition, Steven (NCO) suggests to delete the following files under ~/versions

run.ver.wcoss2 build.ver.wcoss2

Thanks,

chan-hoo commented 8 months ago

@JianpingHuang-NOAA, I've updated the production/AQM.v7 branch: https://github.com/ufs-community/ufs-srweather-app/commit/4c561920cf43c5d0e53843507ece68d709811c3b In this commit, some version files were removed and only executable files are moved to the exec directory as requested.

GeorgeGayno-NOAA commented 6 months ago

A work-around was developed. Will close this issue. At some point the actual warnings should be addressed