Skip to content

Commit

Permalink
bench: Patch jacobian operators + MPI (see issue #1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Sep 3, 2021
1 parent 47f3ac3 commit 55e4c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/user/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run_op(solver, operator, **options):
dm = solver.model.dm
# Because sometime dm is zero, artificially add a non zero slice
if dm.data.min() == 0 and dm.data.max() == 0:
dm.data[..., np.min([25, dm.shape[-1]//4])] = .1
dm.data[..., np.min([25, dm.shape_global[-1]//4])] = .1
return op(dm, **options)
elif operator == "jacobian_adjoint":
# I think we want the forward + gradient call, need to merge retvals
Expand Down

0 comments on commit 55e4c46

Please sign in to comment.