48 #define SIMULATED_LOAD
52 #define printfRootInternal(...) { if( hit_Rank == 0 ) { printf(__VA_ARGS__); fflush(stdout); }}
53 #define printfRoot(...) printfRootInternal(__VA_ARGS__)
92 #define ITERATIONS 100
97 #define INIT_VALUES 10
110 #ifdef SIMULATED_LOAD
120 int main(
int argc,
char ** argv){
126 char * graph_file = NULL;
135 while ((c = (
char) getopt (argc, argv,
"i:s:")) != -1)
138 sscanf(optarg,
"%d",&iterations);
140 #ifdef SIMULATED_LOAD
156 graph_file = argv[optind];
162 printfRoot(
"Graph: %s, Iter: %d\n",graph_file,iterations);
176 lay =
hit_layout(plug_layMetis,topo,&shape_global);
183 HitTile_double
graph;
235 printf(
"%s [-i ITERATIONS] FILE \n",name);
237 printf(
" -i ITERATIONS number of iterations (default 100)\n");
238 printf(
" FILE input graph file\n");
267 int mod = last - first;
269 int in = first + (int)random() % mod;
305 #ifdef SIMULATED_LOAD
308 value = sin(value+1);
328 HitTile_double sum, sum_all;
void print_help(char *name)
#define hit_layShape(lay)
#define hit_cShapeNEdgesFromVertex(s, vertex)
#define hit_tileNewType(baseType)
#define hit_cShapeEdgeTarget(s, edge)
HitCom hit_comSparseUpdate(HitLayout lay, const void *tileP, HitType baseType)
void hit_comOpSumDouble(void *, void *, int *, HitType *)
#define hit_cShapeVertexIterator(var, shape)
#define hit_tileElemAt(var, ndims,...)
#define HIT_LAYOUT_NULL_STATIC
double result_check(HitShape shape, HitTile_double graph)
void hit_comFree(HitCom issue)
void hit_comDo(HitCom *issue)
#define hit_tileDomainAlloc(newVarP, baseType, numDims,...)
#define hit_topology(name,...)
#define hit_cShapeEdgeIterator(var, shape, vertex)
#define hit_gcTileDomainShapeAlloc(var, baseType, shape, allocOpts)
void hit_comUpdateOriginData(HitCom *com, const void *tileP)
#define hit_gcTileVertexAt(var, vertex)
HitShape hit_cShapeExpand(HitShape shape, HitShape original, int amount)
#define hit_cShapeNvertices(shape)
#define hit_cShapeVertexToLocal(s, vertex)
void hit_topFree(HitTopology topo)
#define hit_comOp(function, operation)
void hit_comInit(int *pargc, char **pargv[])
HitTile_double heat_iteration(HitShape shape, HitTile_double graph)
#define hit_fileHBRead(hbfile)
void hit_layFree(HitLayout lay)
int main(int argc, char *argv[])
#define hit_comReduce(lay, root, tilePSend, tilePRecv, baseType, operation)
void init_graph(HitTile_double graph, HitShape shape_global)
#define hit_layout(name, topo,...)
#define hit_tileFree(var)
void hit_shapeFree(HitShape s)
#define hit_tileShape(var)
#define hit_clockGetSeconds(c)
#define hit_clockStart(c)