PFE grouplist + Bug fixes

This commit is contained in:
cookieenick
2025-03-24 22:35:50 -06:00
parent fc14a37f00
commit 4ac57eddfa
4 changed files with 19 additions and 7 deletions

View File

@@ -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)

View File

@@ -182,6 +182,11 @@
}
},
"pleiades": {
"group_list": {
"LEVEL": "BASIC",
"prompt": "PBS group list",
"default": null
},
"queue": {
"LEVEL": "BASIC",
"prompt": "PBS queue name",

View File

@@ -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 }}

View File

@@ -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 }}