Repository navigation
MUSIC: <freeze_out_surface> switch, global or per instance; quieter vertex-conservation warning - #142
Merged
Merged
Conversation
…eport it When MUSIC's freeze-out surface reaches the transverse grid edge it sets DATA.reRunHydro and returns from the evolution, expecting its driver to re-run on a larger grid (MUSIC's own main.cpp loops on it). X-SCAPE never re-runs, and MUSIC clears the flag only in its constructor, so once one event touched the edge every later event of that MUSIC instance stopped at its first freeze-out check, silently. Seen in a 3-event two-stage run on a small test grid: event 2's jet leg stopped after 1 frame. - Clear the flag before each evolution (full and time-stepped paths). - After the evolution, JSWARN if the surface hit the boundary: the stored evolution is truncated. - MpiMusic::get_hit_grid_boundary() exposes it, so writers can record it per event. Works with both MUSIC (CPU) and music4gpu, which have the same accessors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CrjXPHRbBKFbRYS7cdbKC
- Check out MUSIC4GPU b9cc8be (XSCAPE branch) after cloning, the way get_music.sh pins MUSIC. It adds add_hydro_source_terms_from_jet, which MusicWrapper calls since PR #138; the unpinned branch head made builds non-reproducible. - Also download the hotQCD EOS table matched to UrQMD (EOS 9). Only the SMASH-matched one (EOS 91) was fetched, but the PyJetscape prod_AuAu_0_10 productions use EOS 9. The pin needs b9cc8be pushed to github.com/jhputschke/MUSIC4GPU. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CrjXPHRbBKFbRYS7cdbKC
… step A CausalLiquefier droplet deposits in exactly one hydro step, the one that contains tau_drop + tau_delay, but LiquefierBase::get_source() looped over every droplet (with a cosh each) for every cell at every step, and HydroSourceJETSCAPE locked the liquefier's weak_ptr once per cell. For a 0-10% Au+Au two-stage event with 25 droplets that was 126 s of 184 s. - LiquefierBase::prepare_active_droplets(tau_lo, tau_hi) keeps the droplets for which droplet_may_contribute() holds; get_source() visits only those (in their original order) for query times inside the window, and every droplet otherwise, so callers that never prepare are unaffected. Adding a droplet or clearing the list drops the window. - CausalLiquefier::droplet_may_contribute(): the deposit time lies within the window, widened by dtau/2 + 1e-3 fm (tau arrives as a float). - HydroSourceJETSCAPE::prepare_list_for_current_tau_frame() prepares the window [tau - step, tau + 2 step] once per MUSIC time step and locks the liquefier once there. MUSIC4GPU 3037be7 calls it for the jet source. - get_music4gpu.sh: pin MUSIC4GPU 3037be7. Result: 184 s -> 60 s per event (the no-deposition run takes 58 s), output bit-identical (arr, arr_bg, droplets) on the GPU and CPU paths, full and small grids, single and multi-event. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CrjXPHRbBKFbRYS7cdbKC
<Hydro><MUSIC><freeze_out_surface> (main-XML default 1) tells MUSIC whether to build its freeze-out surface. At 0 (music4gpu 9bdbf92) MUSIC builds none and stops on the equivalent max(e) < e_fo test at the same step, with a bit-identical evolution: ~6 s less per MUSIC run, for runs that only need the evolution (training data). - In the first <Hydro><MUSIC> block it applies to every MUSIC instance, as all MUSIC settings do; the same tag inside an instance's own block (matched by <name>) overrides it for that instance. E.g. a two-stage run with no surface for the background and one for the jet leg that is particlized later: 0 in the first block, 1 in MUSIC_2's. - MpiMusic::set_freeze_out_surface() overrides both; the value is handed to MUSIC at the start of every evolution. - Logs the setting per instance; warns if there is no surface but it would be exported (skip_surface 0). - get_music4gpu.sh: pin MUSIC4GPU 9bdbf92 (branch XSCAPE_surface_off). - README_BulkFast: skip_surface vs freeze_out_surface. Measured: hydro-only 23.3 -> 17.1 s/event, pair 60.1 -> 49.1 s/event (55.3 s with the surface on the jet leg only), bit-identical throughout. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CrjXPHRbBKFbRYS7cdbKC
check_energy_momentum_conservation() warned whenever a vertex missed by more than hydro_source_abs_err = 1e-10 GeV. Matter + LBT kinematics (E recomputed from p and virtuality, soft partons cut) always miss by more: a 0-10% Au+Au jet event printed 19 warnings for 25 droplets, all E-only mismatches of at most 1.7% of E_in, or massless soft partons left out. The warning now fires only when the largest component of p_missing exceeds e_mom_rel_tol = 5e-2 times the vertex's incoming energy, and it prints E_in. The p_missing parton is still added at the 1e-10 GeV threshold, so the droplets and the shower graph are unchanged: seed 1 output is identical apart from wall time, with 0 warnings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #141. Until then this PR also shows #141's three commits; afterwards only the two below remain.
Summary
<Hydro><MUSIC><freeze_out_surface>(ff513d63), default 1 injetscape_main.xml.<Hydro><MUSIC>block it applies to every MUSIC instance, like all MUSIC settings.<name>) overrides it for that instance.MpiMusic::set_freeze_out_surface()overrides both. The value is handed to MUSIC at the start of every evolution.skip_surface 0).get_music4gpu.shpins MUSIC4GPU9bdbf92.README_BulkFast.mdexplainsskip_surfacevsfreeze_out_surface.external_packages/music) doesn't know the parameter: it always builds the surface, although the log line still reports the requested setting.d679b204).Results
Setup: 0–10% Au+Au, 3D MC-Glauber, 100×100×60 grid, music4gpu on a GB10, seed 1.
MUSIC_FORCE_CPU=1) is bit-identical too.d679b204, the seed-1 output is identical apart from wall time, with 0 warnings.Merge notes
XSCAPE_surface_off→XSCAPE, merged with a merge commit so the pinned9bdbf92is onXSCAPE. It is reachable through the pushed branch in the meantime, and its CI passed.set_freeze_out_surface(), so merge this PR first.🤖 Generated with Claude Code
https://claude.ai/code/session_019CrjXPHRbBKFbRYS7cdbKC