Beispiel #1
0
graphlib_graph_p createRootedGraph(unsigned int sampleType)
{
    graphlib_error_t graphlibError;
    graphlib_graph_p retGraph = NULL;

    if (sampleType & STAT_SAMPLE_COUNT_REP)
        graphlibError = graphlib_newGraph(&retGraph, gStatCountRepFunctions);
    else
        graphlibError = graphlib_newGraph(&retGraph, gStatBitVectorFunctions);
    if (GRL_IS_FATALERROR(graphlibError))
    {
        fprintf(stderr, "Error creating new graph\n");
        return NULL;
    }

    graphlib_nodeattr_t nodeAttr = {1, 0, 20, GRC_LIGHTGREY, 0, 0, (char *)"/", -1};
    graphlibError = graphlib_addNode(retGraph, 0, &nodeAttr);
    if (GRL_IS_FATALERROR(graphlibError))
    {
        fprintf(stderr, "Error adding sentinel node to graph\n");
        return NULL;
    }
    return retGraph;
}
Beispiel #2
0
void COMM_ALL_INIT(int argc, char **argv)
{
  PMPI_Comm_size(MPI_COMM_WORLD, &critpath_tasks);
  PMPI_Comm_rank(MPI_COMM_WORLD, &critpath_myid);

  local_timestamp = 0;
  critpath = 1;
  after_barrier = 0;
  barrier_number = 1;

  graphlib_newGraph(&lgr);

  barrier_number = 0;
  //  cp_setnode(-1,-1,-1,0);

  barrier_number = 1;
  cp_setnode(-1, local_timestamp, -1, critpath);
  after_barrier = 1;
  barrier_number++;
}