multiple processor read one file

Zi-Hao Wei socrates.wei at gmail.com
Sat Feb 28 14:25:41 CST 2009


hello:

I think maybe I misunderstand the notes in MatLoad:

"In parallel, each processor can load a subset of rows (or the entire
matrix). This routine is especially useful when a large matrix is
stored on disk and only part of it existsis desired on each
processor."

I thought each processor would read the same binary file at the same
time in order to load a subset of rows.
So, when I use MatLoad with PETSC_COMM_WORLD viewer to load matrices,
PETSc will automatically deal with that.

By the way, we don't need to care about whether the values on the
right processor if we use MatLoad and matrix preallocate stuff, right?

thanks!

On Sun, Mar 1, 2009 at 2:36 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> On Feb 27, 2009, at 9:04 PM, Zi-Hao Wei wrote:
>
>> Hi
>>
>> I have a question, when the communicator has more than one processors,
>> MatLoad routine would read the same binary file at the same time for
>> each processors.
>
>   MatLoad() does NOT "read the same binary file at the same time for each
> processors".
> We assumed you were talking about your own IO code that was having each
> process
> open a file and read from it at the same time. For that, performance would
> stink.
>
>   MatLoad() and VecLoad() scale fine up to a few thousand processors. They
> also can use
> MPI (with an option) and that, in theory, can scale to any size.
>
>    So just use MatLoad() and VecLoad() and if they start to dominate the
> time (which they never
> will) then we'll see why and improve them.
>
>  Barry
>
>>
>> But "large number of processors is hopeless", how can we deal with this
>> issue?
>> I know maybe we can use one processor to read the file and assembly to
>> others.
>> However, when large "size" of binary file( out of memory of one
>> processor), is any suggestion about this situation?
>>
>> Thanks!
>>
>> On Sat, Feb 28, 2009 at 7:05 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>>
>>> For a tiny number of processors it is harmless; for larger number of
>>> processors it is hopeless.
>>>
>>>
>>>
>>> On Feb 27, 2009, at 2:07 PM, Yixun Liu <enjoywm at cs.wm.edu> wrote:
>>>
>>>> Hi,
>>>> Is it a problem to let each processor to read the same file?
>>>>
>>>> Thanks.
>>>>
>>>
>>
>>
>>
>> --
>> Zi-Hao Wei
>> Department of Mathematics
>> National Central University, Taiwan
>> Rodney Dangerfield  - "When I was a kid my parents moved a lot, but I
>> always found them."
>
>



-- 
Zi-Hao Wei
Department of Mathematics
National Central University, Taiwan
Rodney Dangerfield  - "When I was a kid my parents moved a lot, but I
always found them."


More information about the petsc-users mailing list