Skip to content

Commit 18c842a

Browse files
Merge pull request #1745 from devitocodes/patch-issue-1744
bench: Patch jacobian operators + MPI (see issue #1744)
2 parents 47f3ac3 + 55e4c46 commit 18c842a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

benchmarks/user/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def run_op(solver, operator, **options):
6666
dm = solver.model.dm
6767
# Because sometime dm is zero, artificially add a non zero slice
6868
if dm.data.min() == 0 and dm.data.max() == 0:
69-
dm.data[..., np.min([25, dm.shape[-1]//4])] = .1
69+
dm.data[..., np.min([25, dm.shape_global[-1]//4])] = .1
7070
return op(dm, **options)
7171
elif operator == "jacobian_adjoint":
7272
# I think we want the forward + gradient call, need to merge retvals

0 commit comments

Comments
 (0)