Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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,
Expand All @@ -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.
Expand Down