t*****o 发帖数: 74 | 1 1。 在FORTRAN下
MPI能不能传输一个COMMON BLOCK的数据, 里面有整数,浮点数, 用什么语句了?
2。 如果几个NODE想对同一个文件同时进行读和写的操作, MPI下能实现吗?
谢谢! 谢谢! |
y***r 发帖数: 1845 | 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下能实现吗? : 谢谢! 谢谢!
|
d*****w 发帖数: 124 | 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下能实现吗? : 谢谢! 谢谢!
|
t*****o 发帖数: 74 | 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.
|
t*****o 发帖数: 74 | 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.
|
d*****w 发帖数: 124 | 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...
|