subroutine collect_partialalms( int nlmax, int nmmax, int nmaps, int mapnum, int ncomp, int nmvals, int *mvals, int lda,
s2hat_dcomplex *local_alm, int mmin, int mmax, s2hat_dcomplex *alms, int myid, int numprocs, int root, MPI_Comm comm)
Purpose:
Collects on the proc root a subset 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 and
stored in local_alm. Note that the latter all together have to contain full set of considered alm (as defined
by lmax and mmax) of which only a selected subset will be collected.
A single call of the routine collects for all ncomp components but only for a single set as indicated by the value of
mapnum.
The call has to be made by all procs belonging to the communicator comm. Blocking.
Parameter description:
input:
- nlmax(*)-- [int], maximum value of l considered (included);
- nmmax(*)-- [int], maximum value of m considered (included);
- nmaps(*)-- [int], a total number of maps stored in the distributed form in local_alm;
- mapnum-- [int], a set number coefficients of which are to be collected;
- ncomp(*)-- [int], a number of components (e.g., Stokes parameters) to be computed (=1,2 or 3);
- nmvals-- [int], a number of m values assigned to a given proc;
- mvals-- [int], a vector of a length nmvals containing
m values to be processed by a given proc;
- lda(*)-- [int], defines the leading dimension of the alm, local_alm and local_plm matrices. Accepted
values: lda == ncomp or nlmax;
- local_alm-- [s2hat_dcomplex*], a vector of complex numbers storing a 4dim array of dimensions:
in the column-wise order.
It contains relevant alm coefficients for all m values as 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--[int] a minimal and maximal value of m to be collected on the proc root;
- 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(*)-- [MPI_Comm], an mpi communicator for the numprocs procs.
output:
- alms-- [s2hat_dcomplex*)], a vector of complex numebers corresponding to a 4-dim array of dimensions:
stored in the column-wise order. It has to be allocated only on the proc root where it will be defined as a result
of the call.
|