Newsgroups: comp.parallel.pvm
From: mapdjb@bath.ac.uk (D J Batey)
Subject: Re: Q:about pvm_pkint with multple-D array
Organization: School of Mathematical Sciences, University of Bath, UK
Date: Fri, 19 Jan 1996 10:01:01 GMT
Message-ID: <DLFAHp.7oy.B.mary@bath.ac.uk>

In the referenced article, Choi Eunmi <choie> writes:
[..]
>            pvm_pkint( P_part_SUB[i], size2*size3, 1 );
>where P_part_SUB is the 3D array P_part_SUB[size1][size2][size3]
[..]
>but I got the following error message;
>
> warning: argument #1 is incompatible with prototype:
>        prototype: pointer to int : "/opt/pvm3/include/pvm3.h", line 239
>        argument : pointer to pointer to int
>

Well, if I remember rightly, multidimensional arrays are declared as
"arrays of arrays". So P_part_SUB is actually a pointer to a pointer
to a pointer to an int (int ***). Therefore P_part_SUB[i] is a pointer
to a pointer to an int (int **). Since pvm_pkint expects a pointer to
an int (int *), the warning is quite correct. It's only a warning,
though, so it should compile, and since arrays are stored the way you
seem to expect, it should work. If you want to get rid of the warning
you could always cast it to an (int *)...

Duncan.




