Ok, Thanks Ricky, you were dead right there, changed it around, this
is the problem with building it up in a modular fashion working on
bits at a time...
so now unfortunately there's plenty more problems!
compiling now gives:
mpitest2.c: In function `main':
mpitest2.c:213: parse error before `masterKstruct'
mpitest2.c:221: `masterKstruct' undeclared (first use in this function)
mpitest2.c:221: (Each undeclared identifier is reported only once
mpitest2.c:221: for each function it appears in.)
mpitest2.c:221: `baseaddress' undeclared (first use in this function)
mpitest2.c:222: warning: passing arg 2 of `MPI_Address' from
incompatible pointer type
mpitest2.c:223: warning: assignment makes integer from pointer without a cast
mpitest2.c:224: warning: passing arg 2 of `MPI_Address' from
incompatible pointer type
mpitest2.c:225: warning: assignment makes integer from pointer without a cast
mpitest2.c:226: warning: passing arg 2 of `MPI_Address' from
incompatible pointer type
mpitest2.c:227: warning: assignment makes integer from pointer without a cast
mpitest2.c:229: `MPI_Kstruct' undeclared (first use in this function)
mpitest2.c:229: warning: passing arg 3 of `MPI_Type_struct' from
incompatible pointer type
mpitest2.c:229: warning: passing arg 4 of `MPI_Type_struct' from
incompatible pointer type
I declared the three arrays to be:
int lena[3];
int loca[3];
int typa[3];
I'm wondering why I should have the first error:
`masterKstruct' undeclared (first use in this function)
as it seems to me that it is declared properly.
The Second type of error:
mpitest2.c:221: `baseaddress' undeclared (first use in this function)
Isn't baseaddress declared properly at:
MPI_Aint baseaddress;
With my last error, what is a correct way of casting?
mpitest2.c:222: warning: passing arg 2 of `MPI_Address' from
incompatible pointer type
mpitest2.c:223: warning: assignment makes integer from pointer without a cast
Many Thanks
On Fri, 18 Feb 2005 20:21:03 +0800, Ricky Tang Siu Hong
<shtang_at_[hidden]> wrote:
> > ....
> >
> > When I try to compile this program I get the following error:
> >
> > mpitest2.c:234: parse error before `status'
> >
> >
> > Could anyone tell me where I'm going wrong with this?
> >
>
> Maybe I am wrong... Is it require to put declaration in front of any code?
> Let's say, MPI_Status before MPI_Address(...)
>
>
|