> This is basic fortran programming issue, you may want to consult
> some fortran programming book.
>
> A.Chan
It is more an issue with understanding the usual implementations
of the MPI Fortran bindings, namely, having to include mpif.h in
ALL procedures that wish to make use of the MPI variable
On Jun 22, 2010, at 6:46 PM, Mihaly Mezei wrote:
> I just tried adding the include statement, but this is what I got:
>
> lapis.mssm.edu % mpif90 -o mpi0 mpi0.f
> /share/apps/openmpi-1.4.1/include/mpif-common.h(402): error #6406:
> Conflicting attributes or multiple declaration of name. [MPI_
I don't think you can declare a function with a fortran parameter:
subroutine testsubr(MPI_COMM_WORLD,ireadok)
1) If you've already included mpif.h with in testsubr(),
you don't need the 1st argument above.
2) If you don't have mpif.h in testsubr(), the 1st argument
could be MPI_comm. In
> I think the problem is that you didn't include mpif.h in testsubr().
> Hence, the value of MPI_INTEGER was undefined -- I don't think it's a
> problem with the value of MPI_Comm.
That's correct.
You also don't then need to pass MPI_Comm_World around, it is a
parameter defined in mpif-common.h w
HEUREEKA!
The solution that works is to keep using MPI_WORK_COMM in the MPI_ subroutine
calls, include mpif.h in the subroutine, but don't try to pass it as an
argument or save it in an other integer (as I did under mpich).
Thanks, Jeff, for your help and patience with my stumblings.
Mihaly Me
- Original Message -
From: Jeff Squyres
List-Post: users@lists.open-mpi.org
Date: Tuesday, June 22, 2010 6:36 pm
Subject: Re: [OMPI users] Fortran - MPI_WORLD_COMM - correction
> I think the problem is that you didn't include mpif.h in
> testsubr(). Hence, the value of
Hi,
The previous example I posted shows that using a different integer does not
work, Attached is a case where I tired to pass the MPI_COMM_WORLD to the
subroutine as one of it arguments, resulting in an invalid datatype error.
Mihaly Mezei
Department of Structural and Chemical Biology, Mount
I think the problem is that you didn't include mpif.h in testsubr(). Hence,
the value of MPI_INTEGER was undefined -- I don't think it's a problem with the
value of MPI_Comm.
On Jun 22, 2010, at 6:21 PM, Mihaly Mezei wrote:
> Hi,
>
> attached is mpi0.f (23 lines) and the screen dump of the c
MPI_COMM_WORLD is defined by a parameter statement, so it
is a fortran contant. The following f77 program fails to compile.
> cat ts_param.f
Program test
integer mm
parameter (mm = 9)
common /cmblk/ mm
end
> gfortran ts_param.f
ts_param.f:4.23:
common /cmblk/
Hi,
attached is mpi0.f (23 lines) and the screen dump of the compilation with the
error message.
Thanks for the lightening-speed reaction!
Best,
Mihaly Mezei
Department of Structural and Chemical Biology, Mount Sinai School of Medicine
Voice: (212) 659-5475 Fax: (212) 849-2456
WWW (MSSM hom
On Jun 22, 2010, at 6:04 PM, Mihaly Mezei wrote:
> In mpich, I could assign MPI_WORLD_COMM (i.e., mpich did not accept
> MPI_WORLD_COMM in a common block either) to an integer and that was what I
> put into the common block,. Openmpi does not accept that new integer as a
> communicator.
It sho
On Jun 22, 2010, at 5:55 PM, Mihaly Mezei wrote:
> mpi0.f(2): error #6414: This PARAMETER constant name is invalid in this
> context. [MPI_COMM_WORLD]
> common /MPI_DM/ MPI_COMM_WORLD,NUMNOD,MYRANK
> --^
> mpi0.f(21): error #6412: A dummy argument name is invalid in th
Greetings, and apologies:
In mpich, I could assign MPI_WORLD_COMM (i.e., mpich did not accept
MPI_WORLD_COMM in a common block either) to an integer and that was what I put
into the common block,. Openmpi does not accept that new integer as a
communicator.
Mihaly Mezei
Department of Structura
Greetings,
I used mpich earlier, where I could get the value of MPI_WORLD_COMM in the main
program and pass it to subroutines via a common block (as the MPI_WORLD_COMM is
assumed to be an integer and I even was able to confirm that it is declared to
be an integer in mpif-common.h). However, ope
14 matches
Mail list logo