Skip to content

Issue 1714 - Field and GradientPack and FieldDerivativesPack implementation - #1742

Merged
Rohit-Kakodkar merged 3 commits into
develfrom
issue-1714-gradientpack
Mar 26, 2026
Merged

Issue 1714 - Field and GradientPack and FieldDerivativesPack implementation#1742
Rohit-Kakodkar merged 3 commits into
develfrom
issue-1714-gradientpack

Conversation

@lsawade

@lsawade lsawade commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Issue Number

Closes #1714

Checklist

Please make sure to check developer documentation on specfem docs.

  • I ran the code through pre-commit to check style
  • THE DOCUMENTATION BUILDS WITHOUT WARNINGS/ERRORS
  • I have added labels to the PR (see right hand side of the PR page)
  • My code passes all the integration tests
  • I have added sufficient unittests to test my changes
  • I have added/updated documentation for the changes I am proposing
  • I have updated CMakeLists to ensure my code builds
  • My code builds across all platforms

@lsawade
lsawade requested a review from Rohit-Kakodkar March 19, 2026 22:20
@lsawade

lsawade commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator Author

running out of memory in clang

@Rohit-Kakodkar

Copy link
Copy Markdown
Collaborator

running out of memory in clanif unity build is not disabled for the target, does disabling it help?

@lsawade

lsawade commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator Author

Haven't tried, but doubt it since it's just the specfem_solver target which is expanded to 1,000,000 lines before crashing(I looked at the /tmp/time_marching<#id>.cpp).

But one solution could be:

compute_sources.tpp

template<NGLL, Tags>
int compute_source_interaction(assembly, step) {

   FOR_EACH_IN ...

compute_sources.cpp

template int compute_sources<...>

etc.

This could be done with some fairly simple macros.

That way, the different physics are put into different translation units before being called by update_wavefields(...).

@lsawade
lsawade requested a review from icui March 23, 2026 21:48
@lsawade

lsawade commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator Author

fails are due to yaml installation

@Rohit-Kakodkar Rohit-Kakodkar added the enhancement New feature or request label Mar 24, 2026
@lsawade

lsawade commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator Author

test this please

quadrature, df_dxi, df_dgamma);
callback(iterator_index, df);
if constexpr (dimension_tag == specfem::element::dimension_tag::dim3) {
datatype df_deta[components] = { 0.0 };

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

df_dxi, df_dgamma and df_deta should be register arrays. RegisterArray<type_real, dimension, components>

@Rohit-Kakodkar
Rohit-Kakodkar merged commit 62e50e6 into devel Mar 26, 2026
10 of 12 checks passed
@Rohit-Kakodkar
Rohit-Kakodkar deleted the issue-1714-gradientpack branch March 26, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants