about MPI_Comm_size(PETSC_COMM_WORLD,&size)

Chris Harden charden at scs.fsu.edu
Wed Oct 25 21:37:00 CDT 2006


I think VC is ok for editing (maybe), but PETSc and mpich are easier  
to work with in the command line. You might save yourself some  
headache. Just paste your file into a plain text.cpp and put it in a  
directory such as your desktop. Then cd to your desktop and compile  
from the command line. I promise your life will be simpler in the  
long term.



On Oct 25, 2006, at 10:18 PM, Yixun Liu wrote:

> 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

Chris Harden
Graduate Assistant
School of Computational Science
Florida State University
446-B Dirac Science Library
Tallahassee, Florida 32306-4120

Voice: 850.644.3442
E-mail: charden at scs.fsu.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20061025/64a486b6/attachment.htm>

More information about the petsc-users mailing list