Re: [OMPI users] Problem with MPI_File_read() (2)

2009-04-15 Thread Jeff Squyres
On Apr 15, 2009, at 5:06 AM, Jovana Knezevic wrote: Yes, sure, what you say makes sense. On the other hand, it seems I will have to "traditionaly"-open the input file for n times - each one for one process, since anyway all of my processes have to collect their data from it (each parsing it from

Re: [OMPI users] Problem with MPI_File_read() (2)

2009-04-15 Thread Jovana Knezevic
> > In general, files written by MPI_File_write (and friends) are only > guaranteed to be readable by MPI_File_read (and friends). So if you > have an ASCII input file, or even a binary input file, you might need > to read it in with traditional/unix file read functions and then write > it ou

Re: [OMPI users] Problem with MPI_File_read() (2)

2009-04-14 Thread Jeff Squyres
In general, files written by MPI_File_write (and friends) are only guaranteed to be readable by MPI_File_read (and friends). So if you have an ASCII input file, or even a binary input file, you might need to read it in with traditional/unix file read functions and then write it out with MP

[OMPI users] Problem with MPI_File_read() (2)

2009-04-14 Thread Jovana Knezevic
> > Hi Jovana, > > 825307441 is 0x31313131 in base 16 (hexadecimal), which is the string > `' in ASCII. MPI_File_read reads in binary values (not ASCII) just > as the standard functions read(2) and fread(3) do. > > So, your program is fine; however, your data file (first.dat) is not. > >

Re: [OMPI users] Problem with MPI_File_read()

2009-04-14 Thread Shaun Jackman
Hi Jovana, 825307441 is 0x31313131 in base 16 (hexadecimal), which is the string `' in ASCII. MPI_File_read reads in binary values (not ASCII) just as the standard functions read(2) and fread(3) do. So, your program is fine; however, your data file (first.dat) is not. Cheers, Shaun Jovan

[OMPI users] Problem with MPI_File_read()

2009-04-14 Thread Jovana Knezevic
Hello everyone! I have a problems using MPI_File_read() in C. Simple code below, trying to read an integer prints to the standard output wrong result (instead of 1 prints 825307441). I tried this function with 'MPI_CHAR' datatype and it works. Probably I'm not using it properly for MPI_INT, but I