Skip to content

Commit

Permalink
Update runfunction.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen authored Jun 12, 2024
1 parent c3e9fb6 commit 77bb88c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pyiron_base/jobs/job/runfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,22 +785,14 @@ def multiprocess_wrapper(
def generate_calculate_function(write_input_funct=None, collect_output_funct=None):
def calculate(input_dict, executable_dict, output_dict={}):
working_directory = executable_dict["working_directory"]
if "accepted_return_codes" in executable_dict.keys():
accepted_return_codes = executable_dict["accepted_return_codes"]
else:
accepted_return_codes = []
if "accept_crash" in executable_dict.keys():
accept_crash = executable_dict["accept_crash"]
else:
accept_crash = False
accept_crash = executable_dict.pop("accept_crash", False)
accepted_return_codes = executable_dict.pop("accepted_return_codes", [])
os.makedirs(working_directory, exist_ok=True)
if write_input_funct is not None:
write_input_funct(
input_dict=input_dict,
working_directory=working_directory,
)
accept_crash = executable_dict.pop("accept_crash", False)
accepted_return_codes = executable_dict.pop("accepted_return_codes", [])
try:
shell_output = execute_subprocess(**executable_dict)
error = None
Expand Down

0 comments on commit 77bb88c

Please sign in to comment.