Next: collect_cls    Up: Gather/scatter routines    Previous: collect_alms


collect_partialalms

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

Purpose:

Collects on a proc root a sub set of all the alm coefficients with m in the interval [mmin,mmax], which on the input are distributed over all procs of the mpi communicator comm. The coefficients are collected for all of the ncomp components but only for a single set as indicated by the value of mapnum. On the output the results is stored on the proc root. The call has to be made by all procs belonging to the communicator comm. Blocking.

Parameter description:

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

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

nmaps(*)-- [integer(4b)], a total number of maps stored in the distributed form in local_alm;

mapnum-- [integer(4b)], a set number coefficients of which are to be collected;

ncomp(*)-- [integer(4b)], a number of map components (e.g., Stokes parameters) to be computed (=1,2 or 3);

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

mvals-- [integer(4b)], a vector of a length nmvals containing 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;

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;

mmin, mmax--[integer(4b)] a minimal and maximal value of m to be collected on the proc root;
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 map map is stored;
comm(*)-- [integer(4b)], an mpi communicator for the numprocs procs.

output:

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

(0:nlmax, 0:mmax-mmin, 1:ncomp, 1:nmaps) if lda == nlmax
(1:ncomp, 0:nlmax, 0:mmax-mmin, 1:nmaps) if lda == ncomp

and which, on the proc root stores the alm coefficients which are to be collected;



Next: collect_cls    Up: Gather/scatter routines    Previous: collect_alms

radek stompor 2008-10-22