Parallel Programming Workshop @ BSC
Date: 24 - 28 October 2016
The registration to this course is now open. Please, bring your own laptop. All the PATC courses at BSC are free of charge.
Course Convener: Xavier Martorell
Objectives: The objectives of this course are to understand the fundamental concepts supporting message-passing and shared memory programming models. The course covers the two widely used programming models: MPI for the distributed-memory environments, and OpenMP for the shared-memory architectures. The course also presents the main tools developed at BSC to get information and analyze the execution of parallel applications, Paraver and Extrae.
It also presents the Parallware Assistant tool, which is able to automatically parallelize a large number of program structures, and provide hints to the programmer with respect to how to change the code to improve parallelization. It deals with debugging alternatives, including the use of GDB and Totalview. The use of OpenMP in conjunction with MPI to better exploit the shared-memory capabilities of current compute nodes in clustered architectures is also considered. Paraver will be used along the course as the tool to understand the behavior and performance of parallelized codes. The course is taught using formal lectures and practical/programming sessions to reinforce the key concepts and set up the compilation/execution environment.
Attendants can bring their own applications and work with them during the course for parallelization and analysis.
Learning Outcomes: The students who finish this course will be able to develop benchmarks and applications with the MPI, OpenMP and mixed MPI/OpenMP programming models, as well as analyze their execution and tune their behaviour in parallel architectures.
Level:
INTERMEDIATE: for trainees with some theoretical and practical knowledge; those who finished the beginners course
ADVANCED: for trainees able to work independently and requiring guidance for solving complex problems
Prerequisites: Fortran, C or C++ programming. All examples in the course will be done in C.
Agenda:
Day 1 (Monday)
Session 1 / 9:30 am – 1:00 pm (2 h lectures, 1 h practical)
Introduction to parallel architectures, algorithms design and performance parameters
Introduction to the MPI programming model
Practical: How to compile and run MPI applications
Session 2 / 2:00pm – 5:30 pm (2h lectures, 1h practical)
MPI: Point-to-point communication, collective communication
Practical: Simple matrix computations
MPI: Blocking and non-blocking communications
Day 2 (Tuesday)
Session 1 / 9:30 am - 1:00 pm (1.5 h lectures, 1.5 h practical)
MPI: Collectives, Communicators, Topologies
Practical: Heat equation example
Session 2 / 2:00 pm - 5:30 pm (1.5 h lectures, 1.5 h practical)
Introduction to Paraver: tool to analyze and understand performance
Practical: Trace generation and trace analysis
Day 3 (Wednesday)
Session 1 / 9:30 am - 1:00 pm (1 h lecture, 2h practical)
Parallel debugging in MareNostrumIII, options from print to Totalview
Practical: GDB and IDB
Practical: Totalview
Practical: Valgrind for memory leaks
Session 2 / 2:00 pm - 5:30 pm (2 h lectures, 1 h practical)
Shared-memory programming models, OpenMP fundamentals
Parallel regions and work sharing constructs
Synchronization mechanisms in OpenMP
Practical: heat diffusion in OpenMP
Day 4 (Thursday)
Session 1 / 9:30am – 1:00 pm (2 h practical, 1 h lectures)
Tasking in OpenMP 3.0/4.0/4.5
Programming using a hybrid MPI/OpenMP approach
Practical: multisort in OpenMP and hybrid MPI/OpenMP
Session 2 / 2:00pm – 5:30 pm (1.5 h lectures, 1.5 h practical)
Parallware: guided parallelization
Practical session with Parallware examples
Day 5 (Friday)
Session 1 / 9:30 am – 1:00 pm (2 hour lectures, 1 h practical)
Introduction to the OmpSs programming model
Practical: heat equation example and divide-and-conquer
Session 2 / 2:00pm – 5:30 pm (1 h lectures, 2 h practical)
Programming using a hybrid MPI/OmpSs approach
Practical: heat equation example and divide-and-conquer
END of COURSE
Event types:
- Workshops and courses
Activity log