From 41677e9a9b81f27dd0e0c8f4a5eb6e84e92a9001 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Tue, 30 Jun 2026 17:48:03 +0200 Subject: [PATCH 1/2] [gray scott/2026] Fix the session type descriptions --- docs/events/gray_scott_2026.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/events/gray_scott_2026.md b/docs/events/gray_scott_2026.md index 17088993..4e2164e0 100644 --- a/docs/events/gray_scott_2026.md +++ b/docs/events/gray_scott_2026.md @@ -39,9 +39,9 @@ The summer school is the in person component of the [Gray Scott School 2026](htt | 14:30 - 15:00 | **CPU architecture** | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | | 15:00 - 15:30 | **Vectorization VS parallelization** | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | | 15:30 - 16:00 | Coffe break | Coffe break | Coffe break | Coffe break | Coffe break | - | 16:00 - 16:30 | **What is compilation** | **Theory and profiling tools (practical)** | **Memory profiling tools (practical)** | **Computation and digital precision (practical)** | **Impact of the system on applications performances (practical)** | + | 16:00 - 16:30 | **What is compilation** | **Theory and profiling tools (lecture)** | **Memory profiling tools (lecture)** | **Computation and digital precision (lecture)** | **Impact of the system on applications performances (lecture)** | | 16:30 - 17:00 | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | - | 17:00 - 17:30 | **Did you say unit tests? (practical)** | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | + | 17:00 - 17:30 | **Did you say unit tests? (lecture)** | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | | 17:30 - 18:00 | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | ??? info "GPU programming sessions" @@ -64,7 +64,7 @@ The summer school is the in person component of the [Gray Scott School 2026](htt | 15:30 - 16:00 | Coffe break | Coffe break | Coffe break | Coffe break | | | 16:00 - 16:30 | _(cont.)_ | **Python GPU computing: Pytorch** | _(cont.)_ | _(cont.)_ | | | 16:30 - 17:00 | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | | - | 17:00 - 17:30 | _(cont.)_ | _(cont.)_ | **Julia in Rust and C++ with pixi? (practical)** | **A story about cubic root optimisation in C++ and Fortran (practical)** | | + | 17:00 - 17:30 | _(cont.)_ | _(cont.)_ | **Julia in Rust and C++ with pixi? (lecture)** | **A story about cubic root optimisation in C++ and Fortran (lecture)** | | | 17:30 - 18:00 | _(cont.)_ | _(cont.)_ | _(cont.)_ | _(cont.)_ | | | 18:00 - 18:30 | _(cont.)_ | _(cont.)_ | _(cont.)_ | Closing presentation & What's next? | | From 2b8f42c906eaf0fbe8337769e869f9ce582a1176 Mon Sep 17 00:00:00 2001 From: Georgios Kafanas Date: Tue, 30 Jun 2026 17:48:54 +0200 Subject: [PATCH 2/2] [gray scott/2026] Add resource links --- docs/events/gray_scott_2026.md | 212 +++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/docs/events/gray_scott_2026.md b/docs/events/gray_scott_2026.md index 4e2164e0..29f5e851 100644 --- a/docs/events/gray_scott_2026.md +++ b/docs/events/gray_scott_2026.md @@ -94,3 +94,215 @@ The registration process. - If you do not receive an email by the Tuesday deadline, then please contact the [HPC team](mailto:hpc-team@uni.lu) immediately to have your account created. + +## School resources + +### School containers + +The school provides [containers](https://cta-lapp.pages.in2p3.fr/COURS/GRAY_SCOTT_REVOLUTIONS/GrayScott2026/web_9.html) with preset environments for each session. The Apptainer version of each container have been downloaded in the cluster software set so that users do not have to waste space in their own directories. + +```text +/work/projects/software_set/containers/Apptainer/gray_scott/2026 +``` + +All Apptainer containers mount the `/tmp` directory of the container to the `/tmp` file system of the node. The `/tmp` is mounted on a file system local to the node, and it is [best suited](https://hpc-docs.uni.lu/filesystems/#storage-systems-overview) for compilation, a process that generates man small files. + +!!! tip "Accessing the files inside the container from cluster nodes" + + We suggest that you bind the `/home/jovyan/Example` somewhere on your home file system (mounted in `${USER}`). The examples directory container the source code for the examples, and directories mounted under `${USER}` are accessible from both computes and login nodes. For instance, assuming that you are working on directory `${HOME}/grey_scott_2026` use the following bind option. + + ```text + --bind ${PWD}/1_cpp_on_cpu/EXAMPLE:/home/jovyan/Example + ``` + + So, you can run you container in a compute node, and use your preferred editor in the `${HOME}/grey_scott_2026/1_cpp_on_cpu/EXAMPLE` directory. + +#### Working with light images + +The light images (`light-images.sif`) contain only the strictly necessary packages. There is no built-in development environments, and some of the are missing tools required to compile the code. However, they can run with very few resources (e.g single core jobs). + +Start by setting up your environment. + +```bash +export CONTAINERS=/work/projects/software_set/containers/Apptainer/gray_scott/2026 +``` + +Them you can run your commands inside the container. + +=== "Interactive session" + + These commands launch an interactive session inside the container where you can run your applications. These command is better used with code server images (`code-server.sif`). For instance, the command for the C++ sessions on CPUs is the following. + + ```console + mkdir --parents 1_cpp_on_cpu/Example && \ + srun --ntasks=1 --pty \ + apptainer exec \ + --bind ${PWD}/1_cpp_on_cpu/Example:/home/jovyan/Example \ + --writable-tmpfs \ + --no-mount home,cwd \ + --fakeroot \ + --cwd=/home/jovyan \ + --env PS1="$PS1" \ + ${CONTAINERS}/1_cpp_on_cpu/light-image.sif \ + bash \ + --rcfile /home/jovyan/.bashrc + ``` + +=== "Single command" + + These commands launch single commands in the container and then exit. They are better used for executing simple commands in a Slur interactive session, and integrates well with workflows where commands must run outside the container. For instance, to run a command `` inside the container for the session on C++ on CPUs is the following. + + ```console + srun --ntasks=1 + apptainer exec \ + --bind ${PWD}/1_cpp_on_cpu/Example:/home/jovyan/Example \ + --cwd=/home/jovyan \ + --writable-tmpfs \ + --no-mount home,cwd \ + --fakeroot \ + ${CONTAINERS}/1_cpp_on_cpu/light-image.sif \ + bash \ + --rcfile /home/jovyan/.bashrc \ + -c '' + ``` + + To simplify wkrking with the container, define the following function. + + ```bash + run_on_container() { + local container="${1}" + + shift + + mkdir --parents ${PWD}/1_cpp_on_cpu/Example + + srun --ntasks=1 + apptainer exec \ + --bind ${PWD}/1_cpp_on_cpu/Example:/home/jovyan/Example \ + --cwd=/home/jovyan \ + --writable-tmpfs \ + --no-mount home,cwd \ + --fakeroot \ + "${container}" \ + bash \ + --rcfile /home/jovyan/.bashrc \ + -c "$@" + } + ``` + + Then, calling the command `cmakephoenix` in `1_cpp_on_cpu` for instance works as follows. + + ```console + run_on_container ${CONTAINERS}/1_cpp_on_cpu/light-image.sif cmakephoenix + ``` + +--- + +#### Working with code server images + +Code server containers (`code-server.sif`) are available to work on the code interactively through an instance of [VS Code](https://en.wikipedia.org/wiki/Visual_Studio_Code). + +!!! info "Avoid connecting to the login node with a local instance of VS Code" + + Visual Studio Code (VS Code) has the option to run on a remote server. While this provides the option of accessing and editing documents directly on the remote server, VS Code also runs a lot of services in the remote server. Since the access node is shared along multiple users, please avoid logging into the access node through VS Code. + + Instead, run VS Code on a computer node (through a container), connect to a compute node that runs your jobs with an [SSH jump](hpc-docs.uni.lu/connect/ssh/#ssh-jumps) through the login node, or [mount your cluster directory locally](https://hpc-docs.uni.lu/data/transfer/#sshfs). + +There are 2 methods for launching the code server, + +- launch the code server and work with and instance of VC Code running inside the container, or +- launch the container, copy the files locally, and use the container only to build the software. + +The latter method allows you to use the editor that you typically use in the HPC environment, and save any changes to the files in persistent storage. + +To run a container interactively and edit the example code on the native file system, use the `allocate_interactive_session(_gpu)` scripts, located in the following directory. + +```text +/work/projects/software_set/containers/Apptainer/gray_scott/2026/ +``` + +The usage is as follows. + +```text +allocate_interactive_session(_gpu) [(-w|--workdir) ] [(-r|--reservation) ] [--] +``` + +To run a container and work on a VS Code server remotely, there are launcher scripts inside the course directories. For instance: + +```text +/work/projects/software_set/containers/Apptainer/gray_scott/2026/1_cpp_on_cpu/code-server.sh +``` + +Simply submit the launcher script (using a reservation if one is available) and follow the instruction in the `connection_instructions.log` that the submission script generates in the submission directory. + +### Links to exercises and reading material + +These solution method used is the finite difference method. A [nine-point stencil](https://en.wikipedia.org/wiki/Nine-point_stencil) is used to calculate the derivative, and integration methods such as [Cash–Karp](https://en.wikipedia.org/wiki/Cash%E2%80%93Karp_method) and [Runge–Kutta](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods) are used to evaluate the solutions. + +- [Gray Scott 2026 - website source code](https://gitlab.in2p3.fr/CTA-LAPP/COURS/GRAY_SCOTT_REVOLUTIONS/GrayScott2026) + +#### Computer architecture: an overview + +- [Compute terminology translation guide](https://gitlab.in2p3.fr/CTA-LAPP/COURS/GRAY_SCOTT_REVOLUTIONS/GrayScottRevolution/-/wikis/uploads/GrayScottSchool/Day1/ComputeComparison.pdf) +- [CPU hardware architecture](https://gitlab.in2p3.fr/CTA-LAPP/COURS/GRAY_SCOTT_REVOLUTIONS/GrayScottRevolution/-/wikis/uploads/GrayScottSchool/Day1/ArchiCPU.pdf) +- [What every programmer should know about memory](https://people.freebsd.org/~lstewart/articles/cpumemory.pdf) + +#### The Gray Scott diffusion/reaction model and C++ courses + +The main reaction model used throughout the school is the Gray Scott [reaction-diffusion equation model](https://en.wikipedia.org/wiki/Reaction%E2%80%93diffusion_system), that gives its name to the school. + +- [Introduction to the Gray-Scott reaction–diffusion system](https://visualpde.com/nonlinear-physics/gray-scott) + +You can follow how this system is solved numerically in various systems throughout the Gray-Scott school. + +- [Performance optimization of a stencil based solution in CPU and GPU](https://cta-lapp.pages.in2p3.fr/COURS/PerformanceWithStencil/) +- [Performance optimization of a stencil based solution in GPU (older version in French)](https://cta-lapp.pages.in2p3.fr/COURS/PERFORMANCE_WITH_STENCIL_GPU/index.html) + +#### The Fortran courses + +The source code and a container with all the tools to build the source code are distributed in a single repository, for both the CPU and GPU components of the course. You can either use just the code on your local system, or you can build and use the container. + +- [Gray Socc Fortran tutorial](https://gitlab.in2p3.fr/lafage/GrayScottFortranTuto) +- [Binding to and from C/C++ - Jean Zay supercomputer documentation](http://www.idris.fr/en/docs/jean-zay/compilation/call_c2fortran/) + +IDRIS provides a [set of courses](http://archive.idris.fr/formations/fortran/) and resources in Fortran. + +- [Advanced course](http://archive.idris.fr/media/formations/fortran/idris_fortran_avance_cours.pdf) +- [Expert course](http://archive.idris.fr/media/formations/fortran/idris_fortran_expert_cours.pdf) +- [Fortran 77 course](http://archive.idris.fr/formations/fortran/fortran-77.html) + +An archived version of the course can be find in the IDRIS GitHub repo. + +- [Formations](https://github.com/idriscnrs/formations/) + - [Advanced course](http://archive.idris.fr/media/formations/fortran/idris_fortran_avance_cours.pdf) + - [Expert course](http://archive.idris.fr/media/formations/fortran/idris_fortran_expert_cours.pdf) + +#### Vectorization + +- [The Expressive Vector Engine (EVE)](https://jfalcou.github.io/eve/) + +#### The Kokkos programming framework + +- [Gray-Scott School Kokkos](https://github.com/Maison-de-la-Simulation/gray-scott-kokkos): This repository contains the Kokkos courses and exercises for the Gray-Scott School 2026. +- [Cheat Sheets for Kokkos](https://cexa-project.org/documents/) +- [Installation cheat sheet for Kokkos](https://cexa-project.org/documents/cheat_sheet_install_for_kokkos.pdf) +- [Kokkos documentation](https://kokkos.org/kokkos-core-wiki/) + +#### Numerical representation and accuracy + +- [Floating Point Math: a quick introduction](https://0.30000000000000004.com) + +#### The Python course + +- [A `nanobind` tutorial: provide a Python interface to your C/C++ code](https://github.com/luckyjim/bind_template/) +- [Accelerating Python on HPC with Dask](https://pretalx.com/euroscipy-2024/talk/89BJ9Q/) + +#### Links to HPC resources + +- [Virtual Institute - High Productivity Supercomputing (VI-HPS)](https://www.vi-hps.org/) +- [AMD uProf ("MICRO-prof") is a performance analysis tool-suite for x86 based applications](https://www.amd.com/en/developer/uprof.html) + +#### GPU programming + +- [ZLUDA](https://github.com/vosen/ZLUDA): a drop-in replacement for CUDA on non-NVIDIA GPUs. +- [gfx1032_gray-scott-reaction](https://codeberg.org/jmcelroy/gfx1032_gray-scott-reaction): a version of the Gray Scott reaction, converted from CUDA to HIP.