Skip to content

Commit bdf0854

Browse files
author
Tianjiao Sun
committed
count INC as two accesses
1 parent 631536a commit bdf0854

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyop2/sequential.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,14 @@ class ParLoop(petsc_base.ParLoop):
236236
def prepare_arglist(self, iterset, *args):
237237
arglist = iterset._kernel_args_
238238
nbytes = 0
239+
# from IPython import embed; embed()
239240

240241
for arg in args:
241242
arglist += arg._kernel_args_
242-
nbytes += arg.data.nbytes
243+
if arg.access is INC:
244+
nbytes += arg.data.nbytes * 2
245+
else:
246+
nbytes += arg.data.nbytes
243247
seen = set()
244248
for arg in args:
245249
maps = arg.map_tuple

0 commit comments

Comments
 (0)