- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to send and receive a line or a row in an array? For example, say a table T is dimensions 2x3x4x5, so
real allocatable :: T(:,:,:,:)
allocate(T(2,3,4,5))
What happens with
mpi_send(T(1,1,1,5),24,mpi_real4,iNumProc+1,1,mpi_comm_world,req_ps1(1),info_p)
or with
mpi_send(T(2,1,1,1),60,mpi_real4,iNumProc+1,1,mpi_comm_world,req_ps1(1),info_p)
? (By the way, would you have the link to mpi_send and mpi_recv documentation in Fortran?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would not work any different from "ordinary" calls:
call mysub( T(:,1,1,1) ) ! Slice consisting of the first dimension
call mysub( T(1,2,3,:) ) ! Slice from the fourth one
The called routine mysub would get a one-dimensional array slice in both cases, behaving as a one-dimensional array. In the second example the array as received is not contiguous but if the routine cannot handle that (FORTRAN 77 style for instance), then a temporary copy will be made (copyin/copyout). For mpi_send/mpi_recv the same thing will hold.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would not work any different from "ordinary" calls:
call mysub( T(:,1,1,1) ) ! Slice consisting of the first dimension
call mysub( T(1,2,3,:) ) ! Slice from the fourth one
The called routine mysub would get a one-dimensional array slice in both cases, behaving as a one-dimensional array. In the second example the array as received is not contiguous but if the routine cannot handle that (FORTRAN 77 style for instance), then a temporary copy will be made (copyin/copyout). For mpi_send/mpi_recv the same thing will hold.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page