I see what I was doing wrong. The first time I compiled it with ifortran and it is when it gave me an error about the mpif.h file, so I added in.
I removed the file and recompiled it. It works great now.
Thank you.
Trent
Date: Tue, 26 May 2009 16:54:02 -0700
From: Eugene.Loh@Sun.COM
To: users@open-mpi.org
Subject: Re: [OMPI users] MPI_COMM_WORLD Error
mtcreekmore@broncs.utpa.edu wrote:
I and new to OpenMPI and have looked for this, but not getting
anywhere.
I got an example program off this site:
The compute PI in Fortran example.
Compiled it with "mpif90" and no errors.
Then
used the qsub -I and tried both executing directly and "mpirun" and
still receive these errors:
[MGT-2-1:02994] *** An error occurred in MPI_Comm_rank
[MGT-2-1:02994] *** on communicator MPI_COMM_WORLD
[MGT-2-1:02994] *** MPI_ERR_COMM: invalid communicator
[MGT-2-1:02994] *** MPI_ERRORS_ARE_FATAL (goodbye)
Any guidance in the right direction would be appreciated.
First, the example works fine for me.
You seem to be bombing in MPI_Comm_rank and before it asks you for any
input. I guess it's having problems with the MPI_COMM_WORLD
communicator being passed to MPI_Comm_rank? Maybe it's having problems
finding the mpif.h include file? It's finding *some* mpif.h include
file, but presumably not the right one. Make sure the mpif90 and
mpirun commands are the ones you think you should be getting and, if
they are, try adding -showme to the mpif90 line to see where it's
looking for the mpif.h include file.