Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEOPY-1700: Benchmark parallelization between Azure (spot) and DUG #58

Closed
wants to merge 15 commits into from

Conversation

domfournier
Copy link

@domfournier domfournier commented Oct 17, 2024

GEOPY-1700 - Benchmark parallelization between Azure (spot) and DUG

@github-actions github-actions bot changed the title GEOPY-1700 GEOPY-1700: Benchmark parallelization between Azure (spot) and DUG Oct 17, 2024
from simpeg.utils import sdiag


def _eval_impedance_deriv(self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
def _eval_impedance_deriv(self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False):
def _eval_impedance_deriv(
self, frequency, mesh, e, h, simulation, du_dm_v=None, v=None, adjoint=False
):

gh_v = PH.T @ gbot_v
ge_v = PE.T @ gtop_v

gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))
gfu_h_v = (
-1.0
/ (1j * 2 * np.pi * frequency)
* (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))
)

PointNaturalSource._eval_impedance_deriv = _eval_impedance_deriv


def _eval_tipper_deriv(self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
def _eval_tipper_deriv(self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False):
def _eval_tipper_deriv(
self, frequency, mesh, h, simulation, du_dm_v=None, v=None, adjoint=False
):

Comment on lines +214 to +215
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (
mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
gfu_h_v = -1.0 / (1j * 2 * np.pi * frequency) * (
mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))
gfu_h_v = (
-1.0
/ (1j * 2 * np.pi * frequency)
* (mesh.edge_curl.T * (simulation.MfMui.T * (simulation.MfI.T * gh_v)))
)

if isinstance(receiver, Point3DTipper):
if receiver.component == "imag":
v = -1j * v
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True)
dfduT = receiver._eval_tipper_deriv(
frequency, mesh, h, simulation, v=v, adjoint=True
)

v = -1j * v
dfduT = receiver._eval_tipper_deriv(frequency, mesh, h, simulation, v=v, adjoint=True)
elif isinstance(receiver, PointNaturalSource):
dfduT, _ = receiver._eval_impedance_deriv(frequency, mesh, e, h, simulation, v=v, adjoint=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
dfduT, _ = receiver._eval_impedance_deriv(frequency, mesh, e, h, simulation, v=v, adjoint=True)
dfduT, _ = receiver._eval_impedance_deriv(
frequency, mesh, e, h, simulation, v=v, adjoint=True
)

Comment on lines +558 to 562
gh_v = sp.csr_matrix(
Phx.T @ ghx_v
+ Phy.T @ ghy_v
+ Phz.T @ ghz_v
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
gh_v = sp.csr_matrix(
Phx.T @ ghx_v
+ Phy.T @ ghy_v
+ Phz.T @ ghz_v
)
gh_v = sp.csr_matrix(Phx.T @ ghx_v + Phy.T @ ghy_v + Phz.T @ ghz_v)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant