Repository navigation
Run simulations in Safari on a single-threaded engine - #481
Merged
Merged
Conversation
Safari can't be cross-origin isolated (no COEP credentialless), so it has no SharedArrayBuffer and can't run the KOKKOS/pthreads build. Instead of blocking it, pick the engine build from the context: the threaded atomify build when isolated, otherwise lammps.js's atomify-serial build (same packages, no KOKKOS). The serial engine starts without -sf kk, scripts skip the KOKKOS preprocessing, and the Multithreading switch is disabled with an explanation. Help pages and e2e specs updated accordingly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2eZ9vB9rpavnjH7bPxkuK
Owner
Author
|
Generated by Claude Code |
andeplane
added a commit
to andeplane/lammps.js
that referenced
this pull request
Nov 5, 2026
<!-- claude-projects-attribution: {"github_login":"andeplane"} -->
_Requested by **Anders Hafreager** · [project
thread](https://claude.ai/code/project/chan_01G7VSoPZwxUhEt8N3Ft8nF9?thread=cmsg_01G7VSoPZwxUhEt8N3Ft8nF9GTqdMRwaTHD27RxAcG9jjW)_
This bumps `package.json` and `python/pyproject.toml` to 1.6.1, so
merging it publishes master to npm. That includes the
`wasm-atomify-serial` variant from #12, which Atomify needs to run
simulations in Safari (andeplane/atomify#481).
LAMMPS stays at stable_30Sep2026, the same as 1.6.0. The move to
stable_30Sep2026_update1 (#10) is on hold because update1 crashes three
moltemplate PPPM examples. #10 will ship as 1.6.2.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01E2eZ9vB9rpavnjH7bPxkuK)_
Co-authored-by: Claude <noreply@anthropic.com>
…rial engine EXAMPLES_ENGINE=serial runs the example smoke test on the atomify-serial build the way the app does in Safari. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2eZ9vB9rpavnjH7bPxkuK
Built with `python -m build --wheel` from a git archive of lammps.js master at 1.6.1 (python/), replacing the 1.5.1 wheel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2eZ9vB9rpavnjH7bPxkuK
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.
Requested by Anders Hafreager · project thread
This bumps lammps.js to 1.6.1, which adds the
lammps.js/wasm-atomify-serialexport (andeplane/lammps.js#12, released via #13). The vendored lammps-js wheel inpypi/is updated to 1.6.1 to match.Why
Safari showed "Safari is not supported for simulations". The engine is the KOKKOS/pthreads build, which needs SharedArrayBuffer, so the page has to be cross-origin isolated. Atomify gets that isolation from COEP
credentialless, which Safari doesn't support. Switching torequire-corpwas tried before (69ca6e8) and backed out.What
src/wasm/engineVariant.tspicks the build from the context: the threadedwasm-atomifybuild whencrossOriginIsolatedis true and SharedArrayBuffer exists, otherwisewasm-atomify-serial. That is the same package set without KOKKOS, a 21 MB module instead of 43 MB.load(protocol version bumped to 3). The worker imports the matching module, and the adapter starts serial with no-k on -sf kk.LammpsWeb.multithreadedis false on the serial engine.RunControllerthen skips the KOKKOS preprocessing (suffix offand the kk-wrappedatom_style/pair_style hybrid) and doesn't inject the opt-in. Scripts that keepsuffix kkstill run, because LAMMPS falls back to the plain styles.lammps-atomify-serialand completes a run, and that Safari (webkit project) runs a simulation.EXAMPLES_ENGINE=serial npm run test:examplesruns the example smoke test on the serial engine the way the app does in Safari.Testing
buildandsmokeboth pass.tsc, eslint (0 errors), prettier andvitest runall pass (686 tests).e2e/engine-isolation.spec.tspass againstvite build: the isolated threaded run and the non-isolated serial run of 2D LJ fluid.🤖 Generated with Claude Code
https://claude.ai/code/session_01E2eZ9vB9rpavnjH7bPxkuK