OpenAtom  Version1.5a
map.C File Reference

The maps are intended to spread load around evenly and keep plane and state objects which communicate across phases close together. More...

#include <cmath>
#include "charm++.h"
#include "ckarray.h"
#include "util.h"
#include "main/cpaimd.h"
#include "main/groups.h"
#include "fft_slab_ctrl/fftCacheSlab.h"
#include "cp_state_plane/CP_State_Plane.h"

Go to the source code of this file.

Functions

void GSpacePlaneLoad (int, double *, double *)
 void hackGSpacePlaneLoad(CPcharmParaInfo *sim,int idx, double *line_load, double *pt_load);
 
int basicMap (CkArrayIndex2D &idx2d, int numPlanes)
 Void allocate each state to more than one processor. More...
 
double scalc_load (int x, int numplanes, double *load)
 

Variables

int sizeX
 
Config config
 

Detailed Description

The maps are intended to spread load around evenly and keep plane and state objects which communicate across phases close together.

It basically uses this key idea pe = cumload / average_load so cumload depends on the object list traversal. For plane wise we traverse it plane wise and for state wise do it states in the first loop and planes in the second loop. For hybrid map, it partitions states and processors in to K partitions k = numpes/pesperstate so apply the cumulative load logic in each partition, and add the start pe of the partition to it

cumload is the cumulative load till that object average load is the total_load/numpes

Assuming object s1,p1 is being inserted s1 is a state and p1 is a plane the map will use a certain traversal through object space for state map it will traverse all objects state by state hence cumload = load_sum { s1 * numplanesperstate + p1} for gspace it will be a loop as each plane has a different load.

Definition in file map.C.

Function Documentation

int basicMap ( CkArrayIndex2D &  idx2d,
int  numPlanes 
)

Void allocate each state to more than one processor.

Hybrid between state allocation and plane allocation

Definition at line 102 of file map.C.