Note: Some of these were corrected in the second printing of Using MPI.
Thanks to wcs@nas.nasa.gov (Bill Saphir).
Thanks to David Levine <levine@mcs.anl.gov>.
Thanks to Stacey Smith <smith@mcs.anl.gov>.
Thanks to Bryan Putnam <bfp@bfp.cc.purdue.edu>.
Thanks to Bryan Putnam <bfp@bfp.cc.purdue.edu>.
Thanks to Bryan Putnam <bfp@bfp.cc.purdue.edu>.
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
call MPI_TYPE-VECTOR( ey - sy + 1, 1, ex - sx + 3,
MPI_DOUBLE_PRECISION, stride, ierr )
call MPI_Type_COMMIT( stride, ierr )
The paragraph following this code should have the corresponding values
changed.
subroutine exchng2( a, sx, ex, sy, ey,
$ comm2d, stride,
$ nbrleft, nbrright, nbrtop, nbrbottom )
include "mpif.h"
integer sx, ex, sy, ey, stride
double precision a(sx-1:ex+1, sy-1:ey+1)
integer nbrleft, nbrright, nbrtop, nbrbottom, comm2d
integer status(MPI_STATUS_SIZE), ierr, nx
c
nx = ex - sx + 1
c These are just like the 1-d versions, except for less data
call MPI_SENDRECV( a(sx,ey), nx, MPI_DOUBLE_PRECISION,
$ nbrtop, 0,
$ a(sx,sy-1), nx, MPI_DOUBLE_PRECISION,
$ nbrbottom, 0, comm2d, status, ierr )
call MPI_SENDRECV( a(sx,sy), nx, MPI_DOUBLE_PRECISION,
$ nbrbottom, 1,
$ a(sx,ey+1), nx, MPI_DOUBLE_PRECISION,
$ nbrtop, 1, comm2d, status, ierr )
c
c This uses the "strided" datatype
call MPI_SENDRECV( a(ex,sy), 1, stride, nbrright, 0,
$ a(sx-1,sy), 1, stride, nbrleft, 0,
$ comm2d, status, ierr )
call MPI_SENDRECV( a(sx,sy), 1, stride, nbrleft, 1,
$ a(ex+1,sy), 1, stride, nbrright, 1,
$ comm2d, status, ierr )
return
end
(The change is mostly to use a single array a and to make the sense of
left and right etc match the (x,y) orientation of the array.
int MPI_Allgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
MPI_Datatype recvtype, MPI_Comm comm);
and
MPI_ALLGATHERV(sendbuf, sendcount, sendtype,
recvbuf, recvcounts, displs,
recvtype, comm)
<type> sendbuf(*), recvbuf(*)
integer sendcount, sendtype, recvcount(*), displs(*), recvtype,
comm
return(MPI_SUCCESS);to the end of these routines
Thanks to Peter Junglas <Junglas@tu-harburg.d400.de>.
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
Thanks to puri@cs.msstate.edu (Puri Bangalore).
/* Use cartesian sub-topology mechanism to get row/col comms: */ remain_dims[0] = FALSE; remain_dims[1] = TRUE; MPI_Cart_sub(comm_2d, remain_dims, &row); remain_dims[0] = TRUE; remain_dims[1] = FALSE; MPI_Cart_sub(comm_2d, remain_dims, &col);The examples have been updated to reflect this correction as well.
Thanks to schneid@tc.cornell.edu (David J. Schneider).
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
The
ability to compute FCI wave functions thus confers the ability to adjudicate
among all approximate methods (e.g., SCF, many-body methods, and truncated CI*)
and, by comparison with experiment, permits assessment of deficiencies in the
one-particle basis set and the Hamiltonian approximations.
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
Thanks to Barry Smith.
Thanks to Barry Smith <bsmith@mcs.anl.gov>.
Thanks to carriero-nicholas@CS.YALE.EDU (Nicholas Carriero).
int MPI_Get_processor_name( char *name, int *resultlen )
int MPI_Topo_test( MPI_Comm comm, int *top_type )
MPI_Topo_test( comm, top_type, ierr ) integer comm, top_type, ierr
Thanks to David Levine <levine@mcs.anl.gov>.
This isn't really a correction, but if the example of sending parts of
a(nx,ny,nz) sends the entire side (for example, sx=sy=sz=1 and
ex=nx, ey=ny, and ez=nz), then the three forms can be
simplified to
a(1:nx,1:ny,k): MPI_Type_contiguous(nx*ny,MPI_DOUBLE_PRECISION,newz,ierr) a(i,1:ny,1:nz): MPI_Type_vector(ny*nz,1,nx,MPI_DOUBLE_PRECISION,newx,ierr) a(1:nx,j,1:nz): MPI_Type_vector(nz,nx,nx*ny,MPI_DOUBLE_PRECISION,newy,ierr)Note in particular the form for newx; this exploits the fact that all of the elements of this plane are separated by nx elements. This is not true for the more general case, which leads to the use of hvector in the example.
Thanks to schneid@tc.cornell.edu (David J. Schneider).