24小时热门版块排行榜    

查看: 303  |  回复: 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 的主题更新
普通表情 龙 兔 虎 猫 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 X5bHxOULxFqb 2026-10-30 16/800 2026-11-01 03:38 by YXM1FDCSE8Bn
[考博] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 X5bHxOULxFqb 2026-10-30 20/1000 2026-11-01 03:33 by YXM1FDCSE8Bn
[论文投稿] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +4 X5bHxOULxFqb 2026-10-30 25/1250 2026-11-01 03:30 by YXM1FDCSE8Bn
[考研] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 7/350 2026-11-01 02:33 by YXM1FDCSE8Bn
[公派出国] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-31 5/250 2026-11-01 02:25 by YXM1FDCSE8Bn
[考博] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-31 5/250 2026-11-01 02:25 by YXM1FDCSE8Bn
[博后之家] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-30 14/700 2026-11-01 02:06 by YXM1FDCSE8Bn
[考博] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 1uaZt2kAZj2S 2026-10-30 13/650 2026-11-01 02:02 by YXM1FDCSE8Bn
[基金申请] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 xvJS1BYDxvBS 2026-10-31 7/350 2026-11-01 00:54 by YXM1FDCSE8Bn
[论文投稿] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 1uaZt2kAZj2S 2026-10-31 7/350 2026-11-01 00:48 by YXM1FDCSE8Bn
[找工作] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 1uaZt2kAZj2S 2026-10-31 5/250 2026-11-01 00:44 by YXM1FDCSE8Bn
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 X5bHxOULxFqb 2026-10-30 12/600 2026-11-01 00:15 by YXM1FDCSE8Bn
[硕博家园] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 xvJS1BYDxvBS 2026-10-31 7/350 2026-10-31 23:18 by YXM1FDCSE8Bn
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 1uaZt2kAZj2S 2026-10-31 6/300 2026-10-31 23:17 by YXM1FDCSE8Bn
[基金申请] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 1uaZt2kAZj2S 2026-10-30 9/450 2026-10-31 21:34 by YXM1FDCSE8Bn
[教师之家] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 X5bHxOULxFqb 2026-10-30 13/650 2026-10-31 17:12 by hKe7U1kad5Sg
[考博] 2027博士申请-临床检验诊断学、病原生物学、微生物方向 50+3 yyh@ 2026-10-28 4/200 2026-10-31 12:47 by 可淡不可忘
[基金申请] 论文的挂名怎么评判贡献?基金申请中,排名第一的挂名文章 +3 biily 2026-10-25 3/150 2026-10-30 18:33 by 旁观2020
[文学芳草园] 闲聊 +3 myrtle 2026-10-25 6/300 2026-10-29 15:28 by myrtle
[考博] 申博求助 20+3 Katrinae 2026-10-26 4/200 2026-10-27 09:56 by 北京莱茵编辑
信息提示
请填处理意见