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

Many platforms override ACCNR with a hard-coded value #1015

Closed
SamuelTrahanNOAA opened this issue Jan 20, 2022 · 1 comment
Closed

Many platforms override ACCNR with a hard-coded value #1015

SamuelTrahanNOAA opened this issue Jan 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@SamuelTrahanNOAA
Copy link
Collaborator

The giant "if/elif/fi" block in rt.sh overrides the ACCNR to a hard-coded value, overriding the value the user sets before running rt.sh. This is in part necessary due to detect_machine.sh setting the default to nems, which is usually wrong. An earlier bug fix did not completely correct the problem. (See also #979, #1014, and #981.)

The detect_machine.sh is run before the rt.sh per-platform default logic, setting the nems variable:

# Default account "nems"
export ACCNR=${ACCNR:-nems}

Hence to use the account most users require, the rt.sh has to override the detect_machine.sh and user's setting with a hard-coded value like so:

ACCNR=GFS-DEV

The fix is for detect_machine.sh to NOT set ACCNR. Instead, rt.sh's per-platform block will set the defaults in a way that does not override the user's defaults:

ACCNR="${ACCNR:-h-nems}"

After the giant "if" block there will be a default setting to ensure the original behavior (ACCNR=nems) if neither the user nor per-platform block sets the value:

# If account is unspecified, assume the machine has a "nems"
# accounting code.
export ACCNR="${ACCNR:-nems}"
@SamuelTrahanNOAA
Copy link
Collaborator Author

Corrected by #1009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant