免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 936 | 回复: 0
打印 上一主题 下一主题

在LINUX上安装和配置MPICH-2 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-20 14:59 |只看该作者 |倒序浏览

在LINUX上安装和配置MPICH-2

•          Step 1: MPICH-2的下载
                     
–         
http://www.mcs.anl.gov/research/projects/mpich2/


目前最新的版本是mpich2-1.1.tar.gz (linux source code) .


–         tar zxvf mpich2-1.1.tar.gz
•          Step 2: MPICH2的安装
–         ./configure --prefix=/home/xuyc/mpi-dist
–         make
–         make install

       Step 3 MPICH-2的配置与验证
•          需要Python软件
•          设置主目录下的mpd.hosts文件
–         $HOME/mpd.hosts文件中加入了一行:sv168   /*计算机名称*/
•          配置SSH无密码登录
–         在各个节点上运行命令:ssh-keygen -t rsa
•          命令和手册页路径的配置
–         export PATH=/home/xuyc/mpi-dist/bin:$PATH
–         export MANPATH=/home/xuyc/mpi-dist/man:$MANPATH

•          Step 4启动MPD
–         可启动mpd进程,创建mpi运行时环境 :mpdboot 改成 mpd &

[xuyc@sv168 examples_collchk]$ configuration file /home/xuyc /.mpd.conf not found
A file named .mpd.conf file must be present in the user's home
directory (/etc/mpd.conf if root) with read and write access
only for the user, and must contain at least a line with:
MPD_SECRETWORD=
One way to safely create this file is to do the following:
  cd $HOME
  touch .mpd.conf
  chmod 600 .mpd.conf
and then use an editor to insert a line like
  MPD_SECRETWORD=mr45-j9z
into the file.  (Of course use some other secret word than mr45-j9z.)
       当出现以上错误提示时,按照上面的操作即可。MPD_SECRETWORD填写当前用户的登录密码。

•          Step 5应用程序的编译、链接
–         mpicc –o mypi cpi.c

       在/home/xuyc/mpi-dist/share/examples_collchk 下有example,直接make即可。

•          Step 6: MPI程序的运行
–         mpiexec -n 4 ./time_bcast_nochk
–         该命令为mypi程序启动4个进程

[xuyc@sv168 examples_collchk]$ mpiexec -n 4 ./time_bcast_nochk
time taken by 1X1 MPI_Bcast() at rank 0 = 0.000005
time taken by 1X1 MPI_Bcast() at rank 1 = 0.000002
time taken by 1X1 MPI_Bcast() at rank 3 = 0.000007
time taken by 1X1 MPI_Bcast() at rank 2 = 0.000004

(性能分析以及调试 在以后的文章中阐述)


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/86537/showart_1971539.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP