about MPI_Comm_size(PETSC_COMM_WORLD,&size)

Matthew Knepley knepley at gmail.com
Wed Oct 25 21:24:11 CDT 2006


On 10/25/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
>
>  Hi,
>
> Can I think that if I set -np 100, but only have 2 actually, the size will
> be 100?
>

Yes. This counts processes, not processors.

Another question,I run the progarm from VC++6.0 instead of command line. How
> to make the program run on 2 processors?
>

You use the mpirun for the MPI you are using. I think you should get a book
on
MPI. I recommend the one by Gropp, et. al. It is had to use PETSc without
these
basic MPI notions, such as communicator, process, etc.

  Matt

Best,
>
> Yixun
>
> ----- Original Message -----
> *From:* Matthew Knepley <knepley at gmail.com>
> *To:* petsc-users at mcs.anl.gov
> *Sent:* Thursday, October 26, 2006 9:47 AM
> *Subject:* Re: about MPI_Comm_size(PETSC_COMM_WORLD,&size)
>
> On 10/25/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
> >
> >  Hi,
> >
> > My computer is a standare dual processors PC of Dell corp., but after
> > calling   ierr = PI_Comm_size(PETSC_COMM_WORLD,&size), I find the size is
> > one. Is it correct?
> >
>
> MPI only knows what mpiruns tells it. You ran the exampe with -np 1. If
> you use -np 2, then it will have size 2.
>
>   Matt
>
>  Best,
> >
> > Yixun
> >
> --
> "Failure has a thousand explanations. Success doesn't need one" -- Sir
> Alec Guiness
>
>


-- 
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec
Guiness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20061025/8b4e2ed6/attachment.htm>


More information about the petsc-users mailing list