Because the compiler does not know that you want to send the entire
sub-matrix, passing non-contiguous arrays to a function is, at best,
dangerous, do not do that unless you know the function can handle that.
Do AA(1,1,2) and then it works. (in principle you then pass the starting
memory location and MPI assumes it to be contiguous).
Or do A(:,:,2:3), which ensures that the matrix is passed by reference and
hence the memory will also be contiguous.




2015-01-31 22:16 GMT+00:00 Diego Avesani <diego.aves...@gmail.com>:

> Dear all,
> here how I create a 2D vector type to send 3D array element:
>
> (in the attachment)
>
> The vectors are:
> real*4  AA(4,5,3), BB(4,5,3)
> In my idea both AA and BB have three elements (last columns) and each
> elements has (4x5) features.
>
> 1) What do you think?
>
> 2) why I can not send AA(1,1,2:3) as
>  call MPI_SEND(AA(1,1,2:3), 2, rowtype, 1, 300, MPI_COMM_WORLD, ierr)
>
> Thanks a lot
>
> Diego
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post:
> http://www.open-mpi.org/community/lists/users/2015/01/26246.php
>



-- 
Kind regards Nick

Reply via email to