fpmas 1.6
Classes | Functions | Variables
fpmas::graph::zoltan Namespace Reference

Classes

struct  ZoltanData
 

Functions

void zoltan_config (Zoltan *zz)
 
DistributedId read_zoltan_id (const ZOLTAN_ID_PTR global_ids)
 
void write_zoltan_id (DistributedId id, ZOLTAN_ID_PTR global_ids)
 
template<typename T >
void obj_size (void *data, int num_gid_entries, int, int num_ids, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR, int *sizes, int *)
 
template<typename T >
int num_obj (void *data, int *)
 
template<typename T >
void obj_list (void *data, int num_gid_entries, int, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR, int, float *obj_wgts, int *)
 
template<typename T >
void num_edges_multi_fn (void *data, int, int, int num_obj, ZOLTAN_ID_PTR, ZOLTAN_ID_PTR, int *num_edges, int *)
 
template<typename T >
void edge_list_multi_fn (void *data, int num_gid_entries, int, int num_obj, ZOLTAN_ID_PTR, ZOLTAN_ID_PTR, int *, ZOLTAN_ID_PTR nbor_global_id, int *nbor_procs, int, float *ewgts, int *)
 
template<typename T >
int num_fixed_obj_fn (void *data, int *)
 
template<typename T >
void fixed_obj_list_fn (void *data, int, int num_gid_entries, ZOLTAN_ID_PTR fixed_gids, int *fixed_parts, int *)
 

Variables

constexpr int NUM_GID_ENTRIES = num_gid_entries<>()
 

Detailed Description

Namespace containing Zoltan query functions definitions and utilities.

Function Documentation

◆ zoltan_config()

void fpmas::graph::zoltan::zoltan_config ( Zoltan *  zoltan)

Applies the FPMAS pre-defined Zoltan configuration to the provided Zoltan instance.

Parameters
zoltanpointer to zoltan instance to configure

◆ read_zoltan_id()

DistributedId fpmas::graph::zoltan::read_zoltan_id ( const ZOLTAN_ID_PTR  global_ids)

Helper function to rebuild a regular node or edge id, as an unsigned long, from a ZOLTAN_ID_PTR global id array, that actually stores 2 unsigned int for each node unsigned long id. So, with our configuration, we use 2 unsigned int in Zoltan to represent each id. The i input parameter should correspond to the first part index of the node to query in the global_ids array. In consequence, i should actually always be even.

Parameters
global_idsan adress to a pair of Zoltan global ids
Returns
rebuilt node id

◆ write_zoltan_id()

void fpmas::graph::zoltan::write_zoltan_id ( DistributedId  id,
ZOLTAN_ID_PTR  global_ids 
)

Writes zoltan global ids to the specified global_ids adress.

The original unsigned long is decomposed into 2 unsigned int to fit the default Zoltan data structure. The written id can then be rebuilt using the node_id(const ZOLTAN_ID_PTR) function.

Parameters
idid to write
global_idsadress to a Zoltan global_ids array

◆ obj_size()

template<typename T >
void fpmas::graph::zoltan::obj_size ( void *  data,
int  num_gid_entries,
int  ,
int  num_ids,
ZOLTAN_ID_PTR  global_ids,
ZOLTAN_ID_PTR  ,
int *  sizes,
int *   
)

Evaluates the migration cost of nodes represented by global_ids.

Currently, the migration cost is computed as 1+n_edges, where n_edges is the count of incoming and outgoing edges from the node. This cost thus represents the amount of items to migrate if the node is assigned to an other process.

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (ZoltanData)
num_gid_entriesnumber of entries used to describe global ids
num_idsnumber of objects IDs in global_ids
global_idsnode ids
sizesmigration costs of nodes in global_ids

◆ num_obj()

template<typename T >
int fpmas::graph::zoltan::num_obj ( void *  data,
int *   
)

Returns the number of nodes currently managed by the current processor (i.e. the number of nodes contained in the local DistributedGraphBase instance).

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (ZoltanData)
Returns
number of nodes managed by the current process

◆ obj_list()

template<typename T >
void fpmas::graph::zoltan::obj_list ( void *  data,
int  num_gid_entries,
int  ,
ZOLTAN_ID_PTR  global_ids,
ZOLTAN_ID_PTR  ,
int  ,
float *  obj_wgts,
int *   
)

Lists node ids contained on the current process (i.e. in the DistributedGraphBase instance associated to the process).

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (ZoltanData)
num_gid_entriesnumber of entries used to describe global ids
global_idsoutput : global ids assigned to processor
obj_wgtsoutput : weights list

◆ num_edges_multi_fn()

template<typename T >
void fpmas::graph::zoltan::num_edges_multi_fn ( void *  data,
int  ,
int  ,
int  num_obj,
ZOLTAN_ID_PTR  ,
ZOLTAN_ID_PTR  ,
int *  num_edges,
int *   
)

Counts the number of outgoing edges of each node.

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (ZoltanData)
num_objnumber of objects IDs in global_ids
num_edgesoutput : number of outgoing edge for each node

◆ edge_list_multi_fn()

template<typename T >
void fpmas::graph::zoltan::edge_list_multi_fn ( void *  data,
int  num_gid_entries,
int  ,
int  num_obj,
ZOLTAN_ID_PTR  ,
ZOLTAN_ID_PTR  ,
int *  ,
ZOLTAN_ID_PTR  nbor_global_id,
int *  nbor_procs,
int  ,
float *  ewgts,
int *   
)

Lists node IDs connected to each node through outgoing edges for each node.

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (ZoltanData)
num_gid_entriesnumber of entries used to describe global ids
num_objnumber of objects IDs in global_ids
nbor_global_idoutput : neighbor ids for each node
nbor_procsoutput : processor identifier of each neighbor in nbor_global_id
ewgtsoutput : edge weight for each neighbor

◆ num_fixed_obj_fn()

template<typename T >
int fpmas::graph::zoltan::num_fixed_obj_fn ( void *  data,
int *   
)

Counts the number of fixed vertices.

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (current fixed NodeMap)

◆ fixed_obj_list_fn()

template<typename T >
void fpmas::graph::zoltan::fixed_obj_list_fn ( void *  data,
int  ,
int  num_gid_entries,
ZOLTAN_ID_PTR  fixed_gids,
int *  fixed_parts,
int *   
)

Lists fixed vertices IDs.

For more information about this function, see the Zoltan documentation.

Parameters
datauser data (current fixed NodeMap)
num_gid_entriesnumber of entries used to describe global ids
fixed_gidsoutput : fixed vertices ids list
fixed_partsoutput : parts to which each fixed vertices is associated. In out context, corresponds to the process rank to which each vertice is attached.

Variable Documentation

◆ NUM_GID_ENTRIES

constexpr int fpmas::graph::zoltan::NUM_GID_ENTRIES = num_gid_entries<>()
constexpr

NUM_GID_ENTRIES Zoltan parameter.

The value is automatically computed to be compatible with the FPMAS_ID_TYPE.