Next: distribute_mask    Up: Gather/scatter routines    Previous: distribute_map


distribute_partialmap

subroutine distribute_partialmap( pixelization, nmaps, mapnum, ncomp, first_ring, last_ring, submap_size, local_map, first_pix, last_pix, submap, myid, numprocs, root, comm)

Purpose:

The routine distributes part of the full sky map, submap, composed of submap_size consecutive pixels starting from a pixel, first_pix, for ncomp components and stored initially in the memory of the proc root. The routine is to be called successively so the full map is distributed as its result over all processors as if a single call to distribute_map has been performed. It does not however require that a sufficient memory is availabe on the proc root permitting storing the full map. As the result the map is stored in the distributed form on each proc in a vector local_map as a mapnum map. To distribute nmaps the routines needs to be called nmaps times, however in this way it does not require storing all the full sky maps in the memory of the single proc root prior to the distribution.
To be called by all procs of the communicator comm. Blocking.


Parameters:

input:
pixelization(*)-- [pixeltype], an S2HAT structure containing the info about the pixelization;

mapnum(*)-- [integer(4b)], a current number of a map which is being now distributed;

nmaps(*)-- [integer(4b)], a total number of maps to be distributed and later processed;

ncomp(*)-- [integer(4b)], a number of components of the maps to be distributed (=1,2,3);

first_ring, last_ring-- [integer(4b)], numbers of a first and last ring which define a sub map (both included) to be stored on a given proc;

submap_size-- [integer(4b)], a number of pixels corresponding to a set of rings defined by first_ring and last_ring above;

first_pix, last_pix-- [integer(8b)], a global number of the first pixel and last pixel, respectively, of the partial map submap to be distributed;
submap-- [real(dp)], an allocated pointer to a 2dim array of dimensions (0:npixall-1, 1:ncomp) storing a single full sky map on the proc root and which is to be distributed;

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 partial map to be distributed submap 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_map-- [real(dp)], an allocated pointer of a 3dim array of a size (0:map_size-1,1:ncomp,1:nmaps) storing the distributed map.
Comments:

  • On all procs the distributed map, local_map, is made of complete rings of both northern and southern hemispheres with numbers falling between first_ring and the last_ring, inclusive.




  • Next: distribute_mask    Up: Gather/scatter routines    Previous: distribute_map

    radek stompor 2008-10-22