Hands-On: logging in, editing, compiling, and starting a job at NHR@FAU
Access to our cluster through the JupyterLab
To do the exercises in Hands-On sessions, you will have to access to the cluster Fritz through a JupyterLab. You need a web-browser on which you can run our JupyterLab. By clicking on the link below and entering your e-mail address, you will receive an e-mail containing a link with which you can login one time. Please note that if you log out or get logged out, then you need to do the process and receive a new link via e-mail:
https://hub.nhr.fau.de/jupyter-training-pphps-access.php
The link in your e-mail will bring you to the JupyterHub landing page, where you have to acknowledge the usage conditions. After that, you see a page with a button that says "Start my Server." Clicking on that you can choose between three different session types. For the first two days, choose "Fritz," for the third day choose "Alex." Then, click on "Start" and your session will be started up. It will last for six hours. During that time, a complete Fritz node or a full GPU will be reserved for you.
IMPORTANT: For relinquishing a session, go to "File -> Hub Control Panel" and then click on "Stop my Server." This will take a couple of seconds, so be patient. If you do not stop the session, the job on the cluster will keep running, blocking resources for the rest of the six-hour runtime.
Copying example code to your home directory
You will mostly be working on example code that we provide. The file(s) for the examples are available in the teacher account. In order to copy a specific code, e.g., "HELLO", you just type:
$ cp -a ~e07s0002/HELLO ~
This copies the whole folder, including any subfolders, into your $HOME.
Editing and compiling code
Standard editor like vim is available on the node. You can click on the file and edit a source file. Most software, including compilers and some libraries, is available via the "modules" system. The "module load <x>" command loads software module "<x>", i.e., it sets some environment variables (e.g., PATH) so you can use the software. For loading the Intel compiler and the Intel MPI library, you type:
$ module load intel intelmpi
After that, you have a C (icx), C++ (icpx), and a Fortran (ifx) compiler at your disposal. In addition, an Intel MPI module is loaded. The example codes you will be working with are quite simple. The Intel compiler accepts the same options (well, mostly) as the GCC (here shown for a C code):
$ icx -Ofast my_source.c
In order to make the compiler recognize OpenMP directives, you have to add "-qopenmp" to the command line. For MPI code you have to use one of the provided wrapper scripts (mpiicx, mpiicpx, mpiifx). They behave like normal compilers except that they "know" where to find the MPI headers and libraries.