filename stringlengths 19 182 | omp_pragma_line stringlengths 24 416 | context_chars int64 100 100 | text stringlengths 152 177k |
|---|---|---|---|
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices) | 100 | ---------------------------------------------\n");
Start(timer);
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
aResiduals[v] = 0.0;
workListCurr[v] = 1;
workListNext[v] = 0;
activeVertices++;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->edges_array_dest[j];
if(graph->vertices[u].out_degree)
aResiduals[v] += 1.0f / graph->vertices[u].out_degree; // sum (PRi/outDegree(i))
}
aResiduals[v] = (1.0f - stats->damp) * stats->damp * aResiduals[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024) | 100 | ++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(workListCurr[v])
{
float oldPageRank = stats->pageRanks[v];
float newPageRank = aResiduals[v] + stats->pageRanks[v];
error_total += fabs(newPageRank / graph->num_vertices - oldPageRank / graph->num_vertices);
// #pragma omp atomic write
stats->pageRanks[v] = newPageRank;
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
float delta = stats->damp * (aResiduals[v] / degree);
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->edges_array_dest[j];
float prevResidual = 0.0f;
prevResidual = aResiduals[u];
#pragma omp atomic update
aResiduals[u] += delta;
if ((fabs(prevResidual + delta) >= arguments->epsilon) && (prevResidual <= arguments->epsilon))
{
activeVertices++;
if(!workListNext[u])
{
// #pragma omp atomic write
workListNext[u] = 1;
}
}
}
aResiduals[v] = 0.0f;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices) | 100 | --------------------------------------------\n");
Start(timer);
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
aResiduals[v] = 0.0f;
workListCurr[v] = 1;
workListNext[v] = 0;
activeVertices++;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->edges_array_dest[j];
if(graph->vertices[u].out_degree)
aResiduals[v] += 1.0f / graph->vertices[u].out_degree; // sum (PRi/outDegree(i))
}
aResiduals[v] = (1.0f - stats->damp) * stats->damp * aResiduals[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024) | 100 | ++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(workListCurr[v])
{
float nodeIncomingPR = 0.0f;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->edges_array_dest[j];
nodeIncomingPR += stats->pageRanks[u] / graph->vertices[u].out_degree;
}
float newPageRank = stats->base_pr + (stats->damp * nodeIncomingPR);
float oldPageRank = stats->pageRanks[v];
// float newPageRank = aResiduals[v]+pageRanks[v];
error_total += fabs(newPageRank / graph->num_vertices - oldPageRank / graph->num_vertices);
#pragma omp atomic write
stats->pageRanks[v] = newPageRank;
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
float delta = stats->damp * (aResiduals[v] / degree);
for(j = 0 ; j < (degree) ; j++)
{
uint32_t u = Nodes->edges_array_dest[j];
float prevResidual = 0.0f;
prevResidual = aResiduals[u];
#pragma omp atomic update
aResiduals[u] += delta;
if ((fabs(prevResidual + delta) >= arguments->epsilon) && (prevResidual <= arguments->epsilon))
{
activeVertices++;
if(!workListNext[u])
{
workListNext[u] = 1;
}
}
}
aResiduals[v] = 0.0f;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v) shared(graph,pageRanksNext) | 100 | )");
printf(" -----------------------------------------------------\n");
Start(timer);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
pageRanksNext[v] = 0;
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v) shared(graph,pageRanksNext)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for | 100 | s++)
{
error_total = 0;
activeVertices = 0;
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(graph->vertices[v].out_degree)
riDividedOnDiClause[v] = stats->pageRanks[v] / graph->vertices[v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+ : error_total,activeVertices) private(v,j,u,degree,Nodes) schedule(dynamic, 1024) | 100 | s[v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float nodeIncomingPR = 0.0f;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
nodeIncomingPR += riDividedOnDiClause[u]; // stats->pageRanks[v]/graph->vertices[v].out_degree;
}
pageRanksNext[v] = nodeIncomingPR;
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+ : error_total,activeVertices) private(v,j,u,degree,Nodes) schedule(dynamic, 1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices) | 100 | ces[v].out_degree;
}
pageRanksNext[v] = nodeIncomingPR;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float prevPageRank = stats->pageRanks[v];
float nextPageRank = stats->base_pr + (stats->damp * pageRanksNext[v]);
stats->pageRanks[v] = nextPageRank;
pageRanksNext[v] = 0.0f;
double error = fabs( nextPageRank - prevPageRank);
error_total += (error / graph->num_vertices);
if(error >= arguments->epsilon)
{
activeVertices++;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(i) shared(graph,vertex_lock) | 100 | lock_t *vertex_lock = (omp_lock_t *) my_malloc( graph->num_vertices * sizeof(omp_lock_t));
<LOOP-START>for (i = 0; i < graph->num_vertices; i++)
{
omp_init_lock(&(vertex_lock[i]));
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(i) shared(graph,vertex_lock)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v) shared(pageRanksNext,graph) | 100 | );
printf(" -----------------------------------------------------\n");
Start(timer);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
pageRanksNext[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v) shared(pageRanksNext,graph)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(riDividedOnDiClause,stats,graph) | 100 | s++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(graph->vertices[v].out_degree)
riDividedOnDiClause[v] = stats->pageRanks[v] / graph->vertices[v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(riDividedOnDiClause,stats,graph)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v,Nodes) shared(graph,pageRanksNext,riDividedOnDiClause) schedule(dynamic, 1024) | 100 | [v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
Nodes = graph->vertices[v].outNodes;
uint32_t degree = graph->vertices[v].out_degree;
// uint32_t tid = omp_get_thread_num();
uint32_t j;
for(j = 0 ; j < (degree) ; j++)
{
uint32_t u = Nodes->dest;
Nodes = Nodes->next;
// omp_set_lock(&(vertex_lock[u]));
// pageRanksNext[u] += riDividedOnDiClause[v];
// omp_unset_lock((&vertex_lock[u]));
#pragma omp atomic update
pageRanksNext[u] += riDividedOnDiClause[v];
// __atomic_fetch_add(&pageRanksNext[u], riDividedOnDiClause[v], __ATOMIC_RELAXED);
// printf("tid %u degree %u edge_idx %u v %u u %u \n",tid,degree,edge_idx,v,u );
// addAtomicFloat(&pageRanksNext[u] , riDividedOnDiClause[v]);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v,Nodes) shared(graph,pageRanksNext,riDividedOnDiClause) schedule(dynamic, 1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices) | 100 | // addAtomicFloat(&pageRanksNext[u] , riDividedOnDiClause[v]);
}
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float prevPageRank = stats->pageRanks[v];
float nextPageRank = stats->base_pr + (stats->damp * pageRanksNext[v]);
stats->pageRanks[v] = nextPageRank;
pageRanksNext[v] = 0.0f;
double error = fabs( nextPageRank - prevPageRank);
error_total += (error / graph->num_vertices);
if(error >= arguments->epsilon)
{
activeVertices++;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for | 100 | -----------------------------------\n");
// pageRankPrint(pageRanks, graph->num_vertices);
<LOOP-START>for (i = 0; i < graph->num_vertices; i++)
{
omp_destroy_lock(&(vertex_lock[i]));
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v) shared(graph,pageRanksNext) | 100 | )");
printf(" -----------------------------------------------------\n");
Start(timer);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
pageRanksNext[v] = 0;
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v) shared(graph,pageRanksNext)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for | 100 | s++)
{
error_total = 0;
activeVertices = 0;
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(graph->vertices[v].out_degree)
riDividedOnDiClause[v] = DoubleToFixed64(stats->pageRanks[v] / graph->vertices[v].out_degree);
else
riDividedOnDiClause[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+ : error_total,activeVertices) private(v,j,u,degree,Nodes) schedule(dynamic, 1024) | 100 | [v].out_degree);
else
riDividedOnDiClause[v] = 0.0f;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float nodeIncomingPR = 0.0f;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
nodeIncomingPR += riDividedOnDiClause[u]; // stats->pageRanks[v]/graph->vertices[v].out_degree;
}
pageRanksNext[v] = nodeIncomingPR;
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+ : error_total,activeVertices) private(v,j,u,degree,Nodes) schedule(dynamic, 1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices) | 100 | ces[v].out_degree;
}
pageRanksNext[v] = nodeIncomingPR;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float prevPageRank = stats->pageRanks[v];
float nextPageRank = stats->base_pr + (stats->damp * Fixed64ToDouble(pageRanksNext[v]));
stats->pageRanks[v] = nextPageRank;
pageRanksNext[v] = 0.0f;
double error = fabs( nextPageRank - prevPageRank);
error_total += (error / graph->num_vertices);
if(error >= arguments->epsilon)
{
activeVertices++;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(i) shared(graph,vertex_lock) | 100 | lock_t *vertex_lock = (omp_lock_t *) my_malloc( graph->num_vertices * sizeof(omp_lock_t));
<LOOP-START>for (i = 0; i < graph->num_vertices; i++)
{
omp_init_lock(&(vertex_lock[i]));
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(i) shared(graph,vertex_lock)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v) shared(pageRanksNext,graph) | 100 | );
printf(" -----------------------------------------------------\n");
Start(timer);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
pageRanksNext[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v) shared(pageRanksNext,graph)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(riDividedOnDiClause,stats,graph) | 100 | s++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(graph->vertices[v].out_degree)
riDividedOnDiClause[v] = DoubleToFixed64(stats->pageRanks[v] / graph->vertices[v].out_degree);
else
riDividedOnDiClause[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(riDividedOnDiClause,stats,graph)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(v,Nodes) shared(graph,pageRanksNext,riDividedOnDiClause) schedule(dynamic, 1024) | 100 | v].out_degree);
else
riDividedOnDiClause[v] = 0.0f;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
Nodes = graph->vertices[v].outNodes;
uint32_t degree = graph->vertices[v].out_degree;
// uint32_t tid = omp_get_thread_num();
uint32_t j;
for(j = 0 ; j < (degree) ; j++)
{
uint32_t u = Nodes->dest;
Nodes = Nodes->next;
// omp_set_lock(&(vertex_lock[u]));
// pageRanksNext[u] += riDividedOnDiClause[v];
// omp_unset_lock((&vertex_lock[u]));
#pragma omp atomic update
pageRanksNext[u] += riDividedOnDiClause[v];
// __atomic_fetch_add(&pageRanksNext[u], riDividedOnDiClause[v], __ATOMIC_RELAXED);
// printf("tid %u degree %u edge_idx %u v %u u %u \n",tid,degree,edge_idx,v,u );
// addAtomicFloat(&pageRanksNext[u] , riDividedOnDiClause[v]);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(v,Nodes) shared(graph,pageRanksNext,riDividedOnDiClause) schedule(dynamic, 1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices) | 100 | // addAtomicFloat(&pageRanksNext[u] , riDividedOnDiClause[v]);
}
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
float prevPageRank = stats->pageRanks[v];
float nextPageRank = stats->base_pr + (stats->damp * Fixed64ToDouble(pageRanksNext[v]));
stats->pageRanks[v] = nextPageRank;
pageRanksNext[v] = 0.0f;
double error = fabs( nextPageRank - prevPageRank);
error_total += (error / graph->num_vertices);
if(error >= arguments->epsilon)
{
activeVertices++;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for private(v) shared(arguments, pageRanksNext,stats) reduction(+ : error_total, activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for | 100 | -----------------------------------\n");
// pageRankPrint(pageRanks, graph->num_vertices);
<LOOP-START>for (i = 0; i < graph->num_vertices; i++)
{
omp_destroy_lock(&(vertex_lock[i]));
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:activeVertices) | 100 | ----------------------------------------------\n");
Start(timer);
Start(timer_inner);
<LOOP-START>for(i = 0; i < graph->num_vertices; i++)
{
workListNext[i] = 1;
activeVertices++;
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for | 100 | ++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(graph->vertices[v].out_degree)
riDividedOnDiClause[v] = stats->pageRanks[v] / graph->vertices[v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) shared(arguments, riDividedOnDiClause, workListCurr, workListNext, stats, graph) private(v,Nodes) reduction(+:activeVertices,error_total) schedule(dynamic, 1024) | 100 | s[v].out_degree;
else
riDividedOnDiClause[v] = 0.0f;
}
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(workListCurr[v])
{
uint32_t degree;
uint32_t j;
uint32_t u;
double error = 0;
float nodeIncomingPR = 0;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
nodeIncomingPR += riDividedOnDiClause[u]; // sum (PRi/outDegree(i))
}
float oldPageRank = stats->pageRanks[v];
float newPageRank = stats->base_pr + (stats->damp * nodeIncomingPR);
error = fabs(newPageRank - oldPageRank);
error_total += error / graph->num_vertices;
if(error >= arguments->epsilon)
{
stats->pageRanks[v] = newPageRank;
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
#pragma omp atomic write
workListNext[u] = 1;
// uint8_t old_val = workListNext[u];
// if(!old_val){
// __sync_bool_compare_and_swap(&workListNext[u], 0, 1);
// }
}
activeVertices++;
}
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) shared(arguments, riDividedOnDiClause, workListCurr, workListNext, stats, graph) private(v,Nodes) reduction(+:activeVertices,error_total) schedule(dynamic, 1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices) | 100 | --------------------------------------------\n");
Start(timer);
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
aResiduals[v] = 0.0;
workListCurr[v] = 1;
workListNext[v] = 0;
activeVertices++;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
if(graph->vertices[u].out_degree)
aResiduals[v] += 1.0f / graph->vertices[u].out_degree; // sum (PRi/outDegree(i))
}
aResiduals[v] = (1.0f - stats->damp) * stats->damp * aResiduals[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(Nodes,degree,v,j,u) shared(workListCurr,workListNext,aResiduals) reduction(+:activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024) | 100 | ++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(workListCurr[v])
{
float oldPageRank = stats->pageRanks[v];
float newPageRank = aResiduals[v] + stats->pageRanks[v];
error_total += fabs(newPageRank / graph->num_vertices - oldPageRank / graph->num_vertices);
// #pragma omp atomic write
stats->pageRanks[v] = newPageRank;
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
float delta = stats->damp * (aResiduals[v] / degree);
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
float prevResidual = 0.0f;
prevResidual = aResiduals[u];
#pragma omp atomic update
aResiduals[u] += delta;
if ((fabs(prevResidual + delta) >= arguments->epsilon) && (prevResidual <= arguments->epsilon))
{
activeVertices++;
if(!workListNext[u])
{
// #pragma omp atomic write
workListNext[u] = 1;
}
}
}
aResiduals[v] = 0.0f;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for private(Nodes,degree,v,j,u) shared(stats,workListCurr,workListNext,aResiduals) reduction(+:activeVertices) | 100 | --------------------------------------------\n");
Start(timer);
Start(timer_inner);
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
aResiduals[v] = 0.0f;
workListCurr[v] = 1;
workListNext[v] = 0;
activeVertices++;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
if(graph->vertices[u].out_degree)
aResiduals[v] += 1.0f / graph->vertices[u].out_degree; // sum (PRi/outDegree(i))
}
aResiduals[v] = (1.0f - stats->damp) * stats->damp * aResiduals[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(Nodes,degree,v,j,u) shared(stats,workListCurr,workListNext,aResiduals) reduction(+:activeVertices)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024) | 100 | ++)
{
Start(timer_inner);
error_total = 0;
activeVertices = 0;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
if(workListCurr[v])
{
float nodeIncomingPR = 0.0f;
#if DIRECTED // will look at the other neighbours if directed by using inverese edge list
Nodes = graph->vertices[v].inNodes;
degree = graph->vertices[v].in_degree;
#else
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
nodeIncomingPR += stats->pageRanks[u] / graph->vertices[u].out_degree;
}
float newPageRank = stats->base_pr + (stats->damp * nodeIncomingPR);
float oldPageRank = stats->pageRanks[v];
// float newPageRank = aResiduals[v]+pageRanks[v];
error_total += fabs(newPageRank / graph->num_vertices - oldPageRank / graph->num_vertices);
#pragma omp atomic write
stats->pageRanks[v] = newPageRank;
Nodes = graph->vertices[v].outNodes;
degree = graph->vertices[v].out_degree;
float delta = stats->damp * (aResiduals[v] / degree);
for(j = 0 ; j < (degree) ; j++)
{
u = Nodes->dest;
Nodes = Nodes->next;
float prevResidual = 0.0f;
prevResidual = aResiduals[u];
#pragma omp atomic update
aResiduals[u] += delta;
if ((fabs(prevResidual + delta) >= arguments->epsilon) && (prevResidual <= arguments->epsilon))
{
activeVertices++;
if(!workListNext[u])
{
workListNext[u] = 1;
}
}
}
aResiduals[v] = 0.0f;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) private(Nodes,degree,v,j,u) shared(stats,arguments,graph,workListCurr,workListNext,aResiduals) reduction(+:error_total,activeVertices) schedule(dynamic,1024)<OMP-END> |
atmughrabi/OpenGraphSim/00_graph_bench/src/algorithms/openmp/pageRank.c | #pragma omp parallel for reduction(+:sum) | 100 | if(activeVertices == 0)
break;
}// end iteration loop
double sum = 0.0f;
<LOOP-START>for(v = 0; v < graph->num_vertices; v++)
{
stats->pageRanks[v] = stats->pageRanks[v] / graph->num_vertices;
sum += stats->pageRanks[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum)<OMP-END> |
taeguk/dist-prog-assignment/assignment-4/p1/main.c | #pragma omp parallel for schedule(dynamic) | 100 | SIZE], float B[MATRIX_SIZE][MATRIX_SIZE])
{
double start, finish;
start = omp_get_wtime();
<LOOP-START>for(int r=0; r<MATRIX_SIZE; ++r) {
for(int c=0; c<MATRIX_SIZE; ++c) {
float res = 0.0f;
for(int k=0; k<MATRIX_SIZE; ++k) {
res += A[r][k] * B[k][c];
}
C[r][c] = res;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic)<OMP-END> |
taeguk/dist-prog-assignment/assignment-3/p2/example2_omp.cpp | #pragma omp parallel for schedule(runtime) num_threads(thread_cnt) | 100 | }
int *rand_num = new int[N];
for(int i=0; i<N; ++i)
rand_num[i] = rand();
<LOOP-START>for(int i=0; i<N; ++i)
{
int tid = omp_get_thread_num();
local_result[tid][0] = (local_result[tid][0] * rand_num[i]) % INT_MAX;
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(runtime) num_threads(thread_cnt)<OMP-END> |
taeguk/dist-prog-assignment/assignment-3/p2/example_omp.cpp | #pragma omp parallel for schedule(runtime) num_threads(thread_cnt) | 100 | /2.0;
const int maxiter = 100000;
double start, finish;
start = omp_get_wtime();
<LOOP-START>for(int pix=0; pix<num_pixels; ++pix)
{
const int x = pix%width, y = pix/width;
complex c = begin + complex(x * span.real() / (width +1.0),
y * span.imag() / (height+1.0));
int n = MandelbrotCalculate(c, maxiter);
if(n == maxiter) n = 0;
mandel_vals[y][x] = n;
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(runtime) num_threads(thread_cnt)<OMP-END> |
taeguk/dist-prog-assignment/assignment-3/p2/example3_omp.cpp | #pragma omp parallel for schedule(runtime) num_threads(thread_cnt) | 100 | t[cnt[i]];
for (int j = 0; j < cnt[i]; ++j)
rand_num[i][j] = rand();
}
<LOOP-START>for(int i=0; i<N; ++i)
{
int tid = omp_get_thread_num();
long long sum = 1;
for(int j=0; j<cnt[i]; ++j) {
sum += rand_num[i][j];
}
sum %= INT_MAX;
local_result[tid][0] = (local_result[tid][0] * sum) % INT_MAX;
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(runtime) num_threads(thread_cnt)<OMP-END> |
taeguk/dist-prog-assignment/assignment-3/p1/vec_parallel_optimized.cpp | #pragma omp parallel for reduction(+:palin_cnt) schedule(dynamic) num_threads(thread_cnt) | 100 | of());
}
vector<pair<int, int> > * results = new vector<pair<int, int> >[thread_cnt];
<LOOP-START>for (int i=0; i<words.size(); ++i) {
int tid = omp_get_thread_num();
string reverse_word(words[i]);
reverse(reverse_word.begin(), reverse_word.end());
vector<string>::iterator iter = find(words.begin(), words.begin() + i + 1, reverse_word);
if (iter != words.begin() + i + 1) {
results[tid].push_back(make_pair(iter - words.begin(), i));
++palin_cnt;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:palin_cnt) schedule(dynamic) num_threads(thread_cnt)<OMP-END> |
taeguk/dist-prog-assignment/assignment-3/p1/vec_parallel.cpp | #pragma omp parallel for reduction(+:palin_cnt) schedule(dynamic) num_threads(thread_cnt) | 100 | words.push_back(word);
ifs >> word;
} while (!ifs.eof());
}
<LOOP-START>for (int i=0; i<words.size(); ++i) {
string reverse_word(words[i]);
reverse(reverse_word.begin(), reverse_word.end());
vector<string>::iterator iter = find(words.begin(), words.begin() + i + 1, reverse_word);
if (iter != words.begin() + i + 1) {
#pragma omp critical(output)
ofs << reverse_word << " " << words[i] << endl;
++palin_cnt;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:palin_cnt) schedule(dynamic) num_threads(thread_cnt)<OMP-END> |
DLopezMadrid/tracerr/src/Render.cpp | #pragma omp parallel for | 100 | :move(shape));
}
}
float dir_x, dir_y, dir_z;
dir_z = -height_ / (2.f * tan(fov_ / 2.f));
<LOOP-START>for (int row = 0; row < height_; row++) {
dir_y = -(row + 0.5f) + height_ / 2.f;// this flips the image at the same time
for (int col = 0; col < width_; col++) {
dir_x = (col + 0.5f) - width_ / 2.f;
xyz dir{dir_x, dir_y, dir_z};
dir.normalize();
rgb_f pix = cast_ray(image_origin_, dir, 0);
rgb rgb_val = Material::vec2rgb(pix);
image_.SetPixelColor({col, row}, rgb_val);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Source Codes/C language/fox_floats_timer_caching_omp_fileIO.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Source Codes/C language/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Source Codes/C language/fox_floats_timer_caching_omp.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/256*256/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/128*128/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/512*512/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/8192*8192/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/4096*4096/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/64*64/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/16384*16384/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/1024*1024/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProblemScale/2048*2048/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon E5 CPUs/ProcessScale/4*4/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/256*256/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/128*128/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/512*512/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/8192*8192/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/4096*4096/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/64*64/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/1024*1024/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProblemScale/2048*2048/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/PKU-HPC/Testing on Intel Xeon Phi KNL MIC/ProcessScale/4*4*8/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
yangyang14641/Parallel-Matrix-Multiplication-FOX-Algorithm/Code Tests/Dell XPS8900/Testing on Intel Core i7 CPU/Trace Analyzer Test/fox_floats_timer_caching_omp_fileIO_benchmark.c | #pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) | 100 | m_rank(MPI_COMM_WORLD, &my_rank); // Get my process id in the MPI communicator
<LOOP-START>for (i = 0; i < Order(local_A); i++) {
// printf("Current in the Fox Kernel:\n my process id is %d, my thread id is %d\n",my_rank,omp_get_thread_num());
for (j = 0; j < Order(local_A); j++)
for (k = 0; k < Order(local_B); k++)
Entry(local_C,i,j) = Entry(local_C,i,j) // switch rows and colums in local_B, for column major storage
+ Entry(local_A,i,k)*Entry(local_B,j,k); // continuous memory access, local matrix multiplication A(i,k)*B^T(j,k)
/* Entry(local_C,i,j) = Entry(local_C,i,j)
+ Entry(local_A,i,k)*Entry(local_B,k,j); // non-continuous memory access, A(i,k)*B^T(j,k) is more proper
*/
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i, j, k) shared(local_A, local_B, local_C) num_threads(NUM_THREADS) <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/level.cpp | #pragma omp parallel for | 100 | st* zone element of first component to a 256-Byte boundary
uint64_t ofs;
#ifdef _OPENMP
<LOOP-START>for(ofs=0;ofs<(uint64_t)numVectors*level->num_my_boxes*level->box_volume;ofs++){tmpbuf[ofs]=0.0;}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/level.cpp | #pragma omp parallel for | 100 | box_volume*sizeof(double), level->um_access_policy);
uint64_t ofs;
#ifdef _OPENMP
<LOOP-START>for(ofs=0;ofs<(uint64_t)level->num_my_boxes*level->box_volume;ofs++){level->vectors[c][ofs]=0.0;}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/solvers/matmul.c | #pragma omp parallel for schedule(static,1) collapse(2) | 100 | ric [G,g], do the all_reduce on the upper triangle and then duplicate (saves BW)
#ifdef _OPENMP
<LOOP-START>for(mm=0;mm<rows;mm++){
for(nn=0;nn<cols;nn++){
if(nn>=mm){ // upper triangular
int box;
double a_dot_b_level = 0.0;
for(box=0;box<level->num_my_boxes;box++){
int i,j,k;
const int jStride = level->my_boxes[box].jStride;
const int kStride = level->my_boxes[box].kStride;
const int ghosts = level->my_boxes[box].ghosts;
const int dim = level->my_boxes[box].dim;
double * __restrict__ grid_a = level->my_boxes[box].vectors[id_A[mm]] + ghosts*(1+jStride+kStride); // i.e. [0] = first non ghost zone point
double * __restrict__ grid_b = level->my_boxes[box].vectors[id_B[nn]] + ghosts*(1+jStride+kStride);
double a_dot_b_box = 0.0;
for(k=0;k<dim;k++){
for(j=0;j<dim;j++){
for(i=0;i<dim;i++){
int ijk = i + j*jStride + k*kStride;
a_dot_b_box += grid_a[ijk]*grid_b[ijk];
}}}
a_dot_b_level+=a_dot_b_box;
}
C[mm*cols + nn] = a_dot_b_level; // C[mm][nn]
if((mm<cols)&&(nn<rows)){C[nn*cols + mm] = a_dot_b_level;}// C[nn][mm]
}
}}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) collapse(2)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/problem.fv.c | #pragma omp parallel for private(k,j,i) collapse(3) | 100 | level->my_boxes[box].dim;
const int dim_k = level->my_boxes[box].dim;
#ifdef _OPENMP
<LOOP-START>for(k=0;k<=dim_k;k++){ // include high face
for(j=0;j<=dim_j;j++){ // include high face
for(i=0;i<=dim_i;i++){ // include high face
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int ijk = (i+ghosts) + (j+ghosts)*jStride + (k+ghosts)*kStride;
double x = hLevel*( (double)(i+level->my_boxes[box].low.i) + 0.5 ); // +0.5 to get to the center of cell
double y = hLevel*( (double)(j+level->my_boxes[box].low.j) + 0.5 );
double z = hLevel*( (double)(k+level->my_boxes[box].low.k) + 0.5 );
double A,Bi,Bj,Bk;
//double A,B,Bx,By,Bz,Bi,Bj,Bk;
//double U,Ux,Uy,Uz,Uxx,Uyy,Uzz;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A = 1.0;
Bi = 1.0;
Bj = 1.0;
Bk = 1.0;
#ifdef STENCIL_VARIABLE_COEFFICIENT // variable coefficient problem...
Bi=evaluateBeta(x-hLevel*0.5,y ,z ,hLevel,0,1,1); // face-centered value of Beta for beta_i
Bj=evaluateBeta(x ,y-hLevel*0.5,z ,hLevel,1,0,1); // face-centered value of Beta for beta_j
Bk=evaluateBeta(x ,y ,z-hLevel*0.5,hLevel,1,1,0); // face-centered value of Beta for beta_k
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
double F=evaluateF(x,y,z,hLevel,1,1,1);
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
level->my_boxes[box].vectors[VECTOR_BETA_I][ijk] = Bi;
level->my_boxes[box].vectors[VECTOR_BETA_J][ijk] = Bj;
level->my_boxes[box].vectors[VECTOR_BETA_K][ijk] = Bk;
level->my_boxes[box].vectors[VECTOR_ALPHA ][ijk] = A;
level->my_boxes[box].vectors[VECTOR_UTRUE ][ijk] = 0.0;
level->my_boxes[box].vectors[VECTOR_F ][ijk] = F;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}}}<LOOP-END> <OMP-START>#pragma omp parallel for private(k,j,i) collapse(3)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/problem.p6.c | #pragma omp parallel for private(k,j,i) collapse(3) | 100 | level->my_boxes[box].dim;
const int dim_k = level->my_boxes[box].dim;
#ifdef _OPENMP
<LOOP-START>for(k=0;k<=dim_k;k++){ // include high face
for(j=0;j<=dim_j;j++){ // include high face
for(i=0;i<=dim_i;i++){ // include high face
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int ijk = (i+ghosts) + (j+ghosts)*jStride + (k+ghosts)*kStride;
double x = hLevel*( (double)(i+level->my_boxes[box].low.i) + 0.5 ); // +0.5 to get to the center of cell
double y = hLevel*( (double)(j+level->my_boxes[box].low.j) + 0.5 );
double z = hLevel*( (double)(k+level->my_boxes[box].low.k) + 0.5 );
double A,B,Bx,By,Bz,Bi,Bj,Bk;
double U,Ux,Uy,Uz,Uxx,Uyy,Uzz;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A = 1.0;
B = 1.0;
Bx = 0.0;
By = 0.0;
Bz = 0.0;
Bi = 1.0;
Bj = 1.0;
Bk = 1.0;
#ifdef STENCIL_VARIABLE_COEFFICIENT // variable coefficient problem...
evaluateBeta(x-hLevel*0.5,y ,z ,&Bi,&Bx,&By,&Bz); // face-centered value of Beta for beta_i
evaluateBeta(x ,y-hLevel*0.5,z ,&Bj,&Bx,&By,&Bz); // face-centered value of Beta for beta_j
evaluateBeta(x ,y ,z-hLevel*0.5,&Bk,&Bx,&By,&Bz); // face-centered value of Beta for beta_k
evaluateBeta(x ,y ,z ,&B ,&Bx,&By,&Bz); // cell-centered value of Beta
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
evaluateU(x,y,z,&U,&Ux,&Uy,&Uz,&Uxx,&Uyy,&Uzz, (level->boundary_condition.type == BC_PERIODIC) );
double F = a*A*U - b*( (Bx*Ux + By*Uy + Bz*Uz) + B*(Uxx + Uyy + Uzz) );
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
level->my_boxes[box].vectors[VECTOR_BETA_I][ijk] = Bi;
level->my_boxes[box].vectors[VECTOR_BETA_J][ijk] = Bj;
level->my_boxes[box].vectors[VECTOR_BETA_K][ijk] = Bk;
level->my_boxes[box].vectors[VECTOR_ALPHA ][ijk] = A;
level->my_boxes[box].vectors[VECTOR_UTRUE ][ijk] = U;
level->my_boxes[box].vectors[VECTOR_F ][ijk] = F;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}}}<LOOP-END> <OMP-START>#pragma omp parallel for private(k,j,i) collapse(3)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p0.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_f->interpolation.num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->interpolation.num_recvs;n++){
MPI_Irecv(level_f->interpolation.recv_buffers[n],
level_f->interpolation.recv_sizes[n],
MPI_DOUBLE,
level_f->interpolation.recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p0.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_c->interpolation.num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->interpolation.num_sends;n++){
MPI_Isend(level_c->interpolation.send_buffers[n],
level_c->interpolation.send_sizes[n],
MPI_DOUBLE,
level_c->interpolation.send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/problem.sine.c | #pragma omp parallel for private(k,j,i) collapse(3) | 100 | level->my_boxes[box].dim;
const int dim_k = level->my_boxes[box].dim;
#ifdef _OPENMP
<LOOP-START>for(k=0;k<=dim_k;k++){ // include high face
for(j=0;j<=dim_j;j++){ // include high face
for(i=0;i<=dim_i;i++){ // include high face
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int ijk = (i+ghosts) + (j+ghosts)*jStride + (k+ghosts)*kStride;
double x = hLevel*( (double)(i+level->my_boxes[box].low.i) + 0.5 ); // +0.5 to get to the center of cell
double y = hLevel*( (double)(j+level->my_boxes[box].low.j) + 0.5 );
double z = hLevel*( (double)(k+level->my_boxes[box].low.k) + 0.5 );
double A,B,Bx,By,Bz,Bi,Bj,Bk;
double U,Ux,Uy,Uz,Uxx,Uyy,Uzz;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A = 1.0;
B = 1.0;
Bx = 0.0;
By = 0.0;
Bz = 0.0;
Bi = 1.0;
Bj = 1.0;
Bk = 1.0;
#ifdef STENCIL_VARIABLE_COEFFICIENT // variable coefficient problem...
evaluateBeta(x-hLevel*0.5,y ,z ,&Bi,&Bx,&By,&Bz); // face-centered value of Beta for beta_i
evaluateBeta(x ,y-hLevel*0.5,z ,&Bj,&Bx,&By,&Bz); // face-centered value of Beta for beta_j
evaluateBeta(x ,y ,z-hLevel*0.5,&Bk,&Bx,&By,&Bz); // face-centered value of Beta for beta_k
evaluateBeta(x ,y ,z ,&B ,&Bx,&By,&Bz); // cell-centered value of Beta
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
evaluateU(x,y,z,&U,&Ux,&Uy,&Uz,&Uxx,&Uyy,&Uzz, (level->boundary_condition.type == BC_PERIODIC) );
double F = a*A*U - b*( (Bx*Ux + By*Uy + Bz*Uz) + B*(Uxx + Uyy + Uzz) );
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
level->my_boxes[box].vectors[VECTOR_BETA_I][ijk] = Bi;
level->my_boxes[box].vectors[VECTOR_BETA_J][ijk] = Bj;
level->my_boxes[box].vectors[VECTOR_BETA_K][ijk] = Bk;
level->my_boxes[box].vectors[VECTOR_ALPHA ][ijk] = A;
level->my_boxes[box].vectors[VECTOR_UTRUE ][ijk] = U;
level->my_boxes[box].vectors[VECTOR_F ][ijk] = F;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}}}<LOOP-END> <OMP-START>#pragma omp parallel for private(k,j,i) collapse(3)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/symgs.c | #pragma omp parallel for private(box) | 100 | y_BCs(level,phi_id,stencil_get_shape());
double _timeStart = getTime();
#ifdef _OPENMP
<LOOP-START>for(box=0;box<level->num_my_boxes;box++){
int i,j,k;
const int ghosts = level->box_ghosts;
const int jStride = level->my_boxes[box].jStride;
const int kStride = level->my_boxes[box].kStride;
const int dim = level->my_boxes[box].dim;
const double h2inv = 1.0/(level->h*level->h);
double * __restrict__ phi = level->my_boxes[box].vectors[ phi_id] + ghosts*(1+jStride+kStride); // i.e. [0] = first non ghost zone point
const double * __restrict__ rhs = level->my_boxes[box].vectors[ rhs_id] + ghosts*(1+jStride+kStride);
const double * __restrict__ alpha = level->my_boxes[box].vectors[VECTOR_ALPHA ] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_i = level->my_boxes[box].vectors[VECTOR_BETA_I] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_j = level->my_boxes[box].vectors[VECTOR_BETA_J] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_k = level->my_boxes[box].vectors[VECTOR_BETA_K] + ghosts*(1+jStride+kStride);
const double * __restrict__ Dinv = level->my_boxes[box].vectors[VECTOR_DINV ] + ghosts*(1+jStride+kStride);
const double * __restrict__ valid = level->my_boxes[box].vectors[VECTOR_VALID ] + ghosts*(1+jStride+kStride); // cell is inside the domain
if( (s&0x1)==0 ){ // forward sweep... hard to thread
for(k=0;k<dim;k++){
for(j=0;j<dim;j++){
for(i=0;i<dim;i++){
int ijk = i + j*jStride + k*kStride;
double Ax = apply_op_ijk(phi);
phi[ijk] = phi[ijk] + Dinv[ijk]*(rhs[ijk]-Ax);
}}}
}else{ // backward sweep... hard to thread
for(k=dim-1;k>=0;k--){
for(j=dim-1;j>=0;j--){
for(i=dim-1;i>=0;i--){
int ijk = i + j*jStride + k*kStride;
double Ax = apply_op_ijk(phi);
phi[ijk] = phi[ijk] + Dinv[ijk]*(rhs[ijk]-Ax);
}}}
}
}<LOOP-END> <OMP-START>#pragma omp parallel for private(box)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p2.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_f->interpolation.num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->interpolation.num_recvs;n++){
MPI_Irecv(level_f->interpolation.recv_buffers[n],
level_f->interpolation.recv_sizes[n],
MPI_DOUBLE,
level_f->interpolation.recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p2.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_c->interpolation.num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->interpolation.num_sends;n++){
MPI_Isend(level_c->interpolation.send_buffers[n],
level_c->interpolation.send_sizes[n],
MPI_DOUBLE,
level_c->interpolation.send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/exchange_boundary.c | #pragma omp parallel for schedule(dynamic,1) | 100 | ange_ghosts[shape].num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level->exchange_ghosts[shape].num_recvs;n++){
MPI_Irecv(level->exchange_ghosts[shape].recv_buffers[n],
level->exchange_ghosts[shape].recv_sizes[n],
MPI_DOUBLE,
level->exchange_ghosts[shape].recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/exchange_boundary.c | #pragma omp parallel for schedule(dynamic,1) | 100 | ange_ghosts[shape].num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level->exchange_ghosts[shape].num_sends;n++){
MPI_Isend(level->exchange_ghosts[shape].send_buffers[n],
level->exchange_ghosts[shape].send_sizes[n],
MPI_DOUBLE,
level->exchange_ghosts[shape].send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_v4.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_f->interpolation.num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->interpolation.num_recvs;n++){
MPI_Irecv(level_f->interpolation.recv_buffers[n],
level_f->interpolation.recv_sizes[n],
MPI_DOUBLE,
level_f->interpolation.recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_v4.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_c->interpolation.num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->interpolation.num_sends;n++){
MPI_Isend(level_c->interpolation.send_buffers[n],
level_c->interpolation.send_sizes[n],
MPI_DOUBLE,
level_c->interpolation.send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/problem.p4.c | #pragma omp parallel for private(k,j,i) collapse(3) | 100 | level->my_boxes[box].dim;
const int dim_k = level->my_boxes[box].dim;
#ifdef _OPENMP
<LOOP-START>for(k=0;k<=dim_k;k++){ // include high face
for(j=0;j<=dim_j;j++){ // include high face
for(i=0;i<=dim_i;i++){ // include high face
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int ijk = (i+ghosts) + (j+ghosts)*jStride + (k+ghosts)*kStride;
double x = hLevel*( (double)(i+level->my_boxes[box].low.i) + 0.5 ); // +0.5 to get to the center of cell
double y = hLevel*( (double)(j+level->my_boxes[box].low.j) + 0.5 );
double z = hLevel*( (double)(k+level->my_boxes[box].low.k) + 0.5 );
double A,B,Bx,By,Bz,Bi,Bj,Bk;
double U,Ux,Uy,Uz,Uxx,Uyy,Uzz;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A = 1.0;
B = 1.0;
Bx = 0.0;
By = 0.0;
Bz = 0.0;
Bi = 1.0;
Bj = 1.0;
Bk = 1.0;
#ifdef STENCIL_VARIABLE_COEFFICIENT // variable coefficient problem...
evaluateBeta(x-hLevel*0.5,y ,z ,&Bi,&Bx,&By,&Bz); // face-centered value of Beta for beta_i
evaluateBeta(x ,y-hLevel*0.5,z ,&Bj,&Bx,&By,&Bz); // face-centered value of Beta for beta_j
evaluateBeta(x ,y ,z-hLevel*0.5,&Bk,&Bx,&By,&Bz); // face-centered value of Beta for beta_k
evaluateBeta(x ,y ,z ,&B ,&Bx,&By,&Bz); // cell-centered value of Beta
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
evaluateU(x,y,z,&U,&Ux,&Uy,&Uz,&Uxx,&Uyy,&Uzz, (level->boundary_condition.type == BC_PERIODIC) );
double F = a*A*U - b*( (Bx*Ux + By*Uy + Bz*Uz) + B*(Uxx + Uyy + Uzz) );
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
level->my_boxes[box].vectors[VECTOR_BETA_I][ijk] = Bi;
level->my_boxes[box].vectors[VECTOR_BETA_J][ijk] = Bj;
level->my_boxes[box].vectors[VECTOR_BETA_K][ijk] = Bk;
level->my_boxes[box].vectors[VECTOR_ALPHA ][ijk] = A;
level->my_boxes[box].vectors[VECTOR_UTRUE ][ijk] = U;
level->my_boxes[box].vectors[VECTOR_F ][ijk] = F;
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}}}<LOOP-END> <OMP-START>#pragma omp parallel for private(k,j,i) collapse(3)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/restriction.c | #pragma omp parallel for schedule(dynamic,1) | 100 | n[restrictionType].num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->restriction[restrictionType].num_recvs;n++){
MPI_Irecv(level_c->restriction[restrictionType].recv_buffers[n],
level_c->restriction[restrictionType].recv_sizes[n],
MPI_DOUBLE,
level_c->restriction[restrictionType].recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/restriction.c | #pragma omp parallel for schedule(dynamic,1) | 100 | n[restrictionType].num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->restriction[restrictionType].num_sends;n++){
MPI_Isend(level_f->restriction[restrictionType].send_buffers[n],
level_f->restriction[restrictionType].send_sizes[n],
MPI_DOUBLE,
level_f->restriction[restrictionType].send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_v2.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_f->interpolation.num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->interpolation.num_recvs;n++){
MPI_Irecv(level_f->interpolation.recv_buffers[n],
level_f->interpolation.recv_sizes[n],
MPI_DOUBLE,
level_f->interpolation.recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_v2.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_c->interpolation.num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->interpolation.num_sends;n++){
MPI_Isend(level_c->interpolation.send_buffers[n],
level_c->interpolation.send_sizes[n],
MPI_DOUBLE,
level_c->interpolation.send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p1.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_f->interpolation.num_recvs>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_f->interpolation.num_recvs;n++){
MPI_Irecv(level_f->interpolation.recv_buffers[n],
level_f->interpolation.recv_sizes[n],
MPI_DOUBLE,
level_f->interpolation.recv_ranks[n],
my_tag,
MPI_COMM_WORLD,
&recv_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators/interpolation_p1.c | #pragma omp parallel for schedule(dynamic,1) | 100 | l_c->interpolation.num_sends>0){
_timeStart = getTime();
#ifdef USE_MPI_THREAD_MULTIPLE
<LOOP-START>for(n=0;n<level_c->interpolation.num_sends;n++){
MPI_Isend(level_c->interpolation.send_buffers[n],
level_c->interpolation.send_sizes[n],
MPI_DOUBLE,
level_c->interpolation.send_ranks[n],
my_tag,
MPI_COMM_WORLD,
&send_requests[n]
);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1)<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/hpgmg-parallel/finite-volume/source/operators.old/symgs.c | #pragma omp parallel for | 100 | dim = level->box_dim;
const double h2inv = 1.0/(level->h*level->h);
#ifdef _OPENMP
<LOOP-START>for(box=0;box<level->num_my_boxes;box++){
int i,j,k;
double * __restrict__ phi = level->my_boxes[box].vectors[ phi_id] + ghosts*(1+jStride+kStride); // i.e. [0] = first non ghost zone point
const double * __restrict__ rhs = level->my_boxes[box].vectors[ rhs_id] + ghosts*(1+jStride+kStride);
const double * __restrict__ alpha = level->my_boxes[box].vectors[VECTOR_ALPHA ] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_i = level->my_boxes[box].vectors[VECTOR_BETA_I] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_j = level->my_boxes[box].vectors[VECTOR_BETA_J] + ghosts*(1+jStride+kStride);
const double * __restrict__ beta_k = level->my_boxes[box].vectors[VECTOR_BETA_K] + ghosts*(1+jStride+kStride);
const double * __restrict__ Dinv = level->my_boxes[box].vectors[VECTOR_DINV ] + ghosts*(1+jStride+kStride);
const double * __restrict__ valid = level->my_boxes[box].vectors[VECTOR_VALID ] + ghosts*(1+jStride+kStride); // cell is inside the domain
if( (s&0x1)==0 ){ // forward sweep... hard to thread
for(k=0;k<dim;k++){
for(j=0;j<dim;j++){
for(i=0;i<dim;i++){
int ijk = i + j*jStride + k*kStride;
double Ax = apply_op_ijk(phi);
phi[ijk] = phi[ijk] + Dinv[ijk]*(rhs[ijk]-Ax);
}}}
}else{ // backward sweep... hard to thread
for(k=dim-1;k>=0;k--){
for(j=dim-1;j>=0;j--){
for(i=dim-1;i>=0;i--){
int ijk = i + j*jStride + k*kStride;
double Ax = apply_op_ijk(phi);
phi[ijk] = phi[ijk] + Dinv[ijk]*(rhs[ijk]-Ax);
}}}
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/kernel_initialise.c | #pragma omp parallel for | 100 |
if(*a == NULL)
{
die(__LINE__, __FILE__, "Error allocating buffer %s\n");
}
<LOOP-START>for(int jj = 0; jj < y; ++jj)
{
for(int kk = 0; kk < x; ++kk)
{
const int index = kk + jj*x;
(*a)[index] = 0.0;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | nner = y - 2*halo_depth;
#pragma omp target if(is_offload) \
map(from: buffer[:depth*y_inner])
<LOOP-START>for(int jj = halo_depth; jj < y-halo_depth; ++jj)
{
for(int kk = halo_depth; kk < halo_depth+depth; ++kk)
{
int buf_index = (kk-halo_depth) + (jj-halo_depth)*depth;
buffer[buf_index] = field[jj*x+kk];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | nner = y - 2*halo_depth;
#pragma omp target if(is_offload) \
map(from: buffer[:depth*y_inner])
<LOOP-START>for(int jj = halo_depth; jj < y-halo_depth; ++jj)
{
for(int kk = x-halo_depth-depth; kk < x-halo_depth; ++kk)
{
int buf_index = (kk-(x-halo_depth-depth)) + (jj-halo_depth)*depth;
buffer[buf_index] = field[jj*x+kk];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | _inner = x-2*halo_depth;
#pragma omp target if(is_offload) \
map(from: buffer[:depth*x_inner])
<LOOP-START>for(int jj = y-halo_depth-depth; jj < y-halo_depth; ++jj)
{
for(int kk = halo_depth; kk < x-halo_depth; ++kk)
{
int buf_index = (kk-halo_depth) + (jj-(y-halo_depth-depth))*x_inner;
buffer[buf_index] = field[jj*x+kk];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | _inner = x-2*halo_depth;
#pragma omp target if(is_offload) \
map(from: buffer[:depth*x_inner])
<LOOP-START>for(int jj = halo_depth; jj < halo_depth+depth; ++jj)
{
for(int kk = halo_depth; kk < x-halo_depth; ++kk)
{
int buf_index = (kk-halo_depth) + (jj-halo_depth)*x_inner;
buffer[buf_index] = field[jj*x+kk];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | _inner = y - 2*halo_depth;
#pragma omp target if(is_offload) \
map(to: buffer[:depth*y_inner])
<LOOP-START>for(int jj = halo_depth; jj < y-halo_depth; ++jj)
{
for(int kk = halo_depth-depth; kk < halo_depth; ++kk)
{
int buf_index = (kk-(halo_depth-depth)) + (jj-halo_depth)*depth;
field[jj*x+kk] = buffer[buf_index];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
tallendev/uvm-eval/archive/benchmarksv3/tealeaf-parallel/c_kernels/omp4_knc/pack_halos.c | #pragma omp parallel for | 100 | _inner = y - 2*halo_depth;
#pragma omp target if(is_offload) \
map(to: buffer[:depth*y_inner])
<LOOP-START>for(int jj = halo_depth; jj < y-halo_depth; ++jj)
{
for(int kk = x-halo_depth; kk < x-halo_depth+depth; ++kk)
{
int buf_index = (kk-(x-halo_depth)) + (jj-halo_depth)*depth;
field[jj*x+kk] = buffer[buf_index];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.