[mpich-discuss] MPI I/O
vvvnew at umich.edu
vvvnew at umich.edu
Wed Jun 8 19:59:48 CDT 2011
Ya thats true. If the file was written with MPI_file_write, then there
should be no problems reading it as it is already in the native format. If
it an ASCII text, then i would like to know as well what the most efficient
way to read it in parallel would be.
Sreenivas
On Wed, 08 Jun 2011 20:23:16 -0400, Gus Correa <gus at ldeo.columbia.edu>
wrote:
> 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
>
> _______________________________________________
> 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