about parallel execution

Yixun Liu yxliu at fudan.edu.cn
Tue Oct 17 09:33:38 CDT 2006


Hi,

Thanks for your reply. I read the message you provide and Berend said that "So not only PETSC functions are called by each processor, every command you write will be called by each processor". However,if each PETSC function is called by each processor, the function like 
VecSet(F_global, zero), in which F_global is a parallel vector, will be called many times. In my opinion, to be called once is enough.

Regards,

Yixun

----- Original Message ----- 
From: "Satish Balay" <balay at mcs.anl.gov>
To: <petsc-users at mcs.anl.gov>
Sent: Tuesday, October 17, 2006 10:09 PM
Subject: Re: about parallel execution


> Note: PETSc uses MPI - and it follws the SPMD [Single Program Multiple
> Data] model. You might want to check the replies to the same question
> posted earlier at:
> 
> http://www-unix.mcs.anl.gov/web-mail-archive/lists/petsc-users/2006/10/msg00052.html
> 
> Satish
> 
> On Tue, 17 Oct 2006, Hong Zhang wrote:
> 
>> 
>> Yixun,
>> 
>> Chapter 1 of the
>> Petsc users manual gives detailed instruction
>> on
>> 1. set petsc environment
>> 2. write petsc program
>> 3. compile and run program
>> 
>> You may start running petsc examples as described
>> in the manual.
>> 
>> Hong
>> 
>> On Tue, 17 Oct 2006, Yixun Liu wrote:
>> 
>> > Hi,
>> > I am a new user of PETSC. I want to know how to execute of the PETSC application.
>> > For example, my code are like below,
>> >
>> > PETSCInitialize();
>> > code1;
>> > code2;
>> > .....
>> > PETSCFinalize();
>> >
>> > Does PETSC copy the above codes, assuming there n processors, to each processor? Will code1 be execute on each processor?
>> >
>> > Best regards,
>> >
>> > Yixun
>> >
>> 
>> 
>




More information about the petsc-users mailing list