Home > 学习笔记 > MPICH在单机多核上安装说明【转】

MPICH在单机多核上安装说明【转】

February 24th, 2009 Leave a comment Go to comments

原文地址,下面复制了blucas的回复,此处只是做笔记,如不妥,我可以删除本博文。

多核机也可以用mpi,因为要用的模式对openmp支持并不是很好。
我在多核pc机上安装mpich1.2.7的步骤如下:
1.配置ssh环境
修改/etc/hosts文件
在127.0.0.1 local……….
下面加入
192.*.*.* hostname !左边一串数字是你机子的ip,右边是你取的hostname
这样四个核相当与四个节点,节点之间可以用hostname互访
可以通过ping hostname 或ssh hostname测试设置是否成功
2.实现无密码远程访问
打开一个终端
#ssh-keygen -d
回车
回车
在~/.ssh下生成id_dsa (存放私人密匙)和id_dsa_pub(存放公用密匙)
#cp id_dsa_pub authorized_keys
#ssh hostname(无需输入密码)
3.安装MPICH
注意./configure -rsh=ssh !好像MPICH默认的设置是rsh,这里改为ssh
4. 放权
# vi /etc/hosts.equiv
加入 hostname
5.test mpich
进入mpich安装目录的examples
#make cpi
#mpirun -np 4 cpi
可以检查mpich安装和设置是否成功
实际上我是参照几台pc组成pc cluster时对MPICH的安装和设置
具体可以google,网上挺多内容的
希望有所帮助!

Categories: 学习笔记 Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).