Skip to content

Commit

Permalink
added job id
Browse files Browse the repository at this point in the history
  • Loading branch information
cpignedoli committed Oct 15, 2024
1 parent ef713b9 commit 0ffd22e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions aiida_nanotech_empa/workflows/cp2k/cp2k_benchmark_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ def get_timing_from_FolderData(folder_node=None):
if time_3_ot_cg is None and ' 3 OT CG' in line:
time_matches = time_pattern.findall(line)
if time_matches:
time_3_ot_cg = float(time_matches[0]) # Assuming time is the last number
time_3_ot_cg = float(time_matches[0])
else:
raise ValueError(f"No time found in line: '{line.strip()}'")

# Find the first occurrence of '4 OT LS' and extract the time
if time_4_ot_ls is None and '4 OT LS' in line:
time_matches = time_pattern.findall(line)
if time_matches:
time_4_ot_ls = float(time_matches[0]) # Assuming time is the last number
time_4_ot_ls = float(time_matches[0])
else:
raise ValueError(f"No time found in line: '{line.strip()}'")

Expand All @@ -155,9 +155,11 @@ def get_timing_from_FolderData(folder_node=None):
break

if time_3_ot_cg is None:
raise ValueError("Could not find ' 3 OT CG' in 'aiida.out'")
return orm.Str('FAILED')
#raise ValueError("Could not find ' 3 OT CG' in 'aiida.out'")
if time_4_ot_ls is None:
raise ValueError("Could not find '4 OT LS' in 'aiida.out'")
return orm.Str('FAILED')
#raise ValueError("Could not find '4 OT LS' in 'aiida.out'")

# Return the sum of the two times
total_time = time_3_ot_cg + time_4_ot_ls
Expand Down

0 comments on commit 0ffd22e

Please sign in to comment.