From 4ac57eddfa5d18ca3c80c7ffb210bca5fd9918cd Mon Sep 17 00:00:00 2001 From: cookieenick Date: Mon, 24 Mar 2025 22:35:50 -0600 Subject: [PATCH] PFE grouplist + Bug fixes --- scripts/makeitso/engage.py | 11 ++++++----- scripts/makeitso/option_descriptions.json | 5 +++++ scripts/makeitso/template-gtr.pbs | 7 +++++-- scripts/makeitso/template.pbs | 3 +++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/scripts/makeitso/engage.py b/scripts/makeitso/engage.py index f3bd1de6..01ed0889 100755 --- a/scripts/makeitso/engage.py +++ b/scripts/makeitso/engage.py @@ -469,7 +469,7 @@ def main(): print(f"options = {options}") # Save the options dictionary as a JSON file in the current directory. - path = f"{engage_options['simulation']['job_name']}-engage.json" + path = f"engage_parameters.json" if os.path.exists(path): if not clobber: raise FileExistsError(f"Options file {path} exists!") @@ -506,6 +506,7 @@ def main(): makeitso_options["pbs"]["select2"] = str(select2) makeitso_options["gamera"]["sim"]["runid"] = engage_options["simulation"]["job_name"] makeitso_options["gamera"]["restart"]["resID"] = engage_options["simulation"]["job_name"] + path = f"makeitso_parameters.json" with open(path, "w", encoding="utf-8") as f: json.dump(makeitso_options, f, indent=JSON_INDENT) makeitso_args = {'clobber': True, 'debug': False, 'verbose': False, 'options_path': path} @@ -521,8 +522,8 @@ def main(): with open('makeitso_parameters.json', 'w') as f: json.dump(makeitso_options, f, indent=JSON_INDENT) - json.dump(makeitso_spinup_pbs_scripts, f, indent=JSON_INDENT) - json.dump(makeitso_warmup_pbs_scripts, f, indent=JSON_INDENT) + #json.dump(makeitso_spinup_pbs_scripts, f, indent=JSON_INDENT) + #json.dump(makeitso_warmup_pbs_scripts, f, indent=JSON_INDENT) # Run the TIEGCMrun @@ -546,8 +547,8 @@ def main(): # Save the tiegcm options dictionary as a JSON file in the current directory. with open('tiegcmrun_parameters.json', 'w') as f: json.dump(tiegcm_options, f, indent=JSON_INDENT) - json.dump(tiegcm_pbs_scripts, f, indent=JSON_INDENT) - json.dump(tiegcm_inp_scripts, f, indent=JSON_INDENT) + #json.dump(tiegcm_pbs_scripts, f, indent=JSON_INDENT) + #json.dump(tiegcm_inp_scripts, f, indent=JSON_INDENT) # Create the PBS job scripts. pbs_scripts, submit_all_jobs_script = create_pbs_scripts(engage_options,makeitso_options, makeitso_pbs_scripts, tiegcm_options, tiegcm_inp_scripts, tiegcm_pbs_scripts) diff --git a/scripts/makeitso/option_descriptions.json b/scripts/makeitso/option_descriptions.json index 2e61aad8..44f1bb1e 100644 --- a/scripts/makeitso/option_descriptions.json +++ b/scripts/makeitso/option_descriptions.json @@ -182,6 +182,11 @@ } }, "pleiades": { + "group_list": { + "LEVEL": "BASIC", + "prompt": "PBS group list", + "default": null + }, "queue": { "LEVEL": "BASIC", "prompt": "PBS queue name", diff --git a/scripts/makeitso/template-gtr.pbs b/scripts/makeitso/template-gtr.pbs index 97c3e38f..bff88664 100644 --- a/scripts/makeitso/template-gtr.pbs +++ b/scripts/makeitso/template-gtr.pbs @@ -4,6 +4,9 @@ #PBS -N {{ simulation.segment_id }} #PBS -A {{ pbs.account_name }} +{%- if pbs.group_list|default('', true) and pbs.group_list != "None" %} +#PBS -W group_list={{ pbs.group_list }} +{%- endif %} #PBS -q {{ pbs.queue }} #PBS -l walltime={{ pbs.walltime }} {%- if pbs.model is defined %} @@ -62,8 +65,8 @@ echo "The active environment variables are:" printenv # Copy the node file for use by the placer command. -nodefile=nodefile.$PBS_JOBID -cp $PBS_NODEFILE $nodefile +NODEFILE=nodefile.$PBS_JOBID +cp $PBS_NODEFILE $NODEFILE {%- if pbs.nodecommand is defined %} {{ pbs.nodecommand }} diff --git a/scripts/makeitso/template.pbs b/scripts/makeitso/template.pbs index 04780297..a88628d7 100644 --- a/scripts/makeitso/template.pbs +++ b/scripts/makeitso/template.pbs @@ -4,6 +4,9 @@ #PBS -N {{ simulation.segment_id }} #PBS -A {{ pbs.account_name }} +{%- if pbs.group_list|default('', true) and pbs.group_list != "None" %} +#PBS -W group_list={{ pbs.group_list }} +{%- endif %} #PBS -q {{ pbs.queue }} #PBS -l walltime={{ pbs.walltime }} #PBS -l select={{ pbs.select }}:ncpus={{ pbs.ncpus }}:mpiprocs={{ pbs.mpiprocs }}:ompthreads={{ pbs.ompthreads }}{{ pbs.other }}+{{ pbs.select2 }}:ncpus={{ pbs.ncpus }}:mpiprocs={{ pbs.helper_mpiprocs }}:ompthreads={{ pbs.helper_ompthreads }}{{ pbs.other }}