Skip to content

Commit

Permalink
set 10 minutes buffer for WALLTIME
Browse files Browse the repository at this point in the history
  • Loading branch information
cpignedoli committed Nov 15, 2023
1 parent 18d50fa commit 6a2bcaf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 6 additions & 2 deletions aiida_nanotech_empa/workflows/cp2k/diag_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def run_ot_scf(self):
cp2k_utils.dict_merge(input_dict, self.ctx.kinds_section)

# Setup walltime.
input_dict["GLOBAL"]["WALLTIME"] = 86000
input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.ctx.options["max_wallclock_seconds"] - 600
)

builder.cp2k.metadata.options = self.ctx.options

Expand Down Expand Up @@ -224,7 +226,9 @@ def run_diag_scf(self):
input_dict["FORCE_EVAL"]["DFT"]["SCF"]["OUTER_SCF"]["EPS_SCF"] = "1.0E-1"

# Setup walltime.
input_dict["GLOBAL"]["WALLTIME"] = 86000
input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.ctx.options["max_wallclock_seconds"] - 600
)

builder = Cp2kBaseWorkChain.get_builder()
builder.cp2k.code = self.inputs.cp2k_code
Expand Down
6 changes: 3 additions & 3 deletions aiida_nanotech_empa/workflows/cp2k/geo_opt_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def setup(self):

# Resources.
self.ctx.options = self.inputs.options
self.ctx.input_dict["GLOBAL"]["WALLTIME"] = self.ctx.options[
"max_wallclock_seconds"
]
self.ctx.input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.ctx.options["max_wallclock_seconds"] - 600
)

def submit_calc(self):
self.report("Submitting geometry optimization")
Expand Down
4 changes: 3 additions & 1 deletion aiida_nanotech_empa/workflows/cp2k/neb_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def first_scf(self):
builder.metadata.options = self.ctx.scf_options
builder.metadata.label = "scf"
builder.metadata.options.parser_name = "cp2k_advanced_parser"
input_dict["GLOBAL"]["WALLTIME"] = 86000
input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.ctx.options["max_wallclock_seconds"] - 600
)
builder.parameters = orm.Dict(input_dict)

future = self.submit(builder)
Expand Down
10 changes: 6 additions & 4 deletions aiida_nanotech_empa/workflows/cp2k/replica_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ def first_scf(self):
builder.metadata.options = self.inputs.options
builder.metadata.label = "scf"
builder.metadata.options.parser_name = "cp2k_advanced_parser"
input_dict["GLOBAL"]["WALLTIME"] = self.inputs.options["max_wallclock_seconds"]
input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.inputs.options["max_wallclock_seconds"] - 600
)
builder.parameters = orm.Dict(input_dict)

future = self.submit(builder)
Expand Down Expand Up @@ -282,9 +284,9 @@ def run_constrained_geo_opts(self):
)
submitted_cvs += " " + str(target)
self.ctx.CVs_cases.append(current_cvs_targets)
input_dict["GLOBAL"]["WALLTIME"] = self.inputs.options[
"max_wallclock_seconds"
]
input_dict["GLOBAL"]["WALLTIME"] = max(
600, self.inputs.options["max_wallclock_seconds"] - 600
)
builder.cp2k.parameters = orm.Dict(input_dict)

submitted_calculation = self.submit(builder)
Expand Down

0 comments on commit 6a2bcaf

Please sign in to comment.