Skip to content

Commit

Permalink
QeBaseRestartWorkChain: fix bug for reducing kpools
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojunfeng committed Nov 23, 2021
1 parent 68b7b8f commit 3177083
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aiida_wannier90_workflows/workflows/base/qebaserestart.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 3177083

Please sign in to comment.