1 / 15

Programming on Cluster Platform

Programming on Cluster Platform. Recall the Parallel Programming Environment Installed on Cluster. Cluster Parallel Programming Environment – MPI Package. MPI – Message Passing Interface (Provide a standard for interprocessor communication in a parallel environment)

briana
Télécharger la présentation

Programming on Cluster Platform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming on Cluster Platform

  2. Recall the Parallel Programming Environment Installed on Cluster

  3. Cluster Parallel Programming Environment – MPI Package • MPI – Message Passing Interface (Provide a standard for interprocessor communication in a parallel environment) • Several vendors have implmented MPI packages, such as • MPICH2 (is one of the most popular implmentations of MPI. It serves as the foundation for many other indsutry implmentations, such as Cray MPI, IBM MPI, Intel MPI, MS MPI). • OpenMPI (Open Souorce MPI-2 implementaiton that is developed and maintained by a consortium of academic, research, and industry partners)

  4. MPI Programming Copy from https://computing.llnl.gov/tutorials/mpi/

  5. The first example Example copied with minor modification from http://geco.mines.edu/workshop/class2/examples/mpi/index.html

  6. MPI_Init(&argc,&argv); • Initializes the MPI execution environment. • MPI_Finalize(); • Terminates the MPI execution environment.

  7. MPI_Comm_size(MPI_COMM_WORLD,&numprocs); • set the total number of MPI processes in the specified communicator in the second parameter. • MPI communicator • Specify a group of processes that participate in the communication. • MPI_COMM_WORLD • The default communicator that include all processes initialized by mpirun

  8. The second example Example copied with minor modification from http://geco.mines.edu/workshop/class2/examples/mpi/index.html

  9. MPI_Send(&buffer,count,MPI_INT,destination,tag,MPI_COMM_WORLD);MPI_Send(&buffer,count,MPI_INT,destination,tag,MPI_COMM_WORLD); • MPI_Recv(&buffer,count,MPI_INT,source,tag,MPI_COMM_WORLD,&status);

  10. The third example Example copied with minor modification from http://geco.mines.edu/workshop/class2/examples/mpi/index.html

  11. MPI_Bcast(buffer,count,MPI_INT,source,MPI_COMM_WORLD);

  12. The fourth program Example copied with minor modification from http://geco.mines.edu/workshop/class2/examples/mpi/index.html

  13. Information copied from https://computing.llnl.gov/tutorials/mpi/

  14. The fifth program

More Related