IUCAA-HPC Informal Training Program



I am planning to carry out a small informal training program in IUCAA on High Performance Computing (HPC) or Parallel Computation. I have not fully worked out the program but tentatively the first session will be on November 11, 2011 (may be at 4PM in Bhaskara 2).

The program will have a set of 3-4 lectures and demonstrations by me and some hands on sessions. I expect, hands on sessions can be done in parallel with lectures and demonstrations. However, it may make the session longer (around 1.30 to 2.0 hours). After the first session, I will expect everybody to bring the laptop for the hands on sessions.

The first lecture will be just an overview of parallel computation (basically I will discuss few more things than what I discussed here . Apart from the first session, other sessions will be in the form of modules and every module will have exercises.

If you are an IUCAA member and have not signed in for the activity you can do that here so that I can add you in my mailing list . For time being you can browse my hpc pages from the main page of my webpage, just to have a feel of hpc :).

The tentative list of topics to be covered

  1. An overview of High Performance Computing - Why Parallel Computation, Parallel Problems, Models of parallel computation, Parallel Platforms.
  2. Static and dynamic libraries, Profiling, Optimization, Compiler flags, Debugging
  3. Shared Memory Programing - OpenMP, pthreads, ITBB etc.,
  4. Distributed Memory Programming - MPI, PVM (may be)
  5. GPU and Heterogeneous computing - CUDA and OpenCl

Session -1 : An overview of parallel Computation

Novemeber 11, 2011, 4.00PM, Bhaskara 2, IUCAA

Download the presentation here

This will be an overview of parallel computing. Basically, I will discuss about the need of parallel computation, models of parallel computation, parallel problems and platforms available. There will be no discussion on programming syntax in this session. I will also explain uni-processors, multi-core processors, multi-processors and cluster systems, General Purpose Graphical Processing Units (GP-GPU) and Accelerated Processing Units (APUs). There will be only lecture and questions and answers in this session and no background of any programming language will be expected. This is may of general interest to everybody.

Some of the participants have told me that they are very much interested in HPC but have forgotten the ABC of programming ! In order to help them I have decided to have one extra session (which will be in place of tutorial of the session -1 and will be of 30 min). Roughly I will explain the following things and people who are already familiar with these things may leave after 1 hour.

top

Fortran and C References Some interesting Videos from intel

Session -2 : Shared Memory Programming with OpenMP

Novemeber 15, 2011, 4.00PM, Bhaskara 2, IUCAA

Download the presentation from here .

OpenMP Examples Programs (for download )

  1. hello_world_omp.c
  2. scalar_product_omp.c
  3. matrix_vector_omp.c
  4. compute_pi_omp.c
  5. prime_number_omp.c
  6. schedule_omp.c
  7. nbody_kernal_omp.c
  8. first_private_omp.c
  9. last_private_omp.c
  10. barrier_omp.c
  11. critical_omp.c

Get all the files (including the missing ones) and Makefile from here .

top

Session -3 : Shared Memory Programming with pthreads

February 01, 2012, 4.00PM, Bhaskara 2, IUCAA

Shared and distributed memory programming are two main paradigms of parallel programming. The fist one is useful when we have a system in which multiple processing units (eg. cores) share the same main memory (RAM). The second one is useful when we have a large number or workstations networked (clusters). On the basis of the paradigm we are following i.e., shared memory or distributed memory, there are different Application Programming Interfaces (API) available. The most common API for distributed programming has been Message Passing Interacce (MPI). For shared memory programing the common APIs are Posix Threads (pthreads), OpenMp, Intel-Threading Building Blocks (ITBB) etc.

In my last session I discussed about OpenMP (slides and example programs of that are available on my web page). In the present session I plan to explain the posix threads with giving examples in 'C'. Learning Posix threads is not only important from the point of view of shared memory programming, it is useful for GPU and hybrid programming (CPU-GPU) also, since it shares many patterns with those. Apart from explaining a few advanced concepts of 'C' programing like pointers and structures (for those who are not familiar with these), I will cover the following topics:

You can download the slides of my presentation here

top

pthreads Examples Programs (for download)

  1. hello_world1_pthreads.c
  2. hello_world2_pthreads.c
  3. return_pthreads.c
  4. summation1_pthreads.c
  5. summation2_pthreads.c
  6. mutex1_pthreads.c
  7. mutex2_pthreads.c
  8. create_fork.c
  9. create_pthreads.c
  10. stack_pthreads.c
  11. scalar_prod_pthreads.c
  12. compute_pi_pthreads.c
  13. nbody_kernal_pthreads.c

Some interesting stuff on pthreads

top

Valid HTML 4.01 Transitional

This document was last modified on 02/27/2017 10:11:02