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

update rt.conf and compile.sh to provide cmake options and avoid a translation layer #615

Closed
wants to merge 19 commits into from
Closed

update rt.conf and compile.sh to provide cmake options and avoid a translation layer #615

wants to merge 19 commits into from

Conversation

aerorahul
Copy link
Contributor

@aerorahul aerorahul commented Jun 2, 2021

PR Checklist

  • Ths PR is up-to-date with the top of all sub-component repositories except for those sub-components which are the subject of this PR.
  • This PR has been tested using a branch which is up-to-date with the top of all sub-component repositories except for those sub-components which are the subject of this PR
  • An Issue describing the work contained in this PR has been created either in the subcomponent(s) or in the ufs-weather-model.

Description

compile.sh reads in the MAKE_OPT which are the deprecated GNU-style options for compilations from rt.conf.
This PR:

  • replaces GNU-style compile options from rt.conf in cmake style.
  • updates compile.sh to pass through MAKE_OPT as is to build.sh which calls cmake.
  • removes confusion as to what is an input to compile.sh and build.sh. E.g. SUITES is (was) input to MAKE_OPT and compile.sh would transform that to -DCCPP_SUITES for use in build.sh. Hereafter, we use -DCCPP_SUITES in rt.conf Similar changes have been made to 32BIT, DEBUG, REPRO, MULTI_GASES, etc.

Issue(s) addressed

Part of #416
More work might be needed based on the comments to this PR.

Testing

How were these changes tested? What compilers / HPCs was it tested with? Are the changes covered by regression tests? (If not, why? Do new tests need to be added?) Have regression tests and unit tests (utests) been run? On which platforms and with which compilers? (Note that unit tests can only be run on tier-1 platforms)

  • hera.intel
  • hera.gnu
  • orion.intel
  • cheyenne.intel
  • cheyenne.gnu
  • gaea.intel
  • jet.intel
  • wcoss_cray
  • wcoss_dell_p3

Dependencies

None.

@DusanJovic-NOAA
Copy link
Collaborator

rt.sh must be updated at two places where MAKE_OPT is used:

if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then

and:

if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then

@aerorahul
Copy link
Contributor Author

This is going to cause conflicts everytime develop is updated, so I am going to wait till it is this PR's turn to resolve all conflicts.
I will fix the issue in this comment needing an update in rt.sh.

aerorahul added 3 commits June 2, 2021 12:14
Change-Id: I85510b236d2ef25e09e6f4578ac6196b3a7e2de1
Change-Id: Ie09f7f4cf645bc6661bc49d73fec21e51edfb728
Change-Id: I137a0e798eb2273be61046d081fb379dc0aa0a7a
@aerorahul
Copy link
Contributor Author

rt.sh must be updated at two places where MAKE_OPT is used:

if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then

and:

if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then

There is no option with WW3=Y|N in MAKE_OPT in any of the conf files.

@DusanJovic-NOAA
Copy link
Collaborator

rt.sh must be updated at two places where MAKE_OPT is used:
if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then
and:
if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then

There is no option with WW3=Y|N in MAKE_OPT in any of the conf files.

I see. Then this second if test must be updated to look for APP that includes WW3 (ATMW, S2SW, etc).

Change-Id: I9619f724e12e36607ea84a009134e9997d9bddf0
@aerorahul
Copy link
Contributor Author

rt.sh must be updated at two places where MAKE_OPT is used:
if [[ ${MAKE_OPT^^} =~ "REPRO=Y" ]]; then
and:
if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then

There is no option with WW3=Y|N in MAKE_OPT in any of the conf files.

I see. Then this second if test must be updated to look for APP that includes WW3 (ATMW, S2SW, etc).

done in 0905841. Please take a look again.

Change-Id: Ide8e962ffc1f1304c042bb79907789442180338f
@uturuncoglu
Copy link
Collaborator

@aerorahul i am not sure but is this PR is for solving the issue that I faced before. The build was trying to add multiple APP in the build.

@aerorahul
Copy link
Contributor Author

