Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 committed Jun 17, 2022
1 parent c8c6c3a commit a48a351
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
12 changes: 9 additions & 3 deletions examples/test_bundle_partition.cfg
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
[default]
case = 20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis
environment_commands = "source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.sh"
#environment_commands = "source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-knl.sh"
#input = /global/cscratch1/sd/forsyth/zppy_complete_run_nersc_output/20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis
input = /global/cfs/cdirs/e3smdata/zppy_complete_run_nersc_output/20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis
input_subdir = archive/atm/hist
mapping_file = /global/homes/z/zender/data/maps/map_ne30pg2_to_cmip6_180x360_aave.20200201.nc
output = /global/cscratch1/sd/forsyth/zppy_test_bundle_partition_output/20210528.v2rc3e.piControl.ne30pg2_EC30to60E2r2.chrysalis
qos = debug
partition = haswell
partition = knl
walltime = "00:30:00"
www = /global/cfs/cdirs/e3sm/www/forsyth/zppy_test_bundle_partition_output

[bundle]

[[ bundle1 ]]
environment_commands = "source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.sh"
partition = haswell
qos = debug

[climo]
active = True
bundle = "bundle1"
Expand Down
12 changes: 6 additions & 6 deletions zppy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def main(): # noqa: C901
account = "e3sm"
elif tmp.startswith("cori"):
machine = "cori"
if ("partition" in config["bundle"]) and (
config["bundle"]["partition"] != ""
):
partition = config["bundle"]["partition"]
else:
partition = config["default"]["partition"]
# if ("partition" in config["bundle"]) and (
# config["bundle"]["partition"] != ""
# ):
# partition = config["bundle"]["partition"]
# else:
partition = config["default"]["partition"]
if partition not in ["haswell", "knl"]:
raise ValueError(
f'Expected Cori partition to be "haswell" or '
Expand Down
2 changes: 2 additions & 0 deletions zppy/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(self, c):
self.account: str = c["account"]
self.dry_run: bool = c["dry_run"]
self.debug: bool = c["debug"]
self.environment_commands: str = c["environment_commands"]
self.script_dir: str = c["scriptDir"]
self.nodes: int = c["nodes"]
self.partition: str = c["partition"]
Expand Down Expand Up @@ -47,6 +48,7 @@ def render(self, config):
c["machine"] = config["default"]["machine"]
c["account"] = config["default"]["account"]
c["debug"] = self.debug
c["environment_commands"] = self.environment_commands
c["scriptDir"] = self.script_dir
c["prefix"] = self.bundle_name
c["nodes"] = self.nodes
Expand Down

0 comments on commit a48a351

Please sign in to comment.