LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2003-06-26 06:52:21


On Wed, 25 Jun 2003, jeremy archuleta wrote:

> I "successfully" compiled PETSc without using any information from your
> webpage (3rd-party/petsc.php3)

Looks like our page is a little outdated. :-)

> But now when I compile a code for Overture, I am getting this error:
>
> Overture.v19/Oges/PETScEquationSolver.C:224: invalid conversion from
> `int' to `_comm*'
> at this line:
> ierr= MPI_Comm_size(comm, &numProcs);
>
> comm = PETSC_COMM_WORLD;
> [snipped]
>
> I have tried replacing comm with PETSC_COMM_WORLD and even
> MPI_COMM_WORLD and each return the same error.

This is suspicious. Doing a quick grep through the Petsc header files, I
can see that PETSC_COMM_WORLD is supposed to be of type MPI_Comm. In
LAM/MPI, that actually resolves down to "struct _comm *" (as the compiler
error indicates). So why is it an int?

Simiarly, MPI_COMM_WORLD is definitely an MPI_Comm; it should not be of
type int.

Perhaps you're getting the wrong <mpi.h>? I know that other MPI
implementations use int as the base type for their handles (e.g.,
MPI_Comm). It might explain why this is happening.

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/