subroutine distribute_partialalms( nlmax, nmmax, nmaps, mapnum, ncomp, nmvals, mvals, lda, local_alm, mmin, mmax, alms, myid, numprocs, root, comm)
Purpose:
Distributes a sub-set of alms including all modes with m in the range between mmin and mmax (both inclusive)
and ncomp components over
numprocs procs of the mpi communicator comm. The output is stored in local_alm as a mapnum set
(out of nmaps which will be eventually stored in the distributed form). The routine is to be called multiple times so the complete set of
alms is at the end distributed. Note that apart of alms all the other parameters have to be defined and allocated as if the entire
set of alms was to be distributed in a step, e.g., via a call to distribute_alms.
Has to be called by all procs. Blocking.
Parameter description:
input:
- nlmax(*)-- [integer(4b)], maximum considered l (included);
- nmmax(*)-- [integer(4b)], maximum considered m (included);
- mapnum-- [integer(4b)], a number of a current map which is to be distributed;
- nmaps(*)-- [integer(4b)], a total number of the alm sets which are to be stored in local_alm;
- ncomp(*)-- [integer(4b)], a number of components of the alm coefficients (=1,2 or 3);
- nmvals-- [integer(4b)], a number of m assigned to a given proc;
- mvals-- [integer(4b)], a vector of the length nmvals containing
the 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;
- mmin-- [integer(4b)], a minimal value of m stored in alms;
- mmax-- [integer(4b)], a maximal value of m stored in alms;
- 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 with m in the range [mmin, mmax], which need to be distributed.
**Note that this array will be destroyed on the output.**
- 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 set of alm is stored;
- comm(*)-- [integer(4b)], an mpi communicator for the numprocs procs.
(*)The value must be the same on all procs of the communicator comm.
output:
- 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;
|