Skip to content

Remove the first instance of "RUN_CMD_FCST" in var_defns.sh to avoid potential undefined variable issues#433

Merged
mkavulich merged 1 commit into
ufs-community:release/public-v1from
mkavulich:macos_linux_var_defns_bugfix
Feb 11, 2021
Merged

Remove the first instance of "RUN_CMD_FCST" in var_defns.sh to avoid potential undefined variable issues#433
mkavulich merged 1 commit into
ufs-community:release/public-v1from
mkavulich:macos_linux_var_defns_bugfix

Conversation

@mkavulich
Copy link
Copy Markdown
Collaborator

DESCRIPTION OF CHANGES:

It was found that if set -u is in the user's default bash environment, this will cause the launch script or individual run scripts to fail because you're using a variable before it's defined; this is likely to occur if you submit any of these scripts from a crontab. This was due to the way that the default run command was set up for MacOS and generic LINUX platforms, which was a bit of a hack that resulted in RUN_CMD_FCST being defined twice in var_defns.sh. The fix will delete the first instance of RUN_CMD_FCST in var_defns.sh so that it is no longer referencing an undefined variable early on.

This potential bug does not affect Tier 1 supported platforms, only MacOS and generic Linux.

TESTS CONDUCTED:

Tested on affected MacOS platform and the fix worked. Also ran end-to-end tests on Hera and Cheyenne (still running) as a sanity check.

CONTRIBUTORS (optional):

Thanks to @christinaholtNOAA for bringing this issue to light.

@mkavulich
Copy link
Copy Markdown
Collaborator Author

Release branch end-to-end tests passed on Cheyenne (Intel, 25km tests only) and Hera (Intel, 25km and 13km tests).

@mkavulich mkavulich merged commit 9be3fae into ufs-community:release/public-v1 Feb 11, 2021
christinaholtNOAA pushed a commit to christinaholtNOAA/regional_workflow that referenced this pull request Feb 11, 2021
…potential undefined variable issues (ufs-community#433)

## DESCRIPTION OF CHANGES: 
It was found that if set -u is in the user's default bash environment, this will cause the launch script or individual run scripts to fail because you're using a variable before it's defined; this is likely to occur if you submit any of these scripts from a crontab. This was due to the way that the default run command was set up for MacOS and generic LINUX platforms, which was a bit of a hack that resulted in RUN_CMD_FCST being defined twice in var_defns.sh. The fix will delete the first instance of RUN_CMD_FCST in var_defns.sh so that it is no longer referencing an undefined variable early on.

This potential bug does not affect Tier 1 supported platforms, only MacOS and generic Linux.

## TESTS CONDUCTED: 
Tested on affected MacOS platform and the fix worked. Also ran end-to-end tests on Hera and Cheyenne (still running) as a sanity check.
christinaholtNOAA referenced this pull request in NOAA-GSL/regional_workflow Feb 17, 2021
* Add MACOS and Generic Linux options for regional_workflow (#402)

This PR adds generic platforms to the regional_workflow, not specific to any one machine, that should allow users to run the ufs-srweather-app on any UNIX-based machine, without a workflow manager, so long as the NCEPLIBS and other prerequisites have been properly installed. This can be done using the scripts described in regional_workflow/ush/wrappers/README.md; additional documentation is currently being written.

Users can utilize these options by setting the MACHINE variable in config.sh to either "LINUX" or "MACOS". The LINUX option should allow most users to run the ufs-srweather-app on a generic Linux OS machine. The MACOS option is for MacOS/Darwin operating systems; this needs to be kept separate because the MacOS version of bash is very old, and missing some functionality, as well as several GNU Linux utilities having different functionality and/or names.

"Generic Linux" test was run on Cheyenne machine (GNU 9.1.0 compilers) as a fresh install, including stand-alone install of NCEPLIBS, with no reference to staged or pre-built input files. This was run without rocoto or directly submitting jobs via PBS, but rather the entire workflow was run interactively on a compute node (using the `qinteractive` command which emulated the running of the workflow on a machine with no job scheduler).

On MacOS (Catalina, 10.15.7), with GNU 10.1.0 compilers, was able to successfully generate workflow, and run end-to-end successfully. Currently there is a bug in UFS_UTILS that makes the make_orog test fail; UFS UTILS PR245 must be merged to fix this.

Resolves #369

* Source bash utils in the workflow launch script and set the workflow manager as Rocoto. (#426)

## DESCRIPTION OF CHANGES: 
Added sourcing of bash utilities to avoid $SED undefined variable error when using the workflow launch script.  Add Rocoto as the workflow manager on Gaea.

## TESTS CONDUCTED: 
Tested on Gaea. Release branch end-to-end tests (aside from 3km runs) were run on Hera and all passed.

## CONTRIBUTORS (optional): 
@climbfuji, @mkavulich, @gsketefian

* Run with LINUX + rocoto.

* Adding reference configs for Hera

* Updating configs to work on Hera.

* Add configurable options needed for linux.

* Add modulefiles needed for linux.

* Remove the first instance of "RUN_CMD_FCST" in var_defns.sh to avoid potential undefined variable issues (#433)

## DESCRIPTION OF CHANGES: 
It was found that if set -u is in the user's default bash environment, this will cause the launch script or individual run scripts to fail because you're using a variable before it's defined; this is likely to occur if you submit any of these scripts from a crontab. This was due to the way that the default run command was set up for MacOS and generic LINUX platforms, which was a bit of a hack that resulted in RUN_CMD_FCST being defined twice in var_defns.sh. The fix will delete the first instance of RUN_CMD_FCST in var_defns.sh so that it is no longer referencing an undefined variable early on.

This potential bug does not affect Tier 1 supported platforms, only MacOS and generic Linux.

## TESTS CONDUCTED: 
Tested on affected MacOS platform and the fix worked. Also ran end-to-end tests on Hera and Cheyenne (still running) as a sanity check.

* Other mods for running on Hera.

* Fix needed for create_diag_table_file change.

Co-authored-by: Michael Kavulich <kavulich@ucar.edu>
Co-authored-by: JeffBeck-NOAA <55201531+JeffBeck-NOAA@users.noreply.github.com>
shoyokota pushed a commit to shoyokota/regional_workflow that referenced this pull request Nov 29, 2022
* "update regional workflow for RRFS-SD"

* "Add CONUS 3km smoke&dust, rrfs_sd is dynamically determined by DO_SMOKE_DUST"
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