Next: collect_partialalms    Up: Gather/scatter routines    Previous: collect_partialmap


collect_alms

subroutine collect_alms( int nlmax, int nmmax, int nmaps, int mapnum, int ncomp, int nmvals, int *mvals, int lda, s2hat_dcomplex *local_alm, s2hat_dcomplex *alms, int myid, int numprocs, int root, MPI_Comm 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 and stored in local_alm. A single call collects all ncomp components but only for a single set as indicated by the value of mapnum. It 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 map 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:

(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);

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;

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.

output:

alms-- [s2hat_dcomplex*], a vector of complex numbers storing a 3-dim array of dimensions:

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

in the column-wise order. It has to be allocated only on the proc root where all the alm coefficients will be collected.



Next: collect_partialalms    Up: Gather/scatter routines    Previous: collect_partialmap

radek stompor 2009-10-15