Skip to content

Commit

Permalink
Merge pull request #1745 from devitocodes/patch-issue-1744
Browse files Browse the repository at this point in the history
bench: Patch jacobian operators + MPI (see issue #1744)
  • Loading branch information
FabioLuporini committed Sep 3, 2021
2 parents 47f3ac3 + 55e4c46 commit 18c842a
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 18c842a

Please sign in to comment.