multiple processor read one file

Barry Smith bsmith at mcs.anl.gov
Sat Feb 28 12:36:24 CST 2009


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."



More information about the petsc-users mailing list