MPI可执行和共享标准
MPI executable and sharing stdin
我正在使用MPI
编写我的第一个程序。我习惯了openMP
,但这个似乎更难…!
我现在面临着一个问题,数据传递为stdin
。我正在使用以下命令运行我的程序:
cat DATAfile | mpirun -n 8 ./a.out
,我所看到的是,只有rank 0
线程有一个非空的stdin
。有可能从一开始就分享吗?因为它是由sting
对象组成的,所以用MPI
指令传递它会很麻烦。
edit:在文档中找到我想要的:http://www.open-mpi.org/~ jsquyres/www.open-mpi.org/doc/v1.3/man1/mpirun.1.php
添加-stdin all
就可以了。
cat DATAfile | mpirun -n 8 -stdin all ./a.out
最后,答案在文档中:http://www.open-mpi.org/~ jsquyres/www.open-mpi.org/doc/v1.3/man1/mpirun.1.php
cat DATAfile | mpirun -n 8 -stdin all ./a.out
相关文章:
- 将成员变量添加到共享库中的类中,不会破坏二进制兼容性吗
- 使用CMake检测支持的C++标准
- 如何理解C++标准N3337中的expr.const.cast子句8
- 是否可以通过C++扩展强制多个python进程共享同一内存
- 在cuda线程之间共享大量常量数据
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- 编译标准库类型
- 如何从具有移动语义的类对象中生成共享指针
- 在c代码之间共享数据的最佳方式
- 如何将元素插入到标准::地图的共享指针中?
- 使用 C++ 标准库避免共享库中的符号冲突
- 用C 11共享库编译共享库(旧标准)
- 如何在标准C 11中制作共享_lock或upgrade_lock
- 标准C++中的共享递归互斥
- 在 win32、c++ 中的 2 个进程之间共享相同的标准输出
- 建立链接到其他非标准共享库的共享库
- 为什么c++共享指针的行为不像迭代器的标准指针
- 在标准c++和OpenCL之间共享多线程代码
- MPI可执行和共享标准
- 共享库和语言标准