From 317708360fb12b29b8f59259e65eb0f303755f65 Mon Sep 17 00:00:00 2001 From: Junfeng Qiao Date: Tue, 23 Nov 2021 23:17:23 +0100 Subject: [PATCH] `QeBaseRestartWorkChain`: fix bug for reducing kpools --- aiida_wannier90_workflows/workflows/base/qebaserestart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aiida_wannier90_workflows/workflows/base/qebaserestart.py b/aiida_wannier90_workflows/workflows/base/qebaserestart.py index 59cb90d..60c8445 100644 --- a/aiida_wannier90_workflows/workflows/base/qebaserestart.py +++ b/aiida_wannier90_workflows/workflows/base/qebaserestart.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- """Wrapper workchain for BaseRestartWorkChain to automatically handle several QE errors.""" import re +from aiida import orm from aiida.common import AttributeDict from aiida.engine import while_ from aiida.engine import BaseRestartWorkChain @@ -132,8 +133,10 @@ def handle_output_stdout_incomplete(self, calculation): # This should not happen, in this case the cmdline is wrong continue try: - cmdline[idx + 1] = f'{int(cmdline[idx + 1]) // 2}' + cmdline[idx + 1] = f'{int(cmdline[idx + 1]) // self._mpi_proc_reduce_factor}' except ValueError: continue + settings['cmdline'] = cmdline + self.ctx.inputs['settings'] = orm.Dict(dict=settings) return ProcessHandlerReport(True)