当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : mpicluster不能跨节点读取.bashrc里设置的路径
帖子发表于 : 2016-01-08 11:29 

注册: 2010-10-17 15:37
帖子: 1
送出感谢: 0 次
接收感谢: 0 次
按照https://help.ubuntu.com/community/MpichCluster 搭了个简单的计算集群,能够跨节点运行mpi_hello程序,但是除了node00能够争取读取.bashrc下的 /home/cluster/HiFiLES-solver外,其余节点不能正确读取。
详细输出可见下面
cluster@node00:~/work$ mpirun -hostfile myhostfile ./mpi_hello
I am Process 1 of 8 on node00
The current path is: /home/cluster/HiFiLES-solver
I am Process 0 of 8 on node00
The current path is: /home/cluster/HiFiLES-solver
I am Process 5 of 8 on node02
The current path is: (null)
I am Process 7 of 8 on node02
The current path is: (null)
I am Process 2 of 8 on node01
The current path is: (null)
I am Process 6 of 8 on node02
The current path is: (null)
I am Process 3 of 8 on node01
The current path is: (null)
I am Process 4 of 8 on node01
The current path is: (null)
代码可见下方
#include
#include / getenv /
#include
int main(int argc, char* argv) {
int myrank, nprocs, namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
const char* HIFILES_DIR;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
MPI_Get_processor_name(processor_name, &namelen);
printf("I am Process %d of %d on %s\n", myrank, nprocs, processor_name);
HIFILES_DIR = getenv ("HIFILES_HOME");
printf ("The current path is: %s\n", HIFILES_DIR);
MPI_Finalize();
return 0;
}
不知道是怎么回事儿?


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译