Skip to content

Use Ferrite.task_local_copy for per-task values copies - #68

Merged
xtalax merged 1 commit into
masterfrom
fix/task-local-copy
Nov 6, 2026
Merged

xtalax merged 1 commit into
masterfrom
fix/task-local-copy

Conversation

@xtalax-droid

Copy link
Copy Markdown
Collaborator

_fresh_values copies each CellValues and FacetValues per task with copy. Ferrite master deprecates copy on these types in favour of Ferrite.task_local_copy (Ferrite-FEM/Ferrite.jl#1070), so every _fresh_values call warns under Ferrite master.

This PR resolves the copy function once, in a module-level const. It uses Ferrite.task_local_copy when isdefined(Ferrite, :task_local_copy) and falls back to copy otherwise. Registered Ferrite 1.7.0, the current lower bound, has no task_local_copy, so the fallback is needed there. Nothing else changes.

Tests:

  • GROUP=Core passes on Ferrite 1.7.0.
  • test/Frontend/operators.jl and test/Frontend/remake_p.jl pass on Ferrite 1.7.0 and on Ferrite master (a local checkout of the Ferrite #1496 head, which contains master). Under master with --depwarn=yes there is no deprecation warning.
  • Runic reports no changes. Codex review: approve, 0 findings.

🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

Ferrite master deprecates copy(::CellValues) in favour of task_local_copy. Registered Ferrite 1.7.0 has no task_local_copy, so fall back to copy there.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 9bd60e5... master / 9bd60e5...
construction/heat P1 10x10 7.01 ± 0.43 ms 7.19 ± 0.71 ms 0.975 ± 0.11
construction/heat P1 20x20 9.71 ± 1.1 ms 9.61 ± 0.83 ms 1.01 ± 0.15
time_to_load 5.41 ± 0.058 s 5.45 ± 0.07 s 0.993 ± 0.017
Memory benchmarks
master 9bd60e5... master / 9bd60e5...
construction/heat P1 10x10 0.0393 M allocs: 2.11 MB 0.0393 M allocs: 2.11 MB 1
construction/heat P1 20x20 0.0702 M allocs: 4.73 MB 0.0702 M allocs: 4.73 MB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

@xtalax
xtalax merged commit d713470 into master Nov 6, 2026
51 checks passed
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.

2 participants