Redian新闻
>
请教各位大下, MPI并行计算的问题
avatar
请教各位大下, MPI并行计算的问题# Computation - 科学计算
t*o
1
1。 在FORTRAN下
MPI能不能传输一个COMMON BLOCK的数据, 里面有整数,浮点数, 用什么语句了?
2。 如果几个NODE想对同一个文件同时进行读和写的操作, MPI下能实现吗?
谢谢! 谢谢!
avatar
y*r
2

Use MPI_SEND()
MPI_BYTE
you should calc the sizeof COMMON BLOCK by yourself.
Use MPI2. MPI1 cannot.

【在 t*****o 的大作中提到】
: 1。 在FORTRAN下
: MPI能不能传输一个COMMON BLOCK的数据, 里面有整数,浮点数, 用什么语句了?
: 2。 如果几个NODE想对同一个文件同时进行读和写的操作, MPI下能实现吗?
: 谢谢! 谢谢!

avatar
d*w
3

This has nothing to do with MPI, because no communications between nodes.
What you need to do is do it as a serial code.

【在 t*****o 的大作中提到】
: 1。 在FORTRAN下
: MPI能不能传输一个COMMON BLOCK的数据, 里面有整数,浮点数, 用什么语句了?
: 2。 如果几个NODE想对同一个文件同时进行读和写的操作, MPI下能实现吗?
: 谢谢! 谢谢!

avatar
t*o
4
Thanks a lot!

Can you explain a little more about how to do it under MPI2? thanks

【在 y***r 的大作中提到】
:
: Use MPI_SEND()
: MPI_BYTE
: you should calc the sizeof COMMON BLOCK by yourself.
: Use MPI2. MPI1 cannot.

avatar
t*o
5

but how do you know if the file is used by other nodes or not? Even it is a
serial code, I think the nodes has to ommunicate to tell other nodes if it
open the file or finish reading/writing it...

【在 d*****w 的大作中提到】
:
: This has nothing to do with MPI, because no communications between nodes.
: What you need to do is do it as a serial code.

avatar
d*w
6

实际上MPI分别在不同节点运行一个COPY. 如果你通过NFS指向同一个文件进行读写,那么
存在你说的问题;如果是各自节点上有独立的相同文件名的文件(内容可以不同),那么相互
之间独立.
如果你是第一种情况(也是大多数情况),最好的办法是在一个节点上读写,在广播到其他节
点上去. 你为什么想对一个文件用多个节点进行"写"呢?这个要求很奇怪,因为即使行,也
会得到很随即的结果.

【在 t*****o 的大作中提到】
:
: but how do you know if the file is used by other nodes or not? Even it is a
: serial code, I think the nodes has to ommunicate to tell other nodes if it
: open the file or finish reading/writing it...

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。