Learning outcomes

The student will learn advanced programming techniques and the use in command lines of free and performant tools. The main objective of this course is parallel programming (OpenMP, MPI and OpenACC libraries). The student will apply finite-difference techniques for the resolution of typical problems in physics. The student will also get the notions of Linux/Unix that are required for using high-performance calculators.

Content

Working with command lines.

Installation of a complete work environment with free and performant tools.

Advanced use of the gfortran compiler (compilation using a Makefile, optimization, debugger, profiling).

Notions of Linux/Unix and initiation to the use of a high-performance computing (HPC) cluster.

Techniques of Parallel Programming

  1. General notions of parallelism

  2. Parallelization using OpenMP

  3. Parallelization using MPI

  4. Parallelization with job arrays

  5. Parallelization on a GPU with OpenCC.

Finite-Difference Methods

  1. Numerical derivatives

  2. Electrostatics

  3. Schrödinger's equation

  4. Numerical stability.

WARNING : this course is meant for students with very good programming skills in Fortran 90.

Table of contents

1. Advanced use of the gfortran compiler

  working with command lines

  Makefile, debugger, profiling

  Introduction to the cluster (Linux, ifort compiler)

  Fortran 90 : advanced notions

 

2. Finite Differences methods

  Numerical Derivatives

  Electrostatics

    Equation of Laplace, equation of Poisson

    Direct approach by the resolution of a system of linear equations

    Method of Jacobi, method of Gauss-Seidel, method of over-relaxation

  Equation of Schrödinger

    Eigensystem approach

     Eigenstates of a potential

     Band structures

    Continued fractions

     Eigenstates of a potential

     Transmission through a potential barrier

    Time-dependent Schrödinger's equation

  Numerical stability of a discretization scheme

 

3. General notions of parallelism

  concepts of cpu time, wallclock time, speedup, efficiency, load balancing, multithreading

  Amdahl's law, how to parallelize

  automatic parallelization with ifort

 

4. Parallelization with OpenMP

  OpenMP with gfortran and ifort

  scripts to use on the cluster

  presentation of the OpenMP library

 

5. Parallelization with MPI

  MPI with gfortran and PGI

  scripts to use on the cluster

  presentation of the MPI library

 

6. Use of jobarrays on the cluster

  Execution of parallel scripts on Windows

 

7. Parallelization with OpenACC (GPU)

  PGI Compiler & PGI Profiler

  scripts to use on the cluster

  presentation of the OpenACC library

  comparison between different methods of the parallelization of Poisson's equation

 

There is a syllabus for the Finite Differences methods.

Exercices

Use in command lines of the gfortran compiler. Compilation using a Makefile. Installation of a complete work environment. Compilation of a program that uses OpenMP. Calculation of the bound states of an harmonic potential. Calculation of the band structure of a periodic potential. Calculation of electronic scattering through a potential barrier. Parallelization of the band structure calculation with OpenMP. Introduction to Linux/Unix and to the use of a high-performance computer.

Teaching methods

The theory will be presented using a videoprojector. The exercises will be done on either a personnal computer or in a computer room.

Assessment method

A written exam in Q1 will evaluate the theoretical part of the course (demonstrations, 6 points). An oral exam in Q2 will evaluate the work achieved during the practical sessions. The student will have to show that he acquired the different techniques presented in the course. He will present his solutions for the exercises that come with this course. He must also be able to answer theoretical questions related to the course.

Language of instruction

French
Training Study programme Block Credits Mandatory
Master in Physics Finalité spécialisée en physique du vivant 1 3 No
Master in Physics Finalité approfondie 1 3 No
Master in Physics Standard 1 3 No
Master in Physics Finalité didactique 1 3 No
Master in Physics Finalité spécialisée en physique et data 1 3 No
Master in Physics Finalité spécialisée en physique du vivant 2 3 No
Master in Physics Finalité approfondie 2 3 No
Master in Physics Finalité didactique 2 3 No
Master in Physics Finalité spécialisée en physique et data 2 3 No