@aerorahul i am not sure but is this PR is for solving the issue that I faced before. The build was trying to add multiple APP in the build.

@uturuncoglu Yes I believe so. In this PR, the contents of MAKE_OPT are directly passed to cmake. compile.sh does not translate MAKE_OPT into CMAKE_FLAGS. This will resolve the issue you faced where the build was adding multiple APP's to the build. Please take a look and let me know if the issue persists or creates another one.

@uturuncoglu
Copy link
Collaborator

@aerorahul Thanks for the clarification. Currently I could not access to Orion and I am trying to setup Cheyenne for testing. I'll let you know when I have a change to test it. Thanks again.

@uturuncoglu
Copy link
Collaborator

@aerorahul any update about this PR?

@uturuncoglu
Copy link
Collaborator

@aerorahul @junwang-noaa i am testing this PR along with the #611 and I am getting build error like following when I tried to compile DOCN case,

+ cmake /work/noaa/gmtb/tufuk/UFS_cdeps APP=HAFS_DOCN SUITES=HAFS_v0_gfdlmp_tedmf_nonsst 32BIT=Y -DMPI=ON -DCMAKE_BUILD_TYPE=Release
CMake Error: The source directory "/work/noaa/gmtb/tufuk/UFS_cdeps/tests/build_fv3_001/32BIT=Y" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

any idea. I'll also review the PR in a more detailed way but first I need to test it under HAFS app with data component configurations.

@uturuncoglu
Copy link
Collaborator

maybe I need to replace 32BIT=Y with -D32BIT=ON

@uturuncoglu
Copy link
Collaborator

i also need to add -D before CCPP and APP

@uturuncoglu
Copy link
Collaborator

@aerorahul okay I pass those errors by adding -D and aand make change in 32BIT option. Now, I am getting following error,

CMake Error: install(EXPORT "CDEPSExports" ...) includes target "dshr" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "datm" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "dice" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "dlnd" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "docn" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "drof" which requires target "streams" that is not in any export set.
CMake Error: install(EXPORT "CDEPSExports" ...) includes target "dwav" which requires target "streams" that is not in any export set.
CMake Error in CDEPS-interface/CMakeLists.txt:
  export called with target "dshr" which requires target "streams" that is
  not in any export set.


CMake Error in CDEPS-interface/CMakeLists.txt:
  export called with target "datm" which requires target "streams" that is
  not in any export set.

Do I need to use special version of CDEPS? We are using NOAA-EMC CDEPS fork as a base in HAFS app but I have additional modifications for ERA5 data atmosphere in it. So, I am not expecting any issue with the CDEPS version that I am using.

@aerorahul
Copy link
Contributor Author

@uturuncoglu
I apologize, I have not updated my branch with the latest develop. I will do so now.

@uturuncoglu
Copy link
Collaborator

@aerorahul okay. no problem. let me know when it is ready and I could test it again.

@aerorahul
Copy link
Contributor Author

@uturuncoglu I think I resolved the conflicts. I have not tested them yet.

RT_SUFFIX="_repro"
BL_SUFFIX="_repro"
else
RT_SUFFIX=""
BL_SUFFIX=""
fi

if [[ ${MAKE_OPT^^} =~ "WW3=Y" ]]; then
if [[ ${MAKE_OPT^^} =~ "-DAPP=ATMW" ]] || [[ ${MAKE_OPT^^} =~ "-DAPP=S2SW" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this is not flexible that I explain in the following issue #656. I already completed WW3 coupling through the use of CMEPS under HAFS application and created a set of wave coupled configurations. Listing applications names in this level is not flexible and once someone bring another configuration this file needs to be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please make a suggestion/PR and we can review.
All the applications that are present in the UFS-weather-model are tested and supported. So if someone brings in an "application", that needs to be supported.
The entire business of adding if-then-else needs to be revisited.

@aerorahul
Copy link
Contributor Author

#642 absorbed this PR.
Closing.

@aerorahul aerorahul closed this Jul 7, 2021
@aerorahul aerorahul deleted the feature/cmake_flags_cleanup branch July 7, 2021 21:01
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.

4 participants