From cb97e041ef947e48df2cc00d4fabdfb8d0f2b578 Mon Sep 17 00:00:00 2001 From: Dariusz Rozmus Date: Wed, 2 Dec 2026 20:44:59 +0100 Subject: [PATCH] docs(running): document parallel multi-worker Geant4 simulations --- docs/running.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/running.md b/docs/running.md index c05d051..ded41e7 100644 --- a/docs/running.md +++ b/docs/running.md @@ -63,6 +63,21 @@ The Simulations Page consists of 3 main sections: === "Geant4" + Geant4 simulations run directly in your browser using WebAssembly — no backend or login is required. + + ### Parallel execution (Number of tasks) + + You can speed up local Geant4 simulations by running them in parallel across multiple browser Web Workers using the **Number of tasks** field in the run form. + + - By default, YAPTIDE selects up to `CPU cores - 1` (leaving one core free so the interface stays responsive), capped at a safe browser memory limit (currently **3 parallel workers**). + - The total number of primary particles is split evenly across the workers, each running with independent random seeds. + - Once all workers finish, their scoring outputs are merged automatically into a single result set. + + !!! warning + Each Web Worker runs in its own isolated browser memory space. If your browser runs low on memory or reports an allocation error, reduce **Number of tasks** (e.g., to `1` or `2`) or switch to `PARTIAL DATASETS`. + + ### Datasets + In order to run the simulation, Geant4 needs to sample information from datasets. You can choose to download them all (`FULL DATASETS`) before starting the simulation (you will not be able to start the simulation before the datasets are loaded), @@ -71,8 +86,8 @@ The Simulations Page consists of 3 main sections: ![Dataset download options](assets/running/geant4_dataset_download_options.png) !!! note - Using `FULL DATASETS` is a recommended way. After download, the files are stored in the browser even after closing the page - and can be loaded back nearly instantly. + `FULL DATASETS` stores all files in browser cache even after closing the page so they can be reloaded quickly without network access. + However, when running multiple parallel tasks, `PARTIAL DATASETS` (on-demand loading) is lighter on browser RAM because each worker only loads the physics data files actually needed by the simulation. For dataset management there exist an additional Dataset Download panel. If the files have not been downloaded yet, the `START DOWNLOAD` button is presented. If the application detects that the datasets are present in the browser cache, @@ -82,7 +97,7 @@ The Simulations Page consists of 3 main sections: ![Datasets cached](assets/running/dataset_download_cached.png) - After loading the datasets, you are clear to start the simulation. + After loading the datasets (or immediately when using `PARTIAL DATASETS`), you are clear to start the simulation. When the conditions are met, and the parameters are configured, click `START SIMULATION`. After successful submission to local or remote worker, the simulation is in PENDING state.