Open BinLiu-NOAA opened 1 year ago
The hafs_runcmd.sh.inc has been improved to allow re-defining APRUN command variables through high level environment variables passed in (see 8334f75).
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:-""}
These updates will got back to HAFS develop branch when merging HAFSv2 developments back to develop.
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: