首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
MPI for Python     
MPI for Python provides bindings of the Message Passing Interface (MPI) standard for the Python programming language and allows any Python program to exploit multiple processors. This package is constructed on top of the MPI-1 specification and defines an object-oriented interface which closely follows MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of general Python objects. Efficiency has been tested in a Beowulf class cluster and satisfying results were obtained. MPI for Python is open source and available for download on the web (http://www.cimec.org.ar/python).  相似文献   

2.
Scientific computing is usually associated with compiled languages for maximum efficiency. However, in a typical application program, only a small part of the code is time-critical and requires the efficiency of a compiled language. It is often advantageous to use interpreted high-level languages for the remaining tasks, adopting a mixed-language approach. This will be demonstrated for Python, an interpreted object-oriented high-level language that is well suited for scientific computing. Particular attention is paid to high-level parallel programming using Python and the BSP model. We explain the basics of BSP and how it differs from other parallel programming tools like MPI. Thereafter we present an application of Python and BSP for solving a partial differential equation from computational science, utilizing high-level design of libraries and mixed-language (Python–C or Python–Fortran) programming.  相似文献   

3.
We present a new version of the numerical differentiation library (NDL) used for the numerical estimation of first and second order partial derivatives of a function by finite differencing. In this version we have restructured the serial implementation of the code so as to achieve optimal task-based parallelization. The pure shared-memory parallelization of the library has been based on the lightweight OpenMP tasking model allowing for the full extraction of the available parallelism and efficient scheduling of multiple concurrent library calls. On multicore clusters, parallelism is exploited by means of TORC, an MPI-based multi-threaded tasking library. The new MPI implementation of NDL provides optimal performance in terms of function calls and, furthermore, supports asynchronous execution of multiple library calls within legacy MPI programs. In addition, a Python interface has been implemented for all cases, exporting the functionality of our library to sequential Python codes.  相似文献   

4.
Python由于具有丰富的第三方库、开发高效等优点,已成为数据科学、智能科学等应用领域最流行的编程语言之一。Python强调了对科学与工程计算的支持,目前已积累了丰富的科学与工程计算库和工具。例如,SciPy和NumPy等数学库提供了高效的多维数组操作及丰富的数值计算功能。以往,Python主要作为脚本语言,起到连接数值模拟前处理、求解器和后处理的“胶水”功能,以提升数值模拟的自动化处理水平。近年来,国外已有学者尝试采用Python代码实现求解计算功能,并在高性能计算机上开展了超大规模并行计算研究,取得了不错的效果。由于自身特点,高效大规模Python数值模拟的实现和性能优化与传统基于C/C++和Fortran的数值模拟等具有很大的不同。文中实现了国际上首个完全基于Python的大规模并行三维格子玻尔兹曼多相流模拟代码PyLBMFlow,探索了Python大规模高性能计算和性能优化方法。首先,利用NumPy多维数组和通用函数设计实现了LBM流场数据结构和典型计算内核,通过一系列性能优化并对LBM边界处理算法进行重构,大幅提升了Python的计算效率,相对于基准实现,优化后的串行性能提升了两个量级。在此基础上,采用三维流场区域分解方法,基于mpi4py和Cython实现了MPI+OpenMP混合并行;在天河二号超级计算机上成功模拟了基于D3Q19离散方法和Shan-Chen BGK碰撞模型的气液两相流,算例规模达百亿网格,并行规模达1024个结点,并行效率超过90%。  相似文献   

5.
MapReduce in MPI for Large-scale graph algorithms   总被引:1,自引:0,他引:1  
  相似文献   

6.
7.
一种基于Python的红外图像分析软件结构   总被引:2,自引:0,他引:2  
作为一种纯面向对象的动态脚本语言,Python已经在网络应用软件、系统配置软件及科学研究领域获得了广泛的使用,但它在桌面应用软件开发中并未引起足够的重视.介绍了一种基于Python的桌面应用软件结构,利用Windows平台下Python与C/C 语言的两种API接口,实现了Python与VC的混合语言编程,并将这种软件结构成功地应用于一套商业红外图像分析软件.实际应用表明,这种结构可以充分发挥Python编程灵活简单和VC执行效率高的优点,克服Python执行效率低和VC开发效率低的缺点,实现了软件开发效率和执行效率的双赢.  相似文献   

8.
基于Python的混合语言编程及其实现   总被引:10,自引:2,他引:10  
Python是一种被广泛使用的脚本语言,它特别适用于混合语言编程的软件开发。本文介绍了Python语言的特点,给出了混合运用Python语言和系统编程语言开发的软件结构,并在此基础上开发了一个类似Logo语言的交互式绘图应用。  相似文献   

9.
MPI(Message Passing Interface)是消息传递并行程序设计的标准之一,概述了MPI的概念和组成,着重介绍了支持并行程序设计的消息传递接口(MPI)以及在MPI环境下的并行程序设计方法,并给出一个MPI并行程序设计实例,说明了MPI的程序设计流程和普通串行程序设计之间的关联。  相似文献   

10.
We present a Python extension to the massively parallel HPC simulation toolkit waLBerla. waLBerla is a framework for stencil based algorithms operating on block-structured grids, with the main application field being fluid simulations in complex geometries using the lattice Boltzmann method. Careful performance engineering results in excellent node performance and good scalability to over 400,000 cores. To increase the usability and flexibility of the framework, a Python interface was developed. Python extensions are used at all stages of the simulation pipeline: they simplify and automate scenario setup, evaluation, and plotting. We show how our Python interface outperforms the existing text-file-based configuration mechanism, providing features like automatic nondimensionalization of physical quantities and handling of complex parameter dependencies. Furthermore, Python is used to process and evaluate results while the simulation is running, leading to smaller output files and the possibility to adjust parameters dependent on the current simulation state. C++ data structures are exported such that a seamless interfacing to other numerical Python libraries is possible. The expressive power of Python and the performance of C++ make development of efficient code with low time effort possible.  相似文献   

11.
In this paper, we describe our experience in grammar engineering to construct multiple parsers and front ends for the Python language. We present a metrics-based study of the evolution of the Python grammars through the multiple versions of the language in an effort to distinguish and measure grammar evolution and to provide a basis of comparison with related research in grammar engineering. To conduct this research, we have built a toolkit, pygrat , which builds on tools developed in other research. We use pygrat to build a system that automates much of the process needed to translate the Python grammars from EBNF to a formalism acceptable to the bison parser generator. We exploit the suite of Python test cases, used by the Python developers, to validate our parser generation. Finally, we describe our use of the menhir parser generator to facilitate the parser and front-end construction, eliminating some of the transformations and providing practical support for grammar modularisation.  相似文献   

12.
本文介绍了支持网络并行计算的并行开发平台MPI,并讨论了MPI在其支撑技术一消息传递上所估的改进与补充,表明MPI支持面向平观网络并计计算的并行库的开发,文章最后介绍了作者以MPI为开发平台研制并行库的工作。  相似文献   

13.
MPI is commonly used to write parallel programs for distributed memory parallel computers. MPI‐CHECK is a tool developed to aid in the debugging of MPI programs that are written in free or fixed format Fortran 90 and Fortran 77. MPI‐CHECK provides automatic compile‐time and run‐time checking of MPI programs. MPI‐CHECK automatically detects the following problems in the use of MPI routines: (i) mismatch in argument type, kind, rank or number; (ii) messages which exceed the bounds of the source/destination array; (iii) negative message lengths; (iv) illegal MPI calls before MPI_INIT or after MPI_FINALIZE; (v) inconsistencies between the declared type of a message and its associated DATATYPE argument; and (vi) actual arguments which violate the INTENT attribute. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

14.
SMP机群混合编程模型研究   总被引:12,自引:0,他引:12  
研究了适用于 SMP机群的混合编程模型 ,并把它划分为 Open MP MPI和 Thread MPI两类 .通过研究指出 ,Open MP MPI优于 Thread MPI.在此基础上 ,重点研究了 Open MP MPI的实现机制、粗粒度和细粒度并行化方法、循环选择、优化措施以及注意事项等 ,得出细粒度并行化的 Open MP MPI是 SMP机群编程模型的一个较好选择的结论  相似文献   

15.
PC机群上JIAJIA与MPI的比较   总被引:3,自引:2,他引:3       下载免费PDF全文
对JIAJIA和MPI (message passing interface)是进行了比较.JIAJIA和MPI分别代表共享存储和消息传递的编程模式.MPI显式进行数据传输,编程复杂;JIAJIA由底层维护数据一致性,并附加提供简单的消息传递函数,编程容易、灵活.JIAJIA分配共享内存时开销较大,初始化时间比MPI长.提出了一个关于并行加速比与进程数目之间关系的近似经验公式,推出JIAJIA和MPI性能差距随着进程数目的增多而增大的结论.测试结果表明,大部分应用程序的JIAJIA和MPI版本的并行性能差距不超过10%.对于通信量很小的应用程序,其JIAJIA和MPI的性能差距较小,而通信量本身较大的应用程序,其JIAJIA和MPI的性能差距主要取决于运行时产生的实际通信量.  相似文献   

16.
MPI提供了并行计算的一种消息传递接口。本文简述了MPI的关键技术,介绍了MPI的编程要点和思路,然后以经典问题LifeGame为例讨论了MPI程序的具体实现,最后给出了该程序的性能分析。  相似文献   

17.
The IBM RS/6000 SP system is one of the most cost-effective commercially available high performance machines. IBM RS/6000 SP systems support the Message Passing Interface standard (MPI) and LAPI. LAPI is a low level, reliable and efficient one-sided communication API library implemented on IBM RS/6000 SP systems. This paper explains how the high performance of the LAPI library has been exploited in order to implement the MPI standard more efficiently than the existing MPI. It describes how to avoid unnecessary data copies at both the sending and receiving sides for such an implementation. The resolution of problems arising from the mismatches between the requirements of the MPI standard and the features of LAPI is discussed. As a result of this exercise, certain enhancements to LAPI are identified to enable an efficient implementation of MPI on LAPI. The performance of the new implementation of MPI is compared with that of the underlying LAPI itself. The latency (in polling and interrupt modes) and bandwidth of our new implementation is compared with that of the native MPI implementation on RS/6000 SP systems. The results indicate that the MPI implementation on LAPI performs comparably to or better than the original MPI implementation in most cases. Improvements of up to 17.3 percent in polling mode latency, 35.8 percent in interrupt mode latency, and 20.9 percent in bandwidth are obtained for certain message sizes. The implementation of MPI on top of LAPI also outperforms the native MPI implementation for the NAS Parallel Benchmarks  相似文献   

18.
并行程序设计环境的研究   总被引:1,自引:0,他引:1  
MPI(MessagePassingInterface)是目前一种比较著名的应用于并行环境的消息传递标准。MPICH是MPI1.2标准的一个完全实现,也是应用范围最广的一种并行及分布式环境。MPICH除包含MPI函数库之外,还包含了一套程序设计以及运行环境。本文将简要介绍如何应用MPICH的Windows版本,建立一个基于Windows的并行程序设计及运行环境。  相似文献   

19.
The Message Passing Interface (MPI) 3.0 standard includes a significant revision to MPI's remote memory access (RMA) interface, which provides support for one‐sided communication. MPI‐3 RMA is expected to greatly enhance the usability and performance of MPI RMA. We present the first complete implementation of MPI‐3 RMA and document implementation techniques and performance optimization opportunities enabled by the new interface. Our implementation targets messaging‐based networks and is publicly available in the latest release of the MPICH MPI implementation. Using this implementation, we explore the performance impact of new MPI‐3 functionality and semantics. Results indicate that the MPI‐3 RMA interface provides significant advantages over the MPI‐2 interface by enabling increased communication concurrency through relaxed semantics in the interface and additional routines that provide new window types, synchronization modes, and atomic operations. Copyright © 2016 John Wiley & Sons, Ltd.  相似文献   

20.
Python became the preferred language for teaching in academia, and it is one of the most popular programming languages for scientific computing. This wide popularity occurs despite the weak performance of the language. This weakness is the motivation that drives the efforts devoted by the Python community to improve the performance of the language. In this article, we are following these efforts while we focus on one specific promised solution that aims to provide high-performance and performance portability for Python applications.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号