Linux
System packages
There are many different Linux distributions, that each use different package managers and name packages in a different way. The following commands should cover the most common Linux distributions, feel free to submit an MR for your favorite distribution if it is not covered.
Debian/Ubuntu family
sudo apt-get update \
&& sudo apt-get install build-essential ca-certificates curl \
libhdf5-dev libhwloc-dev libudev-dev pkg-config \
unzip util-linux
Arch family
sudo pacman -Syu base-devel ca-certificates curl \
libhdf5 libhwloc pkg-config \
unzip util-linux
Fedora family
sudo dnf makecache --refresh \
&& sudo dnf group install c-development \
&& sudo dnf install ca-certificates curl \
hdf5-devel hwloc-devel libudev-devel pkg-config \
unzip util-linux
RHEL family
sudo dnf makecache --refresh \
&& sudo dnf groupinstall "Devlopment tools" \
&& sudo dnf install epel-release \
&& sudo /usr/bin/crb enable \
&& sudo dnf makecache --refresh \
&& sudo dnf install ca-certificates curl \
hdf5-devel hwloc-devel libudev-devel pkg-config \
unzip util-linux
openSUSE family
sudo zypper ref \
&& sudo zypper in -t pattern devel_C_C++ \
&& sudo zypper in ca-certificates curl \
hdf5-devel hwloc-devel libudev-devel pkg-config \
unzip util-linux
Rust
To compile Rust code, you need a Rust toolchain. But in this course, we are
going to use experimental SIMD standard library features that are not yet
stabilized. This means that we will more specifically need to use a specific
nightly release of the Rust compiler, and those are best installed using the
official rustup
toolchain management system.
Please select the tab below which best describes your intent:
If you have already installed a Rust toolchain via rustup
for a previous
project, which you can quickly check via the following command…
# Should print a rustup version, followed by a Rust toolchain version
rustup --version
…then you do not need to do anything special and can proceed with the next steps.
As this course uses a rust-toolchain
file, the
rustup
-provided version of cargo
will automatically download and install the
right nightly compiler version on your first attempt to build this course’s
Rust projects. It will then proceed to use this nightly compiler release for
that project. Meanwhile any other Rust projects will be unaffected and will keep
using the same toolchain version.
That being said, if your Internet connexion is slow or only intermittently available, you can force the toolchain installation process to occur ahead of time by running the following command:
rustup toolchain install nightly-2025-04-25
HDF5-to-PNG renderer
Throughout the second part of the course, we will be producing HDF5 files which contain time series of tabulated chemical concentrations. For quick and dirty debugging, it is convenient to render those tabulated concentrations into colorful PNG images.
To this end, you can use the data-to-pics
program which was developed as part
of a previous version of this course.
You can easily build this program and install it next to other rustup
-managed
binaries (typically in ~/.cargo/bin
) by running the following command:
cargo install --git https://github.com/HadrienG2/grayscott.git data-to-pics
Environment test
Your Rust development environment should now be ready for this course’s practical work. I highly advise testing it by running the following shell script:
curl -LO https://gitlab.in2p3.fr/grasland/numerical-rust-cpu/-/archive/solution/numerical-rust-cpu-solution.zip \
&& unzip numerical-rust-cpu-solution.zip \
&& rm numerical-rust-cpu-solution.zip \
&& cd numerical-rust-cpu-solution/exercises \
&& cargo run -- -n3 \
&& mkdir pics \
&& data-to-pics -o pics/ \
&& cd ../.. \
&& rm -rf numerical-rust-cpu-solution \
&& echo "Your Rust development environment seems to be working"
It downloads, builds and runs the expected source code at the end of the last chapter of this course, then renders the associated images, and finally cleans up after itself by deleting everything. If this all goes well, it should exit with a message saying that your development environment seems to be working.