35#ifndef GRAPH_GENERATOR_SEQ
36#define GRAPH_GENERATOR_SEQ
39#include "graph500/generator/graph_generator.h"
40#include "graph500/generator/utils.h"
82 oput <<
"File exists" << std::endl;
83 oput <<
"Trying to read " << nedges <<
" edges out of " <<
globalm << std::endl;
87 oput <<
"File does not exist" << std::endl;
95 oput <<
"Freads done " << std::endl;
96 for(
IT i=0; i< 2*nedges; ++i)
97 edges[i] = (
IT) gen_edges[i];
98 oput <<
"Puts done " << std::endl;
108template <
typename IT>
131template <
typename IT>
161template <
typename IT>
164 if(edges)
delete [] edges;
165 if(pedges)
delete [] pedges;
169template <
typename IT>
182 edges =
new IT[2*memedges];
189template <
typename IT>
194 while (nedges > 0 && edges[2*(nedges-1) + 0] == -1)
200 for (
IT i = 0; i < (nedges-1); i++)
202 if (edges[2*i + 0] == -1)
206 edges[2*i + 0] = edges[2*(nedges-1) + 0];
207 edges[2*i + 1] = edges[2*(nedges-1) + 1];
208 edges[2*(nedges-1) + 0] = -1;
210 while (nedges > 0 && edges[2*(nedges-1) + 0] == -1)
222template <
typename IT>
227 SpParHelper::Print(
"WARNING: Packed version does always generate scrambled vertex identifiers\n");
267 for (
IT i = 0; i < nedges; i++)
273 for(
IT i=0; i < nedges; ++i)
293template <
typename IT>
323 std::pair<double, std::pair<IT,IT> >*
vecpair =
new std::pair<double, std::pair<IT,IT> >[
n_thisstage];
346 timeinfo <<
"Stage " << s <<
" in " <<
et-
st <<
" seconds" << std::endl;
363template <
typename IU>
void GenGraph500Data(double initiator[4], int log_numverts, int edgefactor, bool scramble=false, bool packed=false)
void Dump64bit(std::string filename)
IT getNumLocalEdges() const
void Dump32bit(std::string filename)
std::shared_ptr< CommGrid > commGrid
int64_t getGlobalV() const
static mrg_state MakeScrambleValues(uint64_t &val0, uint64_t &val1, const uint_fast32_t seed[])
static int64_t scramble(int64_t v0, int lgN, uint64_t val0, uint64_t val1)
static void make_graph(int log_numverts, int64_t M, int64_t *nedges_ptr, packed_edge **result_ptr, MPI_Comm &world)
static void Print(const std::string &s)
static void MemoryEfficientPSort(std::pair< KEY, VAL > *array, IT length, IT *dist, const MPI_Comm &comm)
void generate_kronecker(int rank, int size, const uint_fast32_t seed[5], int logN, int64_t M, const double initiator[], int64_t *const edges)
void make_mrg_seed(uint64_t userseed1, uint64_t userseed2, uint_fast32_t *seed)
void PermEdges(DistEdgeList< IT > &DEL)
void RenameVertices(DistEdgeList< IU > &DEL)
unsigned __int64 uint64_t