Skip to content

Commit

Permalink
quick workaround to have __localop in cw4heat
Browse files Browse the repository at this point in the history
  • Loading branch information
fschlimb committed Sep 1, 2021
1 parent d659c2e commit 1b0a4bf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions heat/cw4heat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def fini(self):
pass

c = MPI.COMM_WORLD
if c.size <= 1:
raise Exception("At least 2 ranks required for cw4heat")
# if c.size <= 1:
# raise Exception("At least 2 ranks required for cw4heat")
_runner = MPIRunner(Distributor(c), c)
if doStart:
_runner.distributor.start(initImpl=_setComm)
Expand Down Expand Up @@ -392,6 +392,14 @@ def __getattr__(self, attr):
)


def __local_op_normalized(a, f):
return impl.core._operations.__local_op(f, a)


def __local_op(*args, **kwargs):
return DDParray(_submit("__local_op_normalized", args, kwargs))


# Here we define data types and constants
for attr in aa_datatypes + aa_constants:
if hasattr(impl, attr):
Expand Down

0 comments on commit 1b0a4bf

Please sign in to comment.