subroutine collect_alms( nlmax, nmmax, nmaps, mapnum, ncomp, nmvals, mvals, lda, local_alm, alms, myid, numprocs, root, comm)
Purpose:
Collects on a proc root a complete set of the alm coefficients 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. A single call of the routine gathers all the coefficients for a single map of ncomp components. It 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:
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;
- 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:
and which, on the proc root stores all the alm coefficients which will be collected;
|