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

slightly improve v3 run_script template #6534

Merged
merged 5 commits into from
Sep 5, 2024
Merged

Conversation

mahf708
Copy link
Contributor

@mahf708 mahf708 commented Jul 31, 2024

Automates $PSCRATCH location for code and case, adds custom_pelayout for supported machines, hardens copy_script, and sets default PROJECT for slurm-based machines.

[BFB]

@mahf708 mahf708 requested review from rljacob and ndkeen July 31, 2024 00:40
Copy link

github-actions bot commented Jul 31, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://E3SM-Project.github.io/E3SM/pr-preview/pr-6534/
on branch gh-pages at 2024-08-23 14:17 UTC

@rljacob rljacob requested a review from golaz July 31, 2024 00:45
run_e3sm.template.sh Outdated Show resolved Hide resolved
@mahf708 mahf708 changed the title slightly improve v3 template scripts slightly improve v3 template script Jul 31, 2024
@mahf708 mahf708 marked this pull request as ready for review July 31, 2024 01:02
@mahf708 mahf708 requested a review from wlin7 July 31, 2024 15:21
@rljacob rljacob added the run_e3sm issues related to the script used to submit simulations by many in the project. label Aug 2, 2024
@rljacob rljacob self-assigned this Aug 2, 2024
run_e3sm.template.sh Outdated Show resolved Hide resolved
Comment on lines -537 to +580
local this_script_name=`basename $0`
local this_script_name=$( basename -- "$0"; )
local this_script_dir=$( dirname -- "$0"; )
local script_provenance_name=${this_script_name}.`date +%Y%m%d-%H%M%S`
cp -vp ${this_script_name} ${script_provenance_dir}/${script_provenance_name}
cp -vp "${this_script_dir}/${this_script_name}" ${script_provenance_dir}/${script_provenance_name}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that these edits were made because this specific function before won't work if the script is submitted non-interactively. With the fix, it works fine. I don't know what the problem is exactly....

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't understand why, but I'll trust you on that.

run_e3sm.template.sh Outdated Show resolved Hide resolved
@rljacob rljacob changed the title slightly improve v3 template script slightly improve v3 run_script template Aug 15, 2024
echo $'\n CUSTOMIZE PROCESSOR CONFIGURATION:'

# Number of cores per node (machine specific)
if [ "${MACHINE}" == "pm-cpu" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

@mahf708 : could you add more E3SM machines (compy, chrysalis, anvil) here to make it more portable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! Will address soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added compy, chrys and anvil. Note that @rljacob indicated in the past that this script was aimed primarily at pm-cpu users, hence I didn't add them originally. I can further customize the CASE_ROOT to suit all machines ($PSCRATCH on pm-cpu, /lcrc/group/e3sm/$USER on chrys and anvil, and /compyfs/$USER on compy if desired). I am in favor of portability (but I didn't want to make the logic complex preemptively) so let me know if you'd like that extended as well

Copy link
Member

Choose a reason for hiding this comment

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

Yes because pm-cpu is our only officially supported machine.

run_e3sm.template.sh Outdated Show resolved Hide resolved
Comment on lines -537 to +580
local this_script_name=`basename $0`
local this_script_name=$( basename -- "$0"; )
local this_script_dir=$( dirname -- "$0"; )
local script_provenance_name=${this_script_name}.`date +%Y%m%d-%H%M%S`
cp -vp ${this_script_name} ${script_provenance_dir}/${script_provenance_name}
cp -vp "${this_script_dir}/${this_script_name}" ${script_provenance_dir}/${script_provenance_name}
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't understand why, but I'll trust you on that.

@mahf708 mahf708 requested review from golaz and rljacob August 21, 2024 13:40
@rljacob
Copy link
Member

rljacob commented Aug 27, 2024

@golaz please approve.

rljacob added a commit that referenced this pull request Sep 5, 2024
Automates $PSCRATCH location for code and case, adds custom_pelayout for supported machines,
hardens copy_script, and sets default PROJECT for slurm-based machines.

[BFB]
@rljacob rljacob merged commit 8a7fb6a into master Sep 5, 2024
13 checks passed
@rljacob rljacob deleted the mahf708/ig/v3-script branch September 5, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run_e3sm issues related to the script used to submit simulations by many in the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants