TA01 - Calcul scientifique parallèle Introduction to Parallel Programming with MPI Master Modélisation et Simulation - ENSTA - cours AMS TA01
Edouard Audit Patrick Ciarlet Erell Jamelot Pierre Kestener Nicolas Kielbasiewicz Axel Modave
-
[email protected][email protected][email protected][email protected][email protected][email protected]
CEA-Saclay, DSM, France Maison de la Simulation
ENSTA, September, 2016
1 / 89
Déroulement du cours TA01 - Introduction MPI
cours (16/09): Introduction au HPC (P. Kestener) cours+TP (23/09): Initiation MPI 1 (PK + EJ) cours+TP (05/10): Initiation MPI 2 (PK + AM) cours+TP (07/10): Initiation MPI 3 (PK + AM) TP (14/10, 21/10, 28/10, 04/11, 18/11): Mini-projet noté parallélisation d’un problème d’analyse numérique (EDP)(EA + NK) Soutenance orale projet (24/11) Les ressources de calcul utilisées pendant les TP: • poste de travail • cluster gin (ENSTA/UMA)
Evaluation du cours : soutenance + projet (code à remettre aux profs) Horaire du cours : 9h00 - 12h30
2 / 89
Déroulement du cours TA01 - Introduction MPI
Où trouver les planches et autre matériel du cours ? Sur la machine GIN dans le répertoire partagé /share/apps/TA01/ On y trouve quoi ? • Un document aide-mémoire sur l’interface de programmation MPI (C et
Fortran): mpi_aide_memoire_F90.pdf et mpi_aide_memoire_C.pdf • les planches sur HPC et MPI dans slides • des exemples de code en fortran dans codeMPI • de la documentation supplémentaire sur fortran dans doc
On se connecte comment sur GIN ? • login étudiant: a11gr[1-35] • mot de passe donné lors de la première séance • Exemple de connection depuis une machine de la salle de TP: ssh -X [email protected] 1
1 Remplacer a11gr1 par le nom d’utilisateur qui vous est assigné en salle de TP. 3 / 89
Recommended reading on MPI / Parallel Programming
MPI standard: http://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/mpi31-report.htm
books: • Parallel Programming - for multicore and cluster systems by T.
Rauber and G. Rünger, Springer, 2010 •
Multicore Application Programming - For Windows, Linux and Oracle Solaris by Darryl Gove, Addison-Wesley, 2010 • An Introduction to Parallel Programming by Peter Pacheco, Morgan-Kaufmann, 2011
on-line: • Cours MPI de l’IDRIS • Jeff Squyres’s blogs on MPI and HPC • Parallel computing tutorial at LLNL
4 / 89
Recommended reading on Linux environment
Aide mémoire Linux / bash : • Learn/improve your skill on Linux’s command line/Bash
e.g. http://swcarpentry.github.io/shell-novice/ • •
http://www.tldp.org/LDP/abs/html/ http://www.epons.org/commandes-base-linux.php
Améliorer ses compétences: Linux-101-Hacks.pdf, by Ramesh Natarajan Ne JAMAIS hésiter à lire la page de manuel en ligne d’une commande inconnue, e.g. :
man scp
5 / 89
Recommended reading on HPC in general
Good idea to check / read on a regular basis websites like: • subscribe blog/news letters on HPC; e.g.
http://www.admin-magazine.com/HPC/Articles • (En français) HPC Today http://www.hpcmagazine.fr/
des infos actualités sur le software, hardware, ... • (En anglais) Intel Parallel Universe Magazine
http://software.intel.com/en-us/intel-parallel-universe-magazin (attention, parfois un peu biaisé, à lire avec discernement) • Le séminaire de la Modélisation de la Maison de la Simulation.
6 / 89
Other general recommendations ... ... to a software developper for scientific applications Learn/improve your skill on Linux’s command line/Bash e.g. http://swcarpentry.github.io/shell-novice/, http://www.tldp.org/LDP/abs/html/,
http://www.epons.org/commandes-base-linux.php Learn GIT ! • Get yourself a Github or Bitbucket account • Read/Watch a tutorial to get started, e.g.
https://www.grafikart.fr/formations/git Learn a text editor like VIM or EMACS (at advanced level, i.e. learn keyboard short-cuts) Learn python (data analysis, visualization tools, ...) Learn C++11, follow recent evolution to introduce parallelism at core language Have some good knowledge of hardware and the linux operating system Never stop learning... Use multiple sources, multiple points of view... 7 / 89
A few links about python for scientific computing ...
Learn to use Jupyter for running python notebooks inside a web browser
https://github.com/barbagroup/CFDPython https://github.com/ipython-books/minibook-2nd-code Two very good books about IPython by Cyrille Rossant: •
http://cyrille.rossant.net/books
http://bender.astro.sunysb.edu/classes/python-science/
8 / 89
A few links about C++
A recently published book: Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers, and companion github website Some presentations made at CppCon (C++ annual conference): state of the art of C++ language List of Lists of C++ related resources: • https://github.com/fffaraz/awesome-cpp •
https://github.com/fffaraz/awesome-cpp/blob/master/books.md
What should I do (among others things) to improve my C++ skills ? Read code written by others is very good. Google C++ style guide, a must read
9 / 89
A few links about C++ - Advanced
Books by Herb Sutter: C++ coding standards, Exceptional C++, More exceptional C++; these books are quite old (
Edouard Audit Patrick Ciarlet Erell Jamelot Pierre Kestener Nicolas Kielbasiewicz Axel Modave
-
[email protected][email protected][email protected][email protected][email protected][email protected]
CEA-Saclay, DSM, France Maison de la Simulation
ENSTA, September, 2016
1 / 89
Déroulement du cours TA01 - Introduction MPI
cours (16/09): Introduction au HPC (P. Kestener) cours+TP (23/09): Initiation MPI 1 (PK + EJ) cours+TP (05/10): Initiation MPI 2 (PK + AM) cours+TP (07/10): Initiation MPI 3 (PK + AM) TP (14/10, 21/10, 28/10, 04/11, 18/11): Mini-projet noté parallélisation d’un problème d’analyse numérique (EDP)(EA + NK) Soutenance orale projet (24/11) Les ressources de calcul utilisées pendant les TP: • poste de travail • cluster gin (ENSTA/UMA)
Evaluation du cours : soutenance + projet (code à remettre aux profs) Horaire du cours : 9h00 - 12h30
2 / 89
Déroulement du cours TA01 - Introduction MPI
Où trouver les planches et autre matériel du cours ? Sur la machine GIN dans le répertoire partagé /share/apps/TA01/ On y trouve quoi ? • Un document aide-mémoire sur l’interface de programmation MPI (C et
Fortran): mpi_aide_memoire_F90.pdf et mpi_aide_memoire_C.pdf • les planches sur HPC et MPI dans slides • des exemples de code en fortran dans codeMPI • de la documentation supplémentaire sur fortran dans doc
On se connecte comment sur GIN ? • login étudiant: a11gr[1-35] • mot de passe donné lors de la première séance • Exemple de connection depuis une machine de la salle de TP: ssh -X [email protected] 1
1 Remplacer a11gr1 par le nom d’utilisateur qui vous est assigné en salle de TP. 3 / 89
Recommended reading on MPI / Parallel Programming
MPI standard: http://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/mpi31-report.htm
books: • Parallel Programming - for multicore and cluster systems by T.
Rauber and G. Rünger, Springer, 2010 •
Multicore Application Programming - For Windows, Linux and Oracle Solaris by Darryl Gove, Addison-Wesley, 2010 • An Introduction to Parallel Programming by Peter Pacheco, Morgan-Kaufmann, 2011
on-line: • Cours MPI de l’IDRIS • Jeff Squyres’s blogs on MPI and HPC • Parallel computing tutorial at LLNL
4 / 89
Recommended reading on Linux environment
Aide mémoire Linux / bash : • Learn/improve your skill on Linux’s command line/Bash
e.g. http://swcarpentry.github.io/shell-novice/ • •
http://www.tldp.org/LDP/abs/html/ http://www.epons.org/commandes-base-linux.php
Améliorer ses compétences: Linux-101-Hacks.pdf, by Ramesh Natarajan Ne JAMAIS hésiter à lire la page de manuel en ligne d’une commande inconnue, e.g. :
man scp
5 / 89
Recommended reading on HPC in general
Good idea to check / read on a regular basis websites like: • subscribe blog/news letters on HPC; e.g.
http://www.admin-magazine.com/HPC/Articles • (En français) HPC Today http://www.hpcmagazine.fr/
des infos actualités sur le software, hardware, ... • (En anglais) Intel Parallel Universe Magazine
http://software.intel.com/en-us/intel-parallel-universe-magazin (attention, parfois un peu biaisé, à lire avec discernement) • Le séminaire de la Modélisation de la Maison de la Simulation.
6 / 89
Other general recommendations ... ... to a software developper for scientific applications Learn/improve your skill on Linux’s command line/Bash e.g. http://swcarpentry.github.io/shell-novice/, http://www.tldp.org/LDP/abs/html/,
http://www.epons.org/commandes-base-linux.php Learn GIT ! • Get yourself a Github or Bitbucket account • Read/Watch a tutorial to get started, e.g.
https://www.grafikart.fr/formations/git Learn a text editor like VIM or EMACS (at advanced level, i.e. learn keyboard short-cuts) Learn python (data analysis, visualization tools, ...) Learn C++11, follow recent evolution to introduce parallelism at core language Have some good knowledge of hardware and the linux operating system Never stop learning... Use multiple sources, multiple points of view... 7 / 89
A few links about python for scientific computing ...
Learn to use Jupyter for running python notebooks inside a web browser
https://github.com/barbagroup/CFDPython https://github.com/ipython-books/minibook-2nd-code Two very good books about IPython by Cyrille Rossant: •
http://cyrille.rossant.net/books
http://bender.astro.sunysb.edu/classes/python-science/
8 / 89
A few links about C++
A recently published book: Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers, and companion github website Some presentations made at CppCon (C++ annual conference): state of the art of C++ language List of Lists of C++ related resources: • https://github.com/fffaraz/awesome-cpp •
https://github.com/fffaraz/awesome-cpp/blob/master/books.md
What should I do (among others things) to improve my C++ skills ? Read code written by others is very good. Google C++ style guide, a must read
9 / 89
A few links about C++ - Advanced
Books by Herb Sutter: C++ coding standards, Exceptional C++, More exceptional C++; these books are quite old (
Le calcul scientifique est une discipline aux contours pas toujours franchement d´efinis, mais qui regroupe un ensemble de champs math´ematiques et informatiques permettant la simulation num´erique des ph´enom`enes de la physique, chimie, biologie, et sciences appliqu´ees en g´en´eral. MINOTICIEROMATINAL.COM Online Source For Free Ebook and Pdf Downloads Calcul Scientifique Parallele 2e Ed Cours Exemples Avec Openmp Et Mpi Exercices Corriges Frederic Magoules Francois Xavier.