Next: distribute_partialalms    Up: Gather/scatter routines    Previous: distribute_w8ring


distribute_alms

subroutine distribute_alms( nlmax, nmmax, nmaps, mapnum, ncomp, nmvals, mvals, lda, local_alm, alms, myid, numprocs, root, comm)

Purpose:

Distributes a full set of alms composed of ncomp components over numprocs procs of the mpi communicator comm. The output is stored in local_alm as a mapnum set (out of nmaps which will be eventually stored in the distributed form).
Has to be called by all procs. Blocking.

Parameter description:

input:
nlmax(*)-- [integer(4b)], maximum considered l (included);

nmmax(*)-- [integer(4b)], maximum considered m (included);

mapnum-- [integer(4b)], a number of a current map which is to be distributed;

nmaps(*)-- [integer(4b)], a total number of the alm sets which are to be stored in local_alm;

ncomp(*)-- [integer(4b)], a number of components of the alm coefficients (=1,2 or 3);

nmvals-- [integer(4b)], a number of m assigned to a given proc;

mvals-- [integer(4b)], a vector of the length nmvals containing the m values to be processed by a given proc;

lda(*)-- [integer(4b)], defines the leading dimension of the alm, local_alm and local_plm matrices. Accepted values: lda == ncomp or nlmax;

alms-- [complex(dp)], an allocated (on the proc root only) pointer to a 4-dim array of dimensions:

(0:nlmax, 0:nmmax, 1:ncomp, 1:nmaps) if lda == nlmax
(1:ncomp, 0:nlmax, 0:nmmax, 1:nmaps) if lda == ncomp

and which, on the proc root stores all the alm coefficients which need to be distributed.
**Note that this array will be destroyed on the output.**

myid-- [integer(4b)], proc id (0,...,numprocs-1);

numprocs(*)-- [integer(4b)], total number of procs used;

root(*)-- [integer(4b)], defines a proc root on which the full set of alm is stored;

comm(*)-- [integer(4b)], an mpi communicator for the numprocs procs.
(*)The value must be the same on all procs of the communicator comm.

output:

local_alm-- [complex(dp)], an allocated pointer to a 4dim array of dimensions:

(1:ncomp,0:nlmax,0:nmvals-1,1:nmaps), if lda == ncomp;      (HEALpix convention);
(0:nlmax,0:nmvals-1,1:ncomp,1:nmaps), if lda == nlmax;      (S2HAT convention);

storing relevant alm coefficients for all m values processed on a given proc and all l and all ncomp components for each of the nmaps maps which are to be processed simultanously; For ncomp == 1 the coefficients are those for total intensity only. For ncomp == 3 the component corresponds to the total intensity, E-mode and B-mode polarizations, respectively;



Next: distribute_partialalms    Up: Gather/scatter routines    Previous: distribute_w8ring

radek stompor 2008-10-22