subroutine distribute_w8ring(int ncomp, int first_ring, int last_ring, double *local_w8ring, int nringsall, double *w8ring, int myid, int numprocs, int root, MPI_Comm comm)
Purpose:
Distributes the weights, wghts used for the inverse harmonic transform and stored initially on the proc root over all processors
of the communcator comm in a manner defined by first_ring and last_ring. The distribued weights are stored in
local_w8ring.
To be called by all procs of the communicator comm. Blocking.
Parameter description:
input:
- ncomp(*)-- [int], a number of map components for which the weights are being distributed (=1,2 or 3);
- first_ring, last_ring-- [int], numbers of a first and last ring which define a sub map (both included) to be computed by a given proc;
- nringsall(*)-- [int], a total number of the iso-latitude rings in the Northern hemisphere (plus the equator)
of the map. This value is normally stored as the field of the pixelization structure, if that is defined beforehand. (nringsall =
pixelization.nringsall.)
- w8ring-- [double*], a vector of doubles storing a 2-dim array
of a size (1:nringsall,1:ncomp) in the column-wise order. It has to be allocated and defined only on the
proc root and will be distributed all porcs of the communcator comm as a result of the routine.
- myid-- [int], proc id (0,...,numprocs-1);
- numprocs(*)-- [int], total number of procs used;
- root(*)-- [int], defines a proc root on which the full map
map is stored;
- comm(*)-- [int], an mpi communicator for the numprocs procs.
(*)The value must be the same on all procs of the communicator comm.
output:
- local_w8ring-- [double*], a vector storing a 2-dim array
of a size (1:last_ring-fitst_ring+1,1:ncomp) in the column-wise order. It is to contain a subset of the map weights
corresponding to the ring range defined by first_ring and last_ring.
|