1.MatlabMPI简介
先附上MatlaMPI官网的简介:
Matlab is the dominant programming language for implementing numerical computations and is widely used for algorithm development, simulation, data reduction, testing and system evaluation. Many of these computations could benefit from faster execution on a parallel computer. There have been many previous attempts to provide an efficient mechanism for running Matlab programs on parallel computers. These efforts have faced numerous
challenges and none have received widespread acceptance.
In the world of parallel computing the Message Passing Interface (MPI)
is the de facto standard for implementing programs on multiple processors. MPI defines C and Fortran language functions for doing point-to-point communication in a parallel program. MPI has proven to be an effective model for implementing parallel programs and is used by many of the world’s most demanding applications (weather modeling, weapons simulation, aircraft design, etc.).
MatlabMPI is set of Matlab scripts that implement a subset of MPI and allow any Matlab program to be run on a parallel computer. The key innovation of MatlabMPI is that it implements the widely used MPI “look and feel” on top of standard Matlab file i/o, resulting in a “pure” Matlab implementation that is exceedingly small (~300 lines of code). Thus, MatlabMPI will run on any combination of computers that Matlab supports. In addition, because of its small size, it is simple to download and use (and modify if you like).
大意就是MatlabMPI是一种参考了MPI消息传递模型,在Matlab中的一种类似实现方式,可以实现在多台计算机上跑并行程序的功能。
2.MatlabMPI下载
MatlabMPI由LINCOLN LABORATORY,(MASSACHUSETTS INSTITUTE OF TECHNOLOGY )编写,目前官网提供两个版本供大家免费下载,下载页面地址如下:
http://www.ll.mit.edu/mission/cybersec/softwaretools/matlabmpi/matlabmpi.html
3.MatlabMPI运行环境
MatlabMPI官网描述所需运行条件如下:
这里的“File system visible to all processors”由NFS文件共享系统实现,在Linux系统下可以免费安装,具体过程可以参考上一篇博客:
阿里云搭建基于MatlabMPI的集群(六):NFS文件共享系统安装与配置
实际上除了REQUIREMENTS中说的两条之外,还需要实现SSH免秘钥远程访问功能,具体过程可以参考:
阿里云搭建基于MatlabMPI的集群(五):ssh免密码访问
4.MatlabMPI安装
先看一下官网的说明:
III. INSTALLING AND RUNNING:
1. Copy MatlabMPI into a location that is visible to all computers.
2. Add MatlabMPI/src directory to matlab path (e.