24小时热门版块排行榜    

CyRhmU.jpeg
查看: 218  |  回复: 1
当前主题已经存档。

dzhijie

金虫 (正式写手)

学生

[交流] 【求助】VASP下mpich2-1.1-lubuntu_amd64 安装问题

如题。
mpich2-1.1-lubuntu_amd64.deb成功解压后的得到三个文件:
control.tar.gz ;data.tar.gz ;debian-binary。没了,就三个,请问接下来怎样安装MPI?
回复此楼
奋发向上
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

qphll

金虫 (正式写手)

★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
spur(金币+3,VIP+0): 3Q!!谢谢帮助!欢迎常来! 7-1 12:24
干脆直接安装原包吧,不要去捣鼓预编译包了.

here you go:

**这里的路径只是给你参考,按照自己需要修改啦.


在ubuntu 下,不能su成root, 在执行命令前加 sudo 即可。

1.
sudo cp mpich2-1.0.3.tar.gz /usr/local/share/
cd /usr/local/share

2. unzip the file
sudo tar xzvf mpich2-1.0.3.tar.gz

cd mpich2-1.0.3

3. 默认安装 (install as default)
I installed mpich2-1.0.3 on my computer with an ubuntu operating system.
sudo ./configure
sudo make
sudo make install
这样我有了一个单机模拟多个cpu的并行环境。

But you can not compile f77 code, please use the following command
没有 fortran 编译命令 mpif77 . 下面的安装有 mpif77 , 可以编译fortran 程序。
sudo make clean
sudo ./configure --enable-f77
sudo make
sudo make install

4. go to your home directory
cd ~/

5. finish installing mpich, and then
you can write a small code

#include "mpi.h"
#include

int main(){

int rank;
int size;

MPI_Init(0,0);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);

std::cout<<"Hello world from process "<
MPI_Finalize();

return 0;
}

6. compile and link the code

mpicxx -o hello.out hello.cpp

7. start the parallel environment ( you have a virtual parallel cluster)
启动并行环境
mpdboot

8. If it is the first time you use the command 'mpdboot', you may see an error message.
Please do:
cd $HOME
touch .mpd.conf
chmod 600 .mpd.conf
then run the command 'mpdboot' again
mpdboot

9. 使用两个 node 运行程序
You can try using two node to run the code
mpirun -n 2 ./hello.out
Or using the following commands 下列命令也可:
mpiexec -n 2 ./hello.out
mpiexec -np 2 ./hello.out
mpirun -np 2 ./hello.out
输出的结果
The output will be
Hello world from process 0 of 2
Hello world from process 1 of 2

10. If you want to stop the parallel environment 想停止并行运行环境
mpdcleanup

11. There are other commands, and you can use 'man ' to see the help. 下面是其他的命令

mpdexit         mpdringtest     mpiexec
mpartition    mpd           mpdroot         mpif77
mpdallexit      mpdhelp         mpdrun          mpirun
mpdboot         mpdkilljob      mpdsigjob       mplex
mpost mpdcheck          mpdtrace        mpto
mpdlistjobs    mptopdf mpicc
mpdcleanup      mpich2version mpicxx
Life, Love, Laugh.
2楼2009-07-01 11:21:55
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 dzhijie 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见