A novel parallel patterns library, Groovy Parallel Patterns, is presented which, from the outset, has been designed to exploit more general process parallelism than the usual data and task parallel architectures. The library executes on a standard Java Virtual Machine. The library provides a collection of processes that can be plugged together to form a variety of parallel architectures and is intrinsically its own DSL. A network of processes is guaranteed to be deadlock and livelock free and terminate correctly and this is proved by the use of formal methods. Error capture and a basic logging mechanism have been incorporated. The library enables effective refinement of solutions between process networks which can be checked also using formal methods. A library user is only required to create the required methods as pieces of sequential code, typically taken from extant sequential solutions, which can then be invoked by the processes as required. The utility of the library is demonstrated by several examples including; Monte Carlo Methods, Concordance, Jacobi solutions, N-body problems and Mandelbrot, which is implemented on both a multicore processor and a workstation cluster. The examples are analysed for speedup and efficiency, which show good and consistent performance improvement up to the number of available processor cores and workstations.
翻译:新颖的平行模式库Groovy平行模式(Groovy平行模式)从一开始就被展示,它的设计是利用比通常的数据和任务平行结构更普遍的平行程序。图书馆用标准 Java 虚拟机执行。图书馆提供一系列程序,这些程序可以连接在一起,形成各种平行结构,并且是其本身的DSL。一个流程网络保证是僵局和活锁自由,并正确终止,这通过使用正式方法得到证明。错误捕捉和基本记录机制已经纳入。图书馆能够有效地改进进程网络之间的解决办法,这些办法也可以使用正式方法加以检查。图书馆用户只需创建所需的方法,作为顺序代码的碎片,通常取自留置的顺序解决方案,然后根据需要被进程引用。图书馆的有用性体现在几个例子中,其中包括:蒙特卡洛方法、调和调和雅各比解决方案、N体问题和Mandelbrot,这是在多极进程处理器和工作站集群上实施的。对实例进行了快速和效率分析,这些实例显示现有核心程序数量的良好和连续性改进情况。