天天看点

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

最近在做一个关于分布式人脸识别的研究,利用MATLAB自带工具箱(distcomp)实现分布式计算从而达到提高人脸识别速度的效果。今天下午对 采用分布式架构和不采 用分布式架构的两种表情识别算法进行了测试。在只创建4个分布式任务的情况下,时间有很明显的提高,而且对算法的识别率没有任何影响。        利用MATLAB 实现分布式计算的前提是配置好  MATLAB Distributed Computing Server的环境。配置的方法有两种:基于可视化界面的配置和基于控制台命令行的配置。前几天mathwork公司发布的  MATLAB 2012a 在多个方面都了升级和优化其中 MATLAB Distributed Computing Server 的版本现在已经升级为6.0了。下面就分享一下基于 可视化界面(主要)和控制台命令行相结合方式的 MATLAB 2012a中 MATLAB Distributed Computing Server 6.0 的详细配置过程。

    一、安装 MATLAB 2012a,详细步骤这里就不说了,相信看这篇文章的博友都会的 。

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

    二、安装 MATLAB Distributed Computing Server 6.0。 以管理员身份运行 CMD,进入到 MATLAB分布式工具箱(distcomp)的bin目录下,路径因各人的安装路径而异,本人的路径是:H:\Program Files(win8)\MATLAB\R2012a\toolbox\distcomp\bin;              命令: cd H:\Program Files(win8)\MATLAB\R2012a\toolbox\distcomp\bin

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

         安装 MATLAB Distributed Computing Server ,本人          命令:mdce install

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

        此时可以打开Windows 服务管理器,查看 MATLAB Distributed Computing Server 服务是否已经开启,若未开启可在cmd中输入: mdce  start开启服务

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

    三 、创建和配置分布式任务管理。先准备几台将用来做分布式计算的计算机 构建一个成局域网。打开Admin Center可视化界面进行配置。可以直接双击 分布式工具箱(distcomp)的bin目录下的 admincenter.bat文件也可以输入以下命令行         命令:admincenter.bat

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

        弹出界面, 配置主机 :             点击Add or Find按钮,再出来的界面中输入你 将用来做分布式计算的计算机的IP地址,这里我只配了两台, IP地址分别为192.168.0.104,192.168.0.105。输完所有的 IP地址后,点击Ok。

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

            接下来一直下一步(Next),最后Start。

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解
MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

            配置完主机 后,开始创建任务管理。在MATLAB Job Scheduler(MJS)中,点击Start,为 MJS输入一个名称:例如myjob。

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

        创建worker,selectAll,为每台主机创建2个workers,总共6个workers,ok!

MATLAB 2012a 上配置 MATLAB Distributed Computing Server过程详解

至此 MATLAB Distributed Computing Server 的环境已经搭建完好,写好的分布式程序就可以开始工作啦!

继续阅读