COMBINATORIAL_BLAS  1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
DistEdgeList.cpp File Reference
#include <mpi.h>
#include "SpParMat.h"
#include "ParFriends.h"
#include "Operations.h"
#include "graph500-1.2/generator/graph_generator.h"
#include "graph500-1.2/generator/utils.h"
#include "RefGen21.h"
#include <fstream>
#include <algorithm>

Go to the source code of this file.

Functions

template<typename IT >
void PermEdges (DistEdgeList< IT > &DEL)
template<typename IU >
void RenameVertices (DistEdgeList< IU > &DEL)

Function Documentation

template<typename IT >
void PermEdges ( DistEdgeList< IT > &  DEL)

Randomly permutes the distributed edge list. Once we call Viral's psort on this vector, everything will go to the right place [tuples are sorted lexicographically] and you can reconstruct the int64_t * edges in an embarrassingly parallel way. As I understood, the entire purpose of this function is to destroy any locality. It does not rename any vertices and edges are not named anyway. For an example, think about the edge (0,1). It will eventually (at the end of kernel 1) be owned by processor P(0,0). However, assume that processor P(r1,c1) has a copy of it before the call to PermEdges. After this call, some other irrelevant processor P(r2,c2) will own it. So we gained nothing, it is just a scrambled egg.

Definition at line 282 of file DistEdgeList.cpp.

template<typename IU >
void RenameVertices ( DistEdgeList< IU > &  DEL)

Rename vertices globally. You first need to do create a random permutation distributed on all processors. Then the p round robin algorithm will do the renaming: For all processors P(i,i) Broadcast local_p to all p processors For j= i*N/p to min((i+1)*N/p, N) Rename the all j's with local_p(j) inside the edgelist (and mark them "renamed" so that yeach vertex id is renamed only once)

Definition at line 348 of file DistEdgeList.cpp.