香港浸会大学:MPI - Communicators(PPT讲稿)

Communicators
Communicators

Introduction So far, the communicator that you are familiar with is MPI COMM WORLD This is a communicator defined by MPI to permit all processes of your program to communicate with each other at run time, either between two processes( point to-point )or among all processes( collective For some applications however, communications among a selected subgroup of processes may be desirable or required In this section, you will learn how to create new communicators for these situations
Introduction • So far, the communicator that you are familiar with is MPI_COMM_WORLD. • This is a communicator defined by MPI to permit all processes of your program to communicate with each other at run time, either between two processes ( pointto-point ) or among all processes ( collective ). • For some applications however, communications among a selected subgroup of processes may be desirable or required. • In this section, you will learn how to create new communicators for these situations

Introduction Two types of communicators exist within MPI Intra-communicators Inter -communicators This chapter will focus on intra- communicators that deal with communications among processes within individual communicators Inter-communicators on the other hand deal with communications t between intra-communicators Essentially intra-communicators are subsets of processes of MPI COMM WORLD The need for these new communicators is often driven by the need to deal subblock f a mat These communicators are often used in conjunction with a virtual topology more often than not a Cartesian topology -to facilitate implementation of parallel operations Furthermore, the use of communicators, and quite frequently together with virtual topology, generally enhances the readability and maintainability of a program
Introduction • Two types of communicators exist within MPI: – Intra-communicators – Inter-communicators. • This chapter will focus on intra-communicators that deal with communications among processes within individual communicators. • Inter-communicators, on the other hand, deal with communications between intra-communicators. • Essentially, intra-communicators are subsets of processes of MPI_COMM_WORLD. • The need for these new communicators is often driven by the need to deal with, for instance, rows, columns or subblocks of a matrix. • These communicators are often used in conjunction with a virtual topology - - more often than not a Cartesian topology -- to facilitate implementation of parallel operations. • Furthermore, the use of communicators, and quite frequently together with virtual topology, generally enhances the readability and maintainability of a program

Introduction To this end, many routines are available in the mPi librar to perform various communication-related tasks. These are MPI COMM GROUP MPI GROUP NCL MPI GROUP EXCL MPI GROUP RANK MPI GROUP FREE MPI COMM CREATE MPI COMM SPLIT These routines are described in the following sections
Introduction • To this end, many routines are available in the MPI library to perform various communication-related tasks. These are – MPI_COMM_GROUP – MPI_GROUP_INCL – MPI_GROUP_EXCL – MPI_GROUP_RANK – MPI_GROUP_FREE – MPI_COMM_CREATE – MPI_COMM_SPLIT • These routines are described in the following sections

MPI COMM GROUP
MPI_COMM_GROUP

MPI COMM GROUP Definition of mPl comm group Used to return the group underlying the communicator,; you get a handle to the group of comm The MPl COMM GROUP routine determines the group handle of a communicator int MPl Comm group( MPl Comm comm, MPI Group * group The function returns an int error flag Variable Name C Type In/Out Description comm MPI Comm Input Communicator handle group MPL_Group* Output Group handle
MPI_COMM_GROUP • Definition of MPI_COMM_GROUP – Used to return the group underlying the communicator; you get a handle to the group of comm. • The MPI_COMM_GROUP routine determines the group handle of a communicator. int MPI_Comm_group( MPI_Comm comm, MPI_Group *group ) • The function returns an int error flag. Variable Name C Type In/Out Description comm MPI_Comm Input Communicator handle group MPI_Group * Output Group handle

MPI COMM GROUP EXample Include " mpi.h MPI Comm comm world MPI Group group world comm world MPI COMM WORLD MPI Comm group(comm world, &group world)
MPI_COMM_GROUP • Example #include "mpi.h" MPI_Comm comm_world; MPI_Group group_world; comm_world = MPI_COMM_WORLD; MPI_Comm_group(comm_world, &group_world);

MPI COMM GROUP Definition of mel comm world Default communicator consisting of all processes Definition of mel group incl Used to form a new group from the processes belonging to group within specified ranks Definition of mpl comm create Used to create a new intracommunicator from the processes listed in new group Definition of mpl group rank Used to return the rank of the calling process in group
MPI_COMM_GROUP • Definition of MPI_COMM_WORLD – Default communicator consisting of all processes. • Definition of MPI_GROUP_INCL – Used to form a new group from the processes belonging to group within specified ranks. • Definition of MPI_COMM_CREATE – Used to create a new intracommunicator from the processes listed in new_group. • Definition of MPI_GROUP_RANK – Used to return the rank of the calling process in group

MPI COMM GROUP Associated with a communicator is its group identity, or handle. In the above example, we used MPI COMM GROUP to obtain the group handle of the communicator mpi comm world. this handle can then be used as input to the routine MPl GROUP INCL to select among the processes of one group to form another(new) group MPI COMM CREaTE to create a new communicator whose members are those of the new group MPI GROUP RANK to find the current process rank's equivalent process rank in a group
MPI_COMM_GROUP • Associated with a communicator is its group identity, or handle. In the above example, we used MPI_COMM_GROUP to obtain the group handle of the communicator MPI_COMM_WORLD. This handle can then be used as input to the routine – MPI_GROUP_INCL to select among the processes of one group to form another (new) group; – MPI_COMM_CREATE to create a new communicator whose members are those of the new group; – MPI_GROUP_RANK to find the current process rank's equivalent process rank in a group

MPI GROUP NCL
MPI_GROUP_INCL
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《单片机应用系统设计技术》课程教学资源(PPT课件讲稿)第7章 单片机外部扩展资源及应用.ppt
- 北京航空航天大学:《数据挖掘——概念和技术(Data Mining - Concepts and Techniques)》课程教学资源(PPT课件讲稿)Chapter 01 Introduction.ppt
- 《单片机原理及应用》课程教学资源(PPT课件讲稿)第14章 单片机应用系统抗干扰与可靠性设计.ppt
- 河南中医药大学(河南中医学院):《计算机文化》课程教学资源(PPT课件讲稿)第七章 数据库技术(主讲:王哲).pptx
- 三维计算机视觉 3D computer vision(基于卡尔曼滤波的运动结构).pptx
- 《计算机网络与因特网》课程教学资源(PPT课件)Part VII 广域网(简称WAN), 路由, 和最短路径.ppt
- The Art of Function Design -Measure and RKHS.ppt
- 大庆职业学院:《计算机网络技术基础》课程教学资源(PPT课件讲稿)第2章 数据通信的基础知识.ppt
- 香港浸会大学:C++ as a Better C; Introducing Object Technology.ppt
- 清华大学:《高级计算机网络 Advanced Computer Network》课程教学资源(PPT课件讲稿)Lecture 1 Introduction.pptx
- 《TCP/IP协议及其应用》课程教学资源(PPT课件)第1章 TCP/IP协议基础.ppt
- 香港理工大学:Artificial Neural Networks for Data Mining.ppt
- 安徽理工大学:《Linux开发基础 Development Foundation on Linux OS》课程资源(PPT课件讲稿)Section 4 Perl programming(赵宝).ppt
- 《网上开店实务》课程教学资源(PPT讲稿)学习情境1 网上开店创业策划.ppt
- 东南大学:《C++语言程序设计》课程教学资源(PPT课件讲稿)Chapter 10 Classes A Deeper Look(Part 2).ppt
- 广西医科大学:《计算机网络 Computer Networking》课程教学资源(PPT课件讲稿)Chapter 01 Introduction overview.pptx
- 《网络搜索和挖掘关键技术 Web Search and Mining》课程教学资源(PPT讲稿)Lecture 11 Probabilistic Information Retrieval.ppt
- 山东大学:《人机交互技术》课程教学资源(PPT课件讲稿)第3章 交互设备 3.5 显示设备 3.6 语音交互设备 3.7虚拟现实系统中的交互设备.ppt
- 东北大学:《可信计算基础》课程教学资源(PPT课件讲稿)第6章 TPM核心功能(主讲:周福才).pptx
- 媒体服务(PPT课件讲稿)Media Services.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第九章 无线网络.ppt
- 中国铁道出版社:《局域网技术与组网工程》课程教学资源(PPT课件讲稿)第2章 网络工程系统.ppt
- 自动语音识别(PPT讲稿)Automatic Speaker Recognition.pptx
- 南京大学:《编译原理》课程教学资源(PPT课件讲稿)第三章 词法分析.pptx
- 上海交通大学:人工智能的历史和启示——人机对弈作为案例.ppt
- 《计算机网络》课程教学资源(PPT课件讲稿)第三章 局域网与校园网设计(网络方案设计).ppt
- 广西外国语学院:《计算机网络》课程教学资源(PPT课件讲稿)第10章 应用层协议.ppt
- 《单片机原理及应用》课程教学资源_本科教学大纲汇编(电子信息工程专业).doc
- 上海交通大学:网络安全 Network Security(PPT讲稿,朱浩瑾).pptx
- 清华大学:Top-k String Similarity Search with Edit-Distance Constraints.pptx
- 普林斯顿大学:平衡查找树(PPT讲稿)New Balanced Search Trees.pptx
- 《MATLAB程序设计》课程教学资源(教学大纲)Matlab programming.doc
- 计算机硬件维护(PPT课件讲稿).ppt
- 南京大学:移动Agent系统支撑(PPT讲稿)Agent Mobility Software Agent.pptx
- 《程序设计语言》课程教学资源(PPT课件讲稿)第5章 函数式程序设计语言.ppt
- 《C++程序设计》教学资源(PPT课件讲稿)构造函数和析构函数.ppt
- 《计算机应用基础》工学结合配套课件(PPT讲稿)模块二系统软件操作技术(Windows XP的实用工具).ppt
- 河南中医药大学:《网络技术实训》课程教学资源(PPT课件讲稿)第7讲 网络安全实训(主讲:许成刚).pptx
- 《电子商务实用教程》课程教学资源(PPT课件讲稿)第三章 网络营销.ppt
- 广西医科大学:《计算机网络 Computer Networking》课程教学资源(PPT课件讲稿)Chapter 03 Network Management and Operation(Network Architetures and Standarts).pptx