Διάλεξη 12
Θέματα
- Παράλληλος προγραμματισμός με τη χρήση της βιβλιοθήκης MPI
- Αριθμητική επίλυση της Εξίσωσης Laplace για το Ηλεκτροστατικό Πεδίο.
- Αριθμητική επίλυση της Εξίσωσης (Θερμο)διάχυσης.
Βιλιογραφία
- Parallel Computation, σημειώσεις διδάσκοντα.
- Διαφάνειες 1ου μαθήματος.
- Διαφάνειες 2ου μαθήματος.
- Εξίσωση Laplace, διάλεξη Υπολογιστικής Φυσικής Ι.
- Βιβλίο διδάσκοντα: Κεφάλαια 7 και 8.
- Using MPI, Portable Parallel Programming with the MPI Interface, 3rd Edition, W. Gropp, E. Lust, A. Skjellum
Εξάσκηση
Τα σχόλια στα αρχεία πηγαίου κώδικα περιέχουν οδηγίες μεταγλώττισης.
Κατεβάστε τα παρακάτω αρχεία:
- mpi.tgz με τα σχετικά προγράμματα των μαθημάτων.
- mpi_01_hello.f90: Initializing and finalizing an MPI program.
- mpi_01_hello.c: The basic C-interface.
- mpi_02_SendAndRecv.f90: MPI_Send and MPI_Recv.
- mpi_02_Sendrecv.f90: MPI_Sendrcv.
- mpi_04_Bcast.f90: MPI_Bcast.
- mpi_05_Scatter.f90: MPI_Scatter.
- mpi_06_Gather.f90: MPI_Gather.
- mpi_07_Allgather.f90: MPI_Allgather.
- mpi_08_Reduce.f90: MPI_Reduce.
- mpi_09_Allreduce.f90: MPI_Allreduce.
- laplace.f90: Parallel implementation of the Jacobi method for solving Laplace's equation in 2D.
- laplace-vanilla.f90: Serial implementation of the Gauss-Seidel method for solving Laplace's equation in 2D.
- heatConduction.f90: Parallel implementation of the 1D heat conduction equation.
- heatConduction-vanilla.f90: Serial implementation of the 1D heat conduction equation.
- pdiffusion.f90: Parallel implementation of the 1D diffusion equation.
- diffusion.f90: Serial implementation of the 1D diffusion equation.
Το απαραίτητο λογισμικό (CAF libraries, ScaLAPACK, LAPACK) μπορεί να εγκατασταθεί σε Ubuntu με τις εντολές:
sudo apt install gfortran liblapack3 liblapack-doc liblapack-dev libblas-devsudo apt install openmpi-bin libopenmpi-dev openmpi-docsudo apt install libcoarrays-openmpi-devsudo apt install libscalapack-mpi-dev scalapack-docsudo apt install scalapack-mpi-test blacs-mpi-test
