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

Improve the ush/hafs_runcmd.sh.inc command variable defines #243

Open
BinLiu-NOAA opened this issue Nov 30, 2023 · 3 comments
Open

Improve the ush/hafs_runcmd.sh.inc command variable defines #243

BinLiu-NOAA opened this issue Nov 30, 2023 · 3 comments
Assignees
Labels
Bugzilla Operational HAFS bugzilla items enhancement New feature or request

Comments

@BinLiu-NOAA
Copy link
Collaborator

Description

Provide a clear and concise description of the requested feature/capability.
From NCO SPA: Please look into to improve the ush/hafs_runcmd.sh.inc command variable defines at the next upgrade.

for example -
APRUNF=${APRUNF:-"mpiexec -n ${TOTAL_TASKS} cfp "}
APRUNCFP=${APRUNCFP:-"mpiexec"}

This will allow the APRUN* variable could be re-defined as needed in each job.

Proposed solution

How should the new feature/capability be added? If you have thoughts on the implementation strategy, please share them here.

Status (optional)

Do you (or a colleague) plan to work on adding this feature?

Related to (optional)

Directly reference any related issues or PRs in this or other repositories, and describe how they are related. Examples:

  • fixed by hafs-community/hafs/pull/<pr_number>
@BinLiu-NOAA BinLiu-NOAA added enhancement New feature or request Bugzilla Operational HAFS bugzilla items labels Nov 30, 2023
@BinLiu-NOAA BinLiu-NOAA self-assigned this Dec 13, 2023
@BinLiu-NOAA
Copy link
Collaborator Author

The hafs_runcmd.sh.inc has been improved to allow re-defining APRUN command variables through high level environment variables passed in (see 8334f75).

@BinLiu-NOAA
Copy link
Collaborator Author

With the latest HAFSv2 upgrade, there are some further improvements for the ush/hafs_runcmd.sh.inc (https://github.com/hafs-community/HAFS/blob/production/hafs.v2/ush/hafs_runcmd.sh.inc)

The APRUNO, APRUNC, APRUNF commands are automatically updated based on the ${TOTAL_TASKS} and ${OMP_NUM_THREADS} values. One can easily update these APRUNX commands by specifying different ${TOTAL_TASKS} and ${OMP_NUM_THREADS} values followed by sourcing the hafs_runcmd.sh.inc. This not only provides the flexibility specifies these APRUNX commands at ecf and jjob level, but also provides possibility to updates these APRUNX commands at other exscript and ush script levels if needed/desired.

Meanwhile, in the latest version of hafs_runcmd.sh.inc, inspired by your suggestion, a new variable/tool/capability was added, which can be used to define the full APRUN command (can also be controlled, saying in the ecf script and jjob levels). This approach can even be used to easily implement MPMD capability if needed/desired.
export APRUNCMD=${APRUNCMD:-""}

@BinLiu-NOAA
Copy link
Collaborator Author

These updates will got back to HAFS develop branch when merging HAFSv2 developments back to develop.

@BinLiu-NOAA BinLiu-NOAA reopened this Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugzilla Operational HAFS bugzilla items enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant