about MPI_Comm_size(PETSC_COMM_WORLD,&size)

Yixun Liu yxliu at fudan.edu.cn
Wed Oct 25 21:18:43 CDT 2006


Hi,

Can I think that if I set -np 100, but only have 2 actually, the size will be 100?
Another question,I run the progarm from VC++6.0 instead of command line. How to make the program run on 2 processors?

Best,

Yixun
  ----- Original Message ----- 
  From: Matthew Knepley 
  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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20061026/b24b6759/attachment.htm>


More information about the petsc-users mailing list