如何将文件从一个进程传输到所有其他的mpi? [英] how can i transfer file from one proccess to all other with mpi?

查看:103
本文介绍了如何将文件从一个进程传输到所有其他的mpi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本文件,只在一台计算机上可用,我需要其他计算机能够读取该文件。
如何使用mpich2(c ++)发送文件?

I have a text file that is available on one computer only and I need the other computers to be able to read that file too. How can I send a file using mpich2 (c++)?

我尝试使用 MPI_File_open()但似乎所有的计算机都需要该文件本地工作。 p>

I tried using MPI_File_open() but it seems that all the computers need that file locally to work.

推荐答案

所以我最终读取文件广播到其余的进程作为一个字符数组。

感谢@haraldkl

so i end up read the file a broadcast it to the rest of the of the proccesses as a char array.
thanks @haraldkl

这篇关于如何将文件从一个进程传输到所有其他的mpi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