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

WIP: Update submodules, API changes, tracer swarm packs, formatting CI #225

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

AstroBarker
Copy link
Collaborator

@AstroBarker AstroBarker commented Jan 6, 2025

PR Summary

Far overdue, this PR updates parthenon, singularity-eos, and singularity-opac and makes necessary changes to work with their updated versions.

  • Updates to MHD (API changes for packing)

  • Overhauls to swarm API

  • The advection problem's tracers were refactored due to a bug on multiple blocks

  • Some updates to BCs, probably more simplification can be done.

  • The fast logs of singularity-eos are default disabled.

  • Updates neutrino mean opacity API

  • Tracers:

    • Use SwarmPacks (as mentioned)
    • Refactored to work on MeshData instead of MeshBlockData
    • tracer swarm variables are SWARM_VARIABLES now, so access with e.g., tv::rho(), tv::rho::name() e.g., (for namespace tv = tracer_variables; to enable type based packing.
  • Also, the github ubuntu-latest changed and clang-format-12 was no longer available. I have moved us to installing clang-format with pip, pinned at version 12.0.1. Which was not compatible with ubuntu's v12...

  • Weirdness seems to have crept in to the regression testing. Some tests, despite producing an identical gold file (when ran with --upgold) failed tests due to how hdf5 was loaded. Unsure what caused this change, but a fix was implemented.

@AstroBarker AstroBarker added enhancement New feature or request build build system refactor labels Jan 6, 2025
@AstroBarker AstroBarker requested a review from Yurlungur January 6, 2025 18:09
@AstroBarker AstroBarker changed the title Update submodules, API changes, tracer swarm packs Update submodules, API changes, tracer swarm packs, formatting CI Jan 6, 2025
@AstroBarker AstroBarker changed the title Update submodules, API changes, tracer swarm packs, formatting CI WIP: Update submodules, API changes, tracer swarm packs, formatting CI Jan 9, 2025
Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

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

This is a lot of work! Thanks for going through this @AstroBarker ! I don't see anything offhand that might be causing the changes in the regression tests we see, so let's do the tests we discussed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

at some point we might want to change to a different clang-format version

Copy link
Collaborator

Choose a reason for hiding this comment

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

whoopsy daisy. good catch.


auto receive =
tl.AddTask(send, &SwarmContainer::Receive, sc.get(), BoundaryCommSubset::all);
auto defrag = tl.AddTask(receive, &SwarmContainer::Defrag, sc.get(), 0.9);
Copy link
Collaborator

Choose a reason for hiding this comment

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

doing this every cycle probably isn't necessary

tl.AddTask(none, radiation::MOCMCTransport<MDT>, sc0.get(), dt);
auto send = tl.AddTask(samples_transport, &SwarmContainer::Send, sd0.get(),
BoundaryCommSubset::all);
tl.AddTask(none, radiation::MOCMCTransport<MDT>, base.get(), beta * dt);
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines -494 to -501
// TODO(BRR): Hack to get around current lack of support for packing parthenon swarms
template <>
TaskStatus MOCMCFluidSource(MeshData<Real> *rc, const Real dt, const bool update_fluid) {
for (int n = 0; n < rc->NumBlocks(); n++) {
MOCMCFluidSource(rc->GetBlockData(n).get(), dt, update_fluid);
}
return TaskStatus::complete;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build system enhancement New feature or request refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants