A four-day course that will take place at TU Delft in October 2024.
Trainer: Dr. Carsten Bauer
Course page: https://www.tudelft.nl/en/evenementen/2024/dcse/courses/introduction-to-julia-for-high-performance-computing
The simplest way to install Julia 1.10 is via juliaup. Run one of the following in a terminal.
curl -fsSL https://install.julialang.org | sh -s -- --yes --default-channel 1.10
winget install julia -s msstore
Important: Julia 1.11 has been released on Oct 8 but for the course we'll still use 1.10. Make sure that you have the correct Julia version! To do so with juliaup
you can run the following commands:
juliaup add 1.10
juliaup default 1.10
The simplest way to download the workshop materials (this GitHub repository) is through Git.
git clone https://github.com/carstenbauer/JuliaDelft24
If you don't have Git, you can either install it or manually download the materials as a .zip
archive instead.
Within the JuliaDelft24
directory (that you've cloned or downloaded above), run the following command:
julia install.jl
Remark: The installation might take a couple of minutes and a few GB of disk space (worst case: up to ~10 minutes and up to ~2.6 GB). The reason is that we also install binary dependencies (e.g. MPI) via Julia's Package manager to be as self-contained as possible. If you want to remove everything after the course, simply delete ~/.julia
.
We will use mpiexecjl
during the course, which - after the installation above - lies in ~/.julia/bin
. To make it available everywhere, we need to add ~/.julia/bin
to the PATH
environment variable. On Linux/macOS, you can add the following line to your .bashrc
(or whatever file gets automatically loaded by your shell):
export PATH=$HOME/.julia/bin:$PATH
I don't have Windows, and don't know how to do it there, but you should readily find instructions on Google.
- Download Visual Studio Code from https://code.visualstudio.com/download and install it.
- Afterwards, install the following two extensions (the linked pages should have "Install" buttons, respectively)
Technically, you don't necessarily need Jupyter Lab, because Visual Studio Code can also open notebook files. However, I highly recommend that you install it:
If you don't manage to install Jupyter using the above link, you can also let Julia try to install it for you. Run julia --project
within the JuliaDelft24
directory and then execute the following Julia commands:
using IJulia
IJulia.notebook()
Anyone with a TU Delft NetID should be able to SSH to DelftBlue. You can use a terminal or Visual Studio Code to login to the cluster. If necessary, more details are available in the DelftBlue documentation here.
Open a terminal and login to the cluster with the following command (where your replace <netid>
by your NetID).
ssh <netid>@login.delftblue.tudelft.nl
- Open Visual Studio Code.
- Press
CTRL + SHIFT + P
orCMD + SHIFT + P
(opens a popup menu) and type and selectRemote-SSH: Connect to Host...
. - When asked for it, input
<netid>login.delftblue.tudelft.nl
for the hostname (with<netid>
replaced by your NetID) and pressEnter
.
After some time, you should have VS Code running on the cluster. You can get an integrated terminal by pressing CTRL + SHIFT + P
or CMD + SHIFT + P
and running Terminal: Create New Terminal
.
Execute the following command on the cluster
sh /projects/julia/setup_account.sh
You only have to do this once. If you're curious, the script will
- put a single line at the end of your
~/.bashrc
, - clone the workshop materials to
/scratch/<netid>/JuliaDelft24
.
(Easy to undo after the course, if you like to.)