Getting Started with ASCOT5 task for ISC26 SCC (In-Person Part)
Overview
ASCOT5 is a simulation tool used in fusion energy science and engineering. It solves test particle trajectories in magnetized plasmas using the Monte Carlo method, providing statistical analysis on the overall behavior of a particle population.
The code is frequently applied to study fast particles: fusion-born alpha particles (He2+) inherently present in any fusion device, energetic ions produced by external heating schemes such as neutral beam injection and ion cyclotron resonance heating, and runaway electrons often generated during plasma disruptions. A key feature of ASCOT5 is its full 3D geometry capability, which enables the study of how fast particles are affected by magnetic field perturbations, and assessment of whether fast particle losses pose a risk to plasma-facing components within the reactor chamber.
The code is extensively parallelized with hybrid MPI+OpenMP scheme with GPU support, and it is capable of large simulations with ten million markers or more.
GitHub: https://github.com/ascot4fusion/ascot5
Documentation: https://ascot4fusion.github.io/ascot5/
Presentation:
Build Ascot5
Install the requirements:
Any compiler (GNU, NVHPC, INTEL)
HDF5
MPI
Download the source:
git clone https://github.com/ascot4fusion/ascot5.git git checkout 74d274dFor CPU:
make ascot5_main -j MPI=1 OMP=1 NSIMD=8 CC=mpicc make libascot -j MPI=1 OMP=1 NSIMD=8 CC=mpicc
MPI=1→ enables MPI support
OMP=1→ enable OpenMPNSIMD=8→ SIMD vector length used for CPU vectorization.CC=mpicc→ MPI C compiler wrapper
For GPU
make ascot5_main -j MPI=1 ACC=1 GPU=1 CC=mpicc make libascot -j MPI=1 ACC=1 GPU=1 CC=mpicc
ACC=1→ enable OpenACCGPU=1→ enable computation on GPU
Running and accessing results
The simulation is executed as follows:
./ascot5_main --in=<path/to/input.h5>From stdout, you can confirm that the code is running in MPI parallel by finding the lines
Initialized MPI, rank X, size Y.If the simulation completed successfully, the end of log will look like this (note: the results shown here are for the 1M marker case):
Summary of results:
648600 markers had end condition Sim time limit
351400 markers had end condition Wall collision
No markers were aborted.
Done.
Simulation completeThe same inputs can be used for both CPU and GPU simulations.
Tasks and Submissions
Run the ASCOT5 application with the given input.
Submit your best performance (stdout), build script and run script. Do not submit multiple results nor binary files.