Instructors: Carsten Bauer, Ludovic Räss, Ivan Utkin, and Johannes Blaschke (remote).
Where: TU-Eindhoven 0.244
When: July 9th, 1:30 PM (CEST)
More: https://pretalx.com/juliacon2024/talk/NTQZJJ/
-
Onboarding
-
Introducing the example
-
Parallelization on Perlmutter
-
(short break)
-
To begin with, make sure that you have VS Code installed on your laptop.
- In VS Code, press
F1
and run theRemote-SSH: Open SSH Host...
command.- If the command isn't available, make sure that Remote - SSH extension is installed (but it should be available out of the box).
- Enter
[email protected]
(withtrainXY
replaced by your training account) and press enter. - In the popup input box, enter your password and press enter.
After a second or two, you should have VS Code running on a Perlmutter login node! 🎉
-
Clone the workshop materials into
$SCRATCH/juliacon24-hpcworkshop
by running the following command.git clone https://github.com/JuliaHPC/juliacon24-hpcworkshop $SCRATCH/juliacon24-hpcworkshop
- You will always work in this folder (
$SCRATCH/juliacon24-hpcworkshop
) during the workshop.
- You will always work in this folder (
-
Run the following commands:
cd $SCRATCH/juliacon24-hpcworkshop ./setup.sh
What does this do? (click me if you're curious)
- The setup script
- modifies your
$HOME/.bashrc
to- permanently put your Julia depot onto the parallel file system (
$SCRATCH/.julia
) - auto-load the Julia module when you login (such that the
julia
command is available) - make
mpiexecjl
available (i.e. modify$PATH
)
- permanently put your Julia depot onto the parallel file system (
- instantiates the Julia environment
- installs MPI.jl's
mpiexecjl
wrapper - installs a Jupyter kernel (for NERSC's Jupyter hub)
- modifies your
- The setup script
-
!! Before you proceed, restart VS Code !!
- Close it fully, open it again, and connect to Perlmutter again (see above). Otherwise the
.bashrc
changes won't be in effect.
- Close it fully, open it again, and connect to Perlmutter again (see above). Otherwise the
-
Let's now turn to the Julia VS Code extension.
- Installing the extension
- Open the extensions view (press
CTRL/CMD + SHIFT + X
). - Search for
julia
. - Click on
install
.
- Open the extensions view (press
- Pointing it to
julia_wrapper.sh
- Open the VS Code Settings (press
CTRL/CMD + ,
). - Click on the tab
Remote [SSH: perlmutter.nersc.gov]
. - Search for
Julia executable
. - Insert
/pscratch/sd/t/trainXY/juliacon24-hpcworkshop/julia_wrapper.sh
- withtrainXY
replaced by you training account name - into the text field underJulia: Executable Path
.
- Open the VS Code Settings (press
- If
ALT/OPTION + J
followed byALT/OPTION + O
(or pressingF1
and executing theJulia: Start REPL
command) successfully spins up the integrated Julia REPL, you know that the setup is working! 🎉
- Installing the extension
-
Finally, you should open the workshop directory in VS Code.
- In the VS Code terminal, run
cd $SCRATCH/juliacon24-hpcworkshop
followed bycode -r .
- Manual alternative: Click on the green button "Open Folder" (or press
CTRL/CMD + O
) and enter/pscratch/sd/t/trainXY/juliacon24-hpcworkshop
- withtrainXY
replaced by you training account name.
- In the VS Code terminal, run
As a fallback, you can also try to use Jupyter under https://jupyter.nersc.gov. Just make sure to use the JuliaCon24 HPC Workshop 1.10.4
kernel (open a notebook and select the kernel in the top right corner).
To get the most out of the workshop, you need to apply for a NERSC training account before the workshop (as early as possible)! The reason for this is that everyone who applies for an account has to be checked, which can take some time (between a few minutes and a week) depending on their personal background (e.g. nationality and affiliation).
Please only apply for an account if you 1) have a workshop ticket and 2) really plan to participate in the JuliaCon 2024 workshop on Tuesday, July 9 in person!
To apply for an account:
- Go to https://iris.nersc.gov/train
- Fill out the application form with your details and use the training code that you've received by email.
- Iris will display your training account's login credials only once. Take a screenshot of your login credials, you will not be able to change or recover these after you close this tab!
- You can already start experimenting once your account has been approved. Your training account will be availabe until July 14th (end of JuliaCon). Accounts get deleted afterwards, so remember to backup your data before July 14th.
If your institution is not listed in the drop down menu at https://iris.nersc.gov/train: Please choose "Training Account Only - Org Not Listed", and put your organization name in the "Department" field next.