diff --git a/README.md b/README.md index b720e814f0bc8448c3951cffd234468b020834fd..04236dfe44425b5450ab163bd9dfeb6b28000cdc 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,63 @@ -# PDC Summer School: General Instructions for the OpenMP Labs +# PDC Summer School 2022: General Instructions for the OpenMP Labs ## Where to run -The exercises will be run on PDC's cluster [Tegner](https://www.pdc.kth.se/hpc-services/computing-systems/tegner-1.737437): +The exercises will be run on PDC's supercomputer [Dardel](https://www.pdc.kth.se/hpc-services/computing-systems/dardel-1.1043529): ``` -tegner.pdc.kth.se +dardel.pdc.kth.se ``` ## How to login To access PDC's systems you need an account at PDC. Check the [instructions for obtaining an account](https://www.pdc.kth.se/support/documents/getting_access/get_access.html#apply-via-pdc-webpage). -Once you have an account, you can follow the [instructions on how to connect from various operating systems](https://www.pdc.kth.se/support/documents/login/login.html). +Once you have an account, you can follow the Quick Start for Dardel instructions for [how to log in](https://www.pdc.kth.se/support/documents/basics/quickstartdardel.html#how-to-log-in). -Related to the Kerberos-based authentication environment, please check the [Kerberos commands documentation](https://www.pdc.kth.se/support/documents/login/login.html#general-information-about-kerberos) +## More about the environment on Dardel -## More about the environment on Tegner +Software, which is not available by default, needs to be loaded as a [module](https://www.pdc.kth.se/support/documents/basics/quickstartdardel.html#the-lmod-module-system) at login. Use ``ml avail`` to get a list of available modules. Many software modules become available after loading the latest PDC module using ``ml PDC``. -Software, which is not available by default, needs to be loaded as a [module](https://www.pdc.kth.se/support/documents/run_jobs/job_scheduling.html#accessing-software) at login. Use ``module avail`` to get a list of available modules. The following modules are of interest for this lab exercises: +To setup the development environment see: [Compilers and Libraries on Dardel](https://www.pdc.kth.se/support/documents/software_development/development_dardel.html). -- Different versions of the GNU compiler suite (``gcc/*``) -- Different versions of the Intel compiler suite (``i-compilers/*``) +The home directories on Dardel are provided through a Lustre service. See the page [Data Management](https://www.pdc.kth.se/support/documents/data_management/data_management.html) for more information. -For more information see the [software development documentation page](https://www.pdc.kth.se/support/documents/software_development/development.html). - -Home directories are provided through an OpenAFS services. See the [AFS data management page](https://www.pdc.kth.se/support/documents/data_management/afs.html) for more information. - -To use the Tegner compute nodes you have to submit [SLURM batch jobs](https://www.pdc.kth.se/support/documents/run_jobs/queueing_jobs.html) or run [SLURM interactive jobs](https://www.pdc.kth.se/support/documents/run_jobs/run_interactively.html). +To use the Dardel compute nodes you have to use the resource manager as described here: [How to Run jobs](https://www.pdc.kth.se/support/documents/run_jobs/job_scheduling.html). ## Compiling programs -By default you are provided with the compilers that come with the OS and are not the most recent versions of the compilers. To use a recent version of the GNU compiler suite or the Intel compilers use +By default you are provided with the compilers that come with the OS and are not the most recent versions of the compilers. To use a recent version of the GNU compiler suite use ``` -module load gcc -``` -or -``` -module load i-compilers +ml gcc +ml cpe/21.11 +ml PrgEnv-gnu ``` ## Running OpenMP programs -After having compiled your code with the -[correct compilers flags for OpenMP](https://www.pdc.kth.se/support/documents/software_development/development.html), -it is necessary to book a node for interactive use: +First it is necessary to book a node for interactive use: ``` -salloc -A <allocation-name> -N 1 -t 1:0:0 +salloc -A <allocation-name> -p main -N 1 -t 1:0:0 ``` You might also need to specify a **reservation** by adding the flag ``--reservation=<name-of-reservation>``. +For the 2022 PDC Summer School the reservation name is ``summer-<date>``, where ``date`` is to be provided in the format ``YYYY-MM-DD``, e.g. ``summer-2022-08-16``. An environment variable specifying the number of threads should also be set: ``` -export OMP_NUM_THREADS=24 +export OMP_NUM_THREADS=128 ``` -Then the srun command is used to launch an OpenMP application: +Then the ``srun`` command is used to launch an OpenMP application: ``` srun -n 1 ./example.x ``` -In this example we will start one task with 24 threads. +In this example we will start one task with 128 threads. It is important to use the `srun` command since otherwise the job will run on the login node. @@ -74,4 +66,4 @@ It is important to use the `srun` command since otherwise the job will run on th The aim of these exercises is to give an introduction to OpenMP programming. All examples are available in both C and Fortran90. - [OpenMP Intro lab](intro_lab/README.md) -- [OpenMP Advanced Lab](advanced_lab/README.md) +- [OpenMP Advanced Lab](advanced_lab/README.md) \ No newline at end of file diff --git a/advanced_lab/run.csh b/advanced_lab/run.csh index e249203d11bfbb795c2ace70dd6ecec00d0176a1..1ca4ec3aa6c92e76644da974edc1274becce7533 100644 --- a/advanced_lab/run.csh +++ b/advanced_lab/run.csh @@ -1,4 +1,5 @@ #!/bin/csh + foreach n (`seq 1 1 16`) env OMP_NUM_THREADS=$n srun -n 1 ./shwater2d end