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 #64

Open
wants to merge 15 commits into
base: release/0.21.2.2
Choose a base branch
from

Conversation

domfournier
Copy link

@domfournier domfournier commented Nov 21, 2024

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

Summary

PR Checklist

  • If this is a work in progress PR, set as a Draft PR
  • Linted my code according to the style guides.
  • Added tests to verify changes to the code.
  • Added necessary documentation to any new functions/classes following the
    expect style.
  • Marked as ready for review (if this is was a draft PR), and converted
    to a Pull Request
  • Tagged @simpeg/simpeg-developers when ready for review.

Reference issue

What does this implement/fix?

Additional information

@github-actions github-actions bot changed the title GEOPY-1700 GEOPY-1700: Benchmark parallelization between Azure (spot) and DUG Nov 21, 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)

@sebhmg sebhmg changed the base branch from release/0.21.2.1 to release/0.21.2.2 January 18, 2025 21:54
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