On Jun 6, 2005, at 5:10 PM, Ravi R. Kumar wrote:
> I have a MPI/C++ code for parallel reading from a single data file.
> There seems
> to be some problem which I am not able to figure out. Pls point out
> my mistake.
> Here is the code, data file and input:
The mistake is not in your application per se. MPI I/O is not
intended to read in general text files - it is intended for reading
files written by the MPI I/O interface. It definitely doesn't do the
string to integer conversion necessary to read in your input file.
If you have an input file like the one you included, your best bet is
to use fopen / fscanf on the root node. MPI I/O is really only
appropriate when the input file was written using MPI I/O.
Hope this helps,
Brian
|