Skip to content

Commit

Permalink
Edit the retrieve_list to include more werr files
Browse files Browse the repository at this point in the history
When wannier90/postw90 calculation fails on specific processor, the error file will be named as aiida.node_xxxxx.werr.
The 'xxxxx' is a 5-digit index of processor. These werr files should also be retrieved.
  • Loading branch information
Yuhao Jiang committed Jan 3, 2024
1 parent 8bd58ef commit a181103
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/aiida_wannier90/calculations/postw90.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Postw90Calculation(CalcJob):
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)

_DEFAULT_RETRIEVE_TEMPORARY_SUFFIXES = (
Expand Down
2 changes: 1 addition & 1 deletion src/aiida_wannier90/calculations/wannier90.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Wannier90Calculation(CalcJob):
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)

@classmethod
Expand Down
3 changes: 2 additions & 1 deletion src/aiida_wannier90/parsers/postw90.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def parse(self, **kwargs): # pylint: disable=inconsistent-return-statements
)
return self.exit_codes.ERROR_WERR_FILE_PRESENT

# Some times the error files are aiida.node_00001.werr, ...
# Some times the error files are aiida.node_XXXXX.werr, ...
# The XXXXX are 5-digit index of processor
error_file_name = re.compile(seedname + r".+?\.werr")
for filename in out_folder.base.repository.list_object_names():
if error_file_name.match(filename):
Expand Down
3 changes: 2 additions & 1 deletion src/aiida_wannier90/parsers/wannier90.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def parse(self, **kwargs): # pylint: disable=inconsistent-return-statements
)
return self.exit_codes.ERROR_WERR_FILE_PRESENT

# Some times the error files are aiida.node_00001.werr, ...
# Some times the error files are aiida.node_XXXXX.werr, ...
# The XXXXX are 5-digit index of processor
error_file_name = re.compile(seedname + r".+?\.werr")
for filename in out_folder.base.repository.list_object_names():
if error_file_name.match(filename):
Expand Down
8 changes: 4 additions & 4 deletions tests/calculations/test_local_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_default(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_default_plot(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down Expand Up @@ -304,7 +304,7 @@ def test_no_projections(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down Expand Up @@ -369,7 +369,7 @@ def test_list_projections(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down
4 changes: 2 additions & 2 deletions tests/calculations/test_remote_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_default_remote(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down Expand Up @@ -201,7 +201,7 @@ def test_unk_symlink(
".vdw",
"_band_proj.dat",
"_band.labelinfo.dat",
".node_00001.werr",
".node_*.werr",
)
]
retrieve_temporary_list = []
Expand Down

0 comments on commit a181103

Please sign in to comment.