[mpich-discuss] MPI I/O
Gus Correa
gus at ldeo.columbia.edu
Wed Jun 8 19:23:16 CDT 2011
Hmm ...
I guess that if you are trying to read integers/int,
the file should have integers in binary representation,
not the digits/characters that represent the integers in plain text.
Have you tried to write a little C program to write
this group of integers to a (binary) file,
then use your MPI program to read this (binary) file?
I am pessimistic that this would work directly with the text file.
Too many hurdles: newline separators,
conversion from string to integer, etc.
Actually, a couple of questions to the MPICH2 developers:
Are text files readable at all by the MPI I/O functions?
Perhaps as characters, with the target buffer being of MPI_CHAR type?
The documentation I could find is vague, doesn't tell explicitly
which file types are supported by MPI I/O.
Thank you,
Gus Correa
Irfan Gul wrote:
> Hi,
> I need a simple program to read integer values from text file by
> multiple processes?
> each process store n/p values in array.
> for example text file have n values like.
> 4
> 2
> 7
> 4
> 9
> 6
> 3
> 1
> ..............................................................
> thanks
>
> Regard: Irfan
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list