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


distribute_alms

subroutine distribute_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:

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

Parameter description:

input:
nlmax(*)-- [int], maximum value of l considered (included);

nmmax(*)-- [int], maximum value of m considered (included);

mapnum-- [int], a number of a current map (set of alms) which is to be distributed;

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

ncomp(*)-- [int], a number of components with each set of the alm coefficients (=1,2 or 3);

nmvals-- [int], a number of m assigned to a given proc;

mvals-- [int], a vector of the length nmvals containing the 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;

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

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

and stored in the column-wise order. Needs to be defined and allocated only on the proc root.
**Note that this array will be destroyed on the output.**

myid-- [int], proc id (0,...,numprocs-1);

numprocs(*)-- [int], total number of procs used;

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

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

output:

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. The vector stores relevant alm coefficients for all m values assigned to 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 2009-10-15