Skip to content

Commit 511a479

Browse files
committed
Flush the stdout to avoid waiting aiida workchains
1 parent 570a6d7 commit 511a479

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Modules/aiida_ensemble.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from copy import copy, deepcopy
66
import time
7+
import sys
78

89
from ase import units
910
from cellconstructor.Structure import Structure
@@ -126,6 +127,8 @@ def compute_ensemble( # pylint: disable=arguments-renamed
126127
**kwargs
127128
)
128129

130+
sys.stdout.flush()
131+
129132
if group:
130133
group.add_nodes(workchains)
131134

@@ -169,6 +172,8 @@ def compute_ensemble( # pylint: disable=arguments-renamed
169172
if self.gp_model is not None:
170173
self._train_gp()
171174
self._write_model()
175+
176+
sys.stdout.flush()
172177

173178
# ================ FINALIZE ================ #
174179
# if self.has_stress:
@@ -231,6 +236,8 @@ def _predict_with_model(
231236
self.stress_computed[index] = True
232237

233238
self.force_computed[index] = True
239+
240+
sys.stdout.flush()
234241

235242

236243
def _compute_properties(self, atoms: FLARE_Atoms) -> None:

0 commit comments

Comments
 (0)