combiningmpiandopenmp(编辑修改稿)内容摘要:

eads Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Results of Benchmarking Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Analysis of Results  C+MPI+OpenMP program slower on 2, 4 CPUs because C+MPI+OpenMP threads are sharing memory bandwidth, while C+MPI processes are not  C+MPI+OpenMP programs faster on 6, 8 CPUs because they have lower munication cost Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Case Study: Jacobi Method  Begin with C+MPI program that uses Jacobi method to solve steady state heat distribution problem of Chapter 13  Program based on rowwise block striped deposition of twodimensional matrix containing finite difference mesh Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Methodology  Profile execution of C+MPI program  Focus on adding OpenMP directives to most puteintensive function Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Result of Profiling Function 1 CPU 8 CPUs initialize_mesh % % find_steady_state % % print_solution % % Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Function find_steady_state (1/2) its = 0。 for (。 ) { if (id 0) MPI_Send (u[1], N, MPI_DOUBLE, id1, 0, MPI_COMM_WORLD)。 if (id p1) { MPI_Send (u[my_rows2], N, MPI_DOUBLE, id+1, 0, MPI_COMM_WORLD)。 MPI_Recv (u[my_rows1], N, MPI_DOUBLE, id+1, 0, MPI_COMM_WORLD, amp。 status)。 } if (id 0) MPI_Recv (u[0], N, MPI_DOUBLE, id1, 0, MPI_COMM_WORLD, amp。 status)。 Copy。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。