ECTS credits:

Students (TU Wien and other Austrian universities – please note especially step 3 with your co-registration) can earn credits (ECTS) via VSC-School I (winter) and VSC-School II (summer).

Please contact Claudia during the course!

 

VSC training events:     Opens external link in new windowvsc.ac.at/training

 

HLRS training events:   Opens external link in new windowwww.hlrs.de/training

HLRS practicals:            Opens external link in new windowfs.hlrs.de/projects/par/par_prog_ws/practical/README.html

HLRS online courses:   Opens external link in new windowwww.hlrs.de/training/par-prog-ws

Free access to the HLRS online courses (recordings and PDF files) is restricted to the members of the HLRS course mailing list. You may sign in for the HLRS course mailing list at the course to get access to it.

 

Agenda

Lunch is not included (self pay) – nearest restaurant is the Mensa (1st floor, yellow area) Mensa-Menu

 

Slides:

Opens external link in new windowDay 1: Crash course in modern hardware

Opens external link in new windowDay 1: Introduction to OpenMP

Opens external link in new windowDay 2: Pitfalls and advanced OpenMP

   Day 2: Intel Inspector XE – the link is available only during the course for the course participants!

 

Standard Documents = OpenMP 5.0 Specifications (PDF) and Reference Guides (PDF)

 

Hands-on:

Please open a terminal (xterm) and connect to vsc3:

ssh -X training@vsc3.vsc.ac.at    [ login at VSC-3 ]

ssh -X ......                                    [ access your compute node – see tiny sheet in your keyboard ]

cd ~/OpenMP/##/pi                      [ use your own directory (shared account) – ## = number of your PC ]

module load intel/18                     [ load the necessary module ]

 

Editors:

vi, vim, nano, emacs [ nedit – only at login nodes ] – editors cheat sheets: Nano, Vi(m)

 

Complilation:

C:             icc   -qopenmp         -o pi pi.c

Fortran:    ifort -qopenmp         -o pi pi.f90    [ !$ ]

Fortran:    ifort -qopenmp -fpp -o pi pi.f90    [ #ifdef _OPENMP ]

 

Execution:

export OMP_NUM_THREADS=number_of_threads:    [ 1 – 4 ]

./pi

 

Solutions:

Make sure you have fully completed the exercises before checking the solution,
otherwise you will loose out on 90% of the learning benefits!

Solutions: ~/OpenMP/solution/pi

 

Intel Inspector XE:

cd ~/OpenMP/##/pitfalls

Test with my_prog = conflict, race1, and race2 (and as additional exercises: demo_with_bugs.c)

               use Intel Inspector XE to find the errors in all three examples
               correct the source (without modifying the numerical semantics)
               verify again with Inter Inspector XE  -->  until zero errors reported

module load intel/18

export EDITOR=nedit (nedit will work on VSC-3 login nodes only)

export OMP_NUM_THREADS=4

Compile the application without any optimization:

       C:             icc   -qopenmp -O0 -g -o my_prog my_prog.c

       Fortran:    ifort -qopenmp-O0 -g -o my_prog my_prog.f90

inspxe-gui & (usage see also slides)

select:

Projectname: ##_my_prog_1 (name must be different to existing files)

Location: ~/OpenMP/##/pitfalls/

Application: ##_my_prog

choose:

Threading Error Analysis / Locate Deadlocks and data Races

necessary options:

                  scope: extremely thorough

                  use maximum resources

(note the "Show command line" button --> use Cut & Paste if used within job script)

Start invokes execution and analysis


Alternative command line interface
 --> use within job scripts --> for shortcut type: my-inspxe

inspxe-cl -collect ti3 -knob terminate-on-deadlock=false -knob stack-depth=16 -knob scope=extreme -knob remove-duplicates=true -knob use-maximum-resources=true -module-filter-mode=include -appdebug=off -no-trace-mpi -result-dir=my_prog_1 -- ./my_prog
(bold parts have to be manually added when using Cut & Paste)

inspxe-cl -report=problems -format=csv -result-dir=my_prog_1