Message-PassingProgramming幻灯片.pptVIP

  • 6
  • 0
  • 约6.64千字
  • 约 51页
  • 2018-02-22 发布于天津
  • 举报
Running MPI Programs mpirun -np p exec arg1 … -np p ? number of processes exec ? executable arg1 … ? command-line arguments Specifying Host Processors File .mpi-machines in home directory lists host processors in order of their use Example .mpi_machines file contents band01.cs.ppu.edu band02.cs.ppu.edu band03.cs.ppu.edu band04.cs.ppu.edu Enabling Remote Logins MPI needs to be able to initiate processes on other processors without supplying a password Each processor in group must list all other processors in its .rhosts file; e.g., band01.cs.ppu.edu student band02.cs.ppu.edu student band03.cs.ppu.edu student band04.cs.ppu.edu student Execution on 1 CPU % mpirun -np 1 sat 0) 1010111110011001 0) 0110111110011001 0) 1110111110011001 0) 1010111111011001 0) 0110111111011001 0) 1110111111011001 0) 1010111110111001 0) 0110111110111001 0) 1110111110111001 Process 0 is done Execution on 2 CPUs % mpirun -np 2 sat 0) 0110111110011001 0) 0110111111011001 0) 0110111110111001 1) 1010111110011001 1) 1110111110011001 1) 1010111111011001 1) 1110111111011001 1) 1010111110111001 1) 1110111110111001 Process 0 is done Process 1 is done Execution on 3 CPUs % mpirun -np 3 sat 0) 0110111110011001 0) 1110111111011001 2) 1010111110011001 1) 1110111110011001 1) 1010111111011001 1) 0110111110111001 0) 1010111110111001 2) 0110111111011001 2) 1110111110111001 Process 1 is done Process 2 is done Process 0 is done Copyright ? The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Copyright ? The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn Chapter 4 Message-Passing Programming Learning Objectives Understanding how MPI programs execute Familiarity with fundamental MPI functions Outline Message-passing model Message Passing Interface (MPI) Coding MPI programs Compiling MPI programs Running MPI programs Benchmarking MPI programs Message-passing Model Task/Channel vs. Message-pas

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档