论文部分内容阅读
本文介绍了二维/三维克希霍夫时间偏移计算在GPU集群上的MPI/CUDA混合编程实现。系统的主体结构基于经典的主从模式,采用MPI进程-pthread线程-CUDA线程三个层次的并行架构,以及CPU/GPU协同计算并行架构和策略来设计实现。每个计算节点由一个多核CPU和多个GPU设备组成。输入数据在主节点上载入,平均分配到从节点上,存储到相应的磁盘空间内,并根据各节点的可用资源将数据划分为多块。每个从节点分别接收主节点发送的数据并存储到本地磁盘上的临时文件内。根据检测到的可用GPU设备数,每个从节点上创建同样数目的线程来一对一控制各个GPU。各从节点上每个数据块再进一步划分为大小相等的块一一分配给各个线程,由每个线程逐道在CPU上预处理后传送到GPU上处理,道内的各成像点分别由各CUDA线程并行处理。每个数据块偏移由每个线程内的相关道累加计算而得,结果返回到主节点上累加后输出到磁盘文件内。在实现过程中,采用CPU/GPU协同计算以及线性插值走时的方式来进一步提高性能。系统性能在一典型异构GPU集群上测试,每个节点由一个配置8GB内存的四核CPU,以及配置6GB显存的C1060型号的GPU组成。对于不同的规模和积分计算模式,在该平台上的测试结果表明,本文实现的系统的性能对于包含相同计算节点数、每个节点上4个线程并行计算的MPI版本,可以达到平均约5~10倍的加速。
This article presents a two-dimensional / three-dimensional Kirchhoff time offset calculation on the GPU cluster MPI / CUDA hybrid programming. The main structure of the system is based on the classical master-slave mode, which is designed and implemented by the parallel architecture of three levels of MPI process-pthread thread-CUDA thread, and the CPU / GPU collaborative computing parallel architecture and strategy. Each compute node consists of a multi-core CPU and multiple GPU devices. The input data is loaded on the master node, equally distributed to the slave nodes, stored in the corresponding disk space, and divided into pieces according to the available resources of each node. Each slave node receives the data sent by the master and stored in a temporary file on the local disk. Depending on the number of available GPU devices detected, the same number of threads is created on each slave node to control each GPU on a one-to-one basis. Each data block from each node is further divided into equal-sized blocks one by one assigned to each thread, pre-processed by each thread on the CPU and then sent to the GPU for processing, and each imaging point in the lane is composed of CUDA Thread parallel processing. Each data block offset accumulated by the relevant road within each thread calculated from the results returned to the main node on the cumulative output to the disk file. In the implementation process, CPU / GPU collaborative computing and linear interpolation travel time way to further improve performance. System performance was tested on a typical heterogeneous GPU cluster with each node consisting of a quad-core CPU with 8GB of memory and a C1060 model with 6GB of video memory. For different scale and integral calculation modes, the test results on this platform show that the performance of the system achieved in this paper can reach an average of about 5 ~ 10% for the MPI version containing 4 threads on each node with the same number of nodes. 10 times faster.