filename
stringlengths
19
182
omp_pragma_line
stringlengths
24
416
context_chars
int64
100
100
text
stringlengths
152
177k
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/Vector_functions.hpp
#pragma omp parallel for reduction(+:result)
100
calar* xcoefs = &x.coefs[0]; const Scalar* ycoefs = &y.coefs[0]; MINIFE_SCALAR result = 0; <LOOP-START>for(int i=0; i<n; ++i) { result += xcoefs[i] * ycoefs[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:result)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/Vector_functions.hpp
#pragma omp parallel for reduction(+:result)
100
itude_type magnitude; const MINIFE_SCALAR* xcoefs = &x.coefs[0]; MINIFE_SCALAR result = 0; <LOOP-START>for(int i=0; i<n; ++i) { result += xcoefs[i] * xcoefs[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:result)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/CSRMatrix.hpp
#pragma omp parallel for
100
packed_cols.reserve(nrows * ncols_per_row); packed_coefs.reserve(nrows * ncols_per_row); <LOOP-START>for(MINIFE_GLOBAL_ORDINAL i = 0; i < nrows; ++i) { rows[i] = 0; row_offsets[i] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/CSRMatrix.hpp
#pragma omp parallel for
100
for(MINIFE_GLOBAL_ORDINAL i = 0; i < nrows; ++i) { rows[i] = 0; row_offsets[i] = 0; } <LOOP-START>for(MINIFE_GLOBAL_ORDINAL i = 0; i < (nrows * ncols_per_row); ++i) { packed_cols[i] = 0; packed_coefs[i] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/SparseMatrix_functions.hpp
#pragma omp parallel for
100
zero_row_and_put_1_on_diagonal(A, row); } } const int ROW_COUNT = A.rows.size(); <LOOP-START>for(MINIFE_GLOBAL_ORDINAL i=0; i < ROW_COUNT; ++i) { GlobalOrdinal row = A.rows[i]; if (bc_rows.find(row) != bc_rows.end()) continue; size_t row_length = 0; GlobalOrdinal* cols = NULL; Scalar* coefs = NULL; A.get_row_pointers(row, row_length, cols, coefs); Scalar sum = 0; for(size_t j=0; j<row_length; ++j) { if (bc_rows.find(cols[j]) != bc_rows.end()) { sum += coefs[j]; coefs[j] = 0; } } #pragma omp atomic b.coefs[i] -= sum*prescribed_value; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/SparseMatrix_functions.hpp
#pragma omp parallel for
100
= &y.coefs[0]; const ScalarType beta = 0; <LOOP-START>for(MINIFE_GLOBAL_ORDINAL row = 0; row < rows_size; ++row) { const MINIFE_GLOBAL_ORDINAL row_start = Arowoffsets[row]; const MINIFE_GLOBAL_ORDINAL row_end = Arowoffsets[row+1]; MINIFE_SCALAR sum = 0; #pragma loop_count(15) for(MINIFE_GLOBAL_ORDINAL i = row_start; i < row_end; ++i) { sum += Acoefs[i] * xcoefs[Acols[i]]; } ycoefs[row] = sum; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/SparseMatrix_functions.hpp
#pragma omp parallel for
100
alarType* xcoefs = &x.coefs[0]; ScalarType* ycoefs = &y.coefs[0]; ScalarType beta = 0; <LOOP-START>for(int row=0; row<n; ++row) { ScalarType sum = beta*ycoefs[row]; int row_start=row*row_len; int row_end=row_start+row_len; for(LocalOrdinalType i=row_start; i<row_end; ++i) { sum += Acoefs[i]*xcoefs[Acols[i]]; } ycoefs[row] = sum; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/main.cpp
#pragma omp parallel for reduction(+:value)
100
hread Pool..." << std::endl; } int value = 0; const int thread_count = omp_get_max_threads(); <LOOP-START>for(int i = 0; i < thread_count; ++i) { value += 1; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:value)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/miniFe/src/Vector.hpp
#pragma omp parallel for
100
inal local_sz) : startIndex(startIdx), local_size(local_sz), coefs(local_size) { <LOOP-START>for(MINIFE_LOCAL_ORDINAL i=0; i < local_size; ++i) { coefs[i] = 0; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/generator/graph_generator.c
#pragma omp parallel for
100
); val1 *= UINT64_C(0xFFFFFFFF); val1 += mrg_get_uint_orig(&new_state); } #ifdef _OPENMP <LOOP-START>#ifdef __MTA__ #pragma mta assert parallel #pragma mta block schedule for (ei = start_edge; ei < end_edge; ++ei) { mrg_state new_state = state; mrg_skip(&new_state, 0, ei, 0); make_one_edge(nverts, 0, logN, &new_state, edges + (ei - start_edge), val0, val1); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/main.c
#pragma omp parallel for
100
edge_count, packed_edge_mpi_type, MPI_STATUS_IGNORE); } ptrdiff_t i; #ifdef _OPENMP <LOOP-START>for (i = 0; i < edge_count; ++i) { int64_t src = get_v0_from_edge(&actual_buf[i]); int64_t tgt = get_v1_from_edge(&actual_buf[i]); if (src == tgt) continue; if (src / bitmap_size_in_bytes / CHAR_BIT == my_col) { #ifdef _OPENMP #pragma omp atomic has_edge[(src / CHAR_BIT) % bitmap_size_in_bytes] |= (1 << (src % CHAR_BIT)); } if (tgt / bitmap_size_in_bytes / CHAR_BIT == my_col) { #ifdef _OPENMP #pragma omp atomic has_edge[(tgt / CHAR_BIT) % bitmap_size_in_bytes] |= (1 << (tgt % CHAR_BIT)); } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_custom.c
#pragma omp parallel for
100
tex = vertex_p; int* restrict owner = owner_p; size_t* restrict local = local_p; ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)count; ++i) { owner[i] = VERTEX_OWNER(vertex[i]); local[i] = VERTEX_LOCAL(vertex[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_one_sided.c
#pragma omp parallel for
100
tex = vertex_p; int* restrict owner = owner_p; size_t* restrict local = local_p; ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)count; ++i) { owner[i] = VERTEX_OWNER(vertex[i]); local[i] = VERTEX_LOCAL(vertex[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csr.c
#pragma omp parallel for
100
size_t* restrict counts = temp; memset(counts, 0, nrows * sizeof(size_t)); ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)inbuf_size; ++i) { assert ((size_t)(VERTEX_LOCAL(get_v0_from_edge(&inbuf[i]))) < nrows); #pragma omp atomic ++counts[VERTEX_LOCAL(get_v0_from_edge(&inbuf[i]))]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csr.c
#pragma omp parallel for
100
* restrict inserts = temp; memcpy(inserts, rowstarts, nrows * sizeof(size_t)); ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)inbuf_size; ++i) { int64_t v0 = get_v0_from_edge(&inbuf[i]); int64_t v1 = get_v1_from_edge(&inbuf[i]); assert ((size_t)(VERTEX_LOCAL(v0)) < nrows); size_t pos = __sync_fetch_and_add(&inserts[VERTEX_LOCAL(v0)], 1); assert (pos < inbuf_size); column[pos] = v1; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csr.c
#pragma omp parallel for
100
starts, (a_nlocalverts + 1) * sizeof(size_t)); b_nlocalverts = b->nlocalverts = a->nlocalverts; <LOOP-START>for (i = old_b_nlocalverts; i < b_nlocalverts; ++i) { b->rowstarts[i + 1] = b_nlocaledges; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csr.c
#pragma omp parallel for
100
eof(int64_t)); } b_nlocaledges = b->nlocaledges = b_nlocaledges + a_nlocaledges; ptrdiff_t i; <LOOP-START>for (i = 0; i <= a_nlocalverts; ++i) { b->rowstarts[i] += a->rowstarts[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csr.c
#pragma omp parallel for if(a_nlocalverts != b_nlocalverts)
100
p parallel for for (i = 0; i <= a_nlocalverts; ++i) { b->rowstarts[i] += a->rowstarts[i]; } <LOOP-START>for (i = a_nlocalverts + 1; i <= b_nlocalverts; ++i) { b->rowstarts[i] += a_nlocaledges; }<LOOP-END> <OMP-START>#pragma omp parallel for if(a_nlocalverts != b_nlocalverts)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csc.c
#pragma omp parallel for
100
size_t* restrict counts = temp; memset(counts, 0, nrows * sizeof(size_t)); ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)inbuf_size; ++i) { assert ((size_t)(SWIZZLE_VERTEX(get_v1_from_edge(&inbuf[i])) / ULONG_BITS) < nrows); #pragma omp atomic ++counts[SWIZZLE_VERTEX(get_v1_from_edge(&inbuf[i])) / ULONG_BITS]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csc.c
#pragma omp parallel for
100
* restrict inserts = temp; memcpy(inserts, rowstarts, nrows * sizeof(size_t)); ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)inbuf_size; ++i) { int64_t v0 = get_v0_from_edge(&inbuf[i]); int64_t v1 = SWIZZLE_VERTEX(get_v1_from_edge(&inbuf[i])); // fprintf(stderr, "%d: Raw edge is (%" PRId64 ", %" PRId64 ") -> (%zu, %" PRId64 " = %" PRId64 ")\n", rank, v0, get_v1_from_edge(&inbuf[i]), VERTEX_LOCAL(v0), v1, UNSWIZZLE_VERTEX(v1)); size_t pos = __sync_fetch_and_add(&inserts[(v1) / ULONG_BITS], 1); column[pos] = (v1 % ULONG_BITS) + VERTEX_LOCAL(v0) * ULONG_BITS; // fprintf(stderr, "%d: Stored as (row %" PRId64 ", col %" PRId64 "/%" PRId64 ")\n", rank, (v1) / ULONG_BITS, column[pos] % ULONG_BITS, column[pos] / ULONG_BITS); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csc.c
#pragma omp parallel for
100
>rowstarts[i + 1] - b->rowstarts[i]) * sizeof(int64_t)); } /* This loop can be parallel. */ <LOOP-START>for (i_plus_1 = nrows; i_plus_1 > 0; --i_plus_1) { ptrdiff_t i = i_plus_1 - 1; memcpy(&b->column[b->rowstarts[i + 1] + a->rowstarts[i]], &a->column[a->rowstarts[i]], (a->rowstarts[i + 1] - a->rowstarts[i]) * sizeof(int64_t)); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/oned_csc.c
#pragma omp parallel for
100
t64_t)); } b_nlocaledges = b->nlocaledges = b_nlocaledges + a_nlocaledges; ptrdiff_t i; <LOOP-START>for (i = 0; i <= nrows; ++i) { b->rowstarts[i] += a->rowstarts[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated_csc.c
#pragma omp parallel for schedule(static)
100
e_summary, 0, local_queue_summary_size * sizeof(unsigned long)); ptrdiff_t i, ii_summary; #if 0 <LOOP-START>for (i = 0; i < global_queue_summary_size; ++i) { unsigned long val = 0UL; int j; unsigned long mask = 1UL; for (j = 0; j < ULONG_BITS; ++j, mask <<= 1) { if (in_queue[i * ULONG_BITS + j]) val |= mask; } in_queue_summary[i] = val; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated_csc.c
#pragma omp parallel for schedule(static) reduction(|:not_done)
100
val |= mask; } in_queue_summary[i] = val; } #endif unsigned long not_done = 0; <LOOP-START>for (ii_summary = 0; ii_summary < global_queue_summary_size; ++ii_summary) { uint64_t val_summary = in_queue_summary[ii_summary]; if (val_summary == 0) continue; int ii_offset; ptrdiff_t ii; for (ii_offset = 0; ii_offset < ULONG_BITS; ++ii_offset) { if ((val_summary & (UINT64_C(1) << ii_offset)) == 0) continue; ii = ii_summary * ULONG_BITS + ii_offset; uint64_t val = in_queue[ii]; if (val == 0) continue; size_t i, i_end = rowstarts[ii + 1]; for (i = rowstarts[ii]; i < i_end; ++i) { int64_t c = column[i]; int64_t v0_local = c / ULONG_BITS; if ((val & (UINT64_C(1) << (c % ULONG_BITS))) != 0 /* TEST_IN(v1_swizzled) */ && !TAS_VISITED_LOCAL(v0_local)) { assert (pred[v0_local] == -1); int64_t v1_swizzled = (int64_t)ii * ULONG_BITS + c % ULONG_BITS; pred[v0_local] = UNSWIZZLE_VERTEX(v1_swizzled); not_done |= 1; } } } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static) reduction(|:not_done)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated_csc.c
#pragma omp parallel for schedule(static)
100
UNSWIZZLE_VERTEX(v1_swizzled); not_done |= 1; } } } } #if 1 <LOOP-START>for (i = 0; i < local_queue_summary_size; ++i) { unsigned long val = 0UL; int j; unsigned long mask = 1UL; for (j = 0; j < ULONG_BITS; ++j, mask <<= 1) { unsigned long full_val = out_queue[i * ULONG_BITS + j]; visited[i * ULONG_BITS + j] |= full_val; if (full_val) val |= mask; } out_queue_summary[i] = val; // not_done |= val; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated_csc.c
#pragma omp parallel for
100
tex = vertex_p; int* restrict owner = owner_p; size_t* restrict local = local_p; ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)count; ++i) { owner[i] = VERTEX_OWNER(vertex[i]); local[i] = VERTEX_LOCAL(vertex[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_simple.c
#pragma omp parallel for
100
tex = vertex_p; int* restrict owner = owner_p; size_t* restrict local = local_p; ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)count; ++i) { owner[i] = VERTEX_OWNER(vertex[i]); local[i] = VERTEX_LOCAL(vertex[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated.c
#pragma omp parallel for schedule(static)
100
out_queue_summary, 0, local_queue_summary_size * sizeof(unsigned long)); ptrdiff_t i, ii; #if 0 <LOOP-START>for (i = 0; i < global_queue_summary_size; ++i) { unsigned long val = 0UL; int j; unsigned long mask = 1UL; for (j = 0; j < ulong_bits; ++j, mask <<= 1) { if (in_queue[i * ulong_bits + j]) val |= mask; } in_queue_summary[i] = val; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated.c
#pragma omp parallel for schedule(static) reduction(|:not_done)
100
val |= mask; } in_queue_summary[i] = val; } #endif unsigned long not_done = 0; <LOOP-START>for (ii = 0; ii < nlocalverts; ii += ulong_bits) { size_t i, i_end = ii + ulong_bits; if (i_end > nlocalverts) i_end = nlocalverts; for (i = ii; i < i_end; ++i) { if (!TEST_VISITED_LOCAL(i)) { size_t j, j_end = rowstarts[i + 1]; for (j = rowstarts[i]; j < j_end; ++j) { int64_t v1 = column[j]; int64_t v1_swizzled = SWIZZLE_VERTEX(v1); if (TEST_IN(v1_swizzled)) { pred[i] = (v1 & INT64_C(0xFFFFFFFFFFFF)) | ((int64_t)cur_level << 48); not_done |= 1; SET_VISITED_LOCAL(i); break; } } } } }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static) reduction(|:not_done)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated.c
#pragma omp parallel for schedule(static)
100
SET_VISITED_LOCAL(i); break; } } } } } #if 1 <LOOP-START>for (i = 0; i < local_queue_summary_size; ++i) { unsigned long val = 0UL; int j; unsigned long mask = 1UL; for (j = 0; j < ulong_bits; ++j, mask <<= 1) { unsigned long full_val = out_queue[i * ulong_bits + j]; visited[i * ulong_bits + j] |= full_val; if (full_val) val |= mask; } out_queue_summary[i] = val; // not_done |= val; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/bfs_replicated.c
#pragma omp parallel for
100
tex = vertex_p; int* restrict owner = owner_p; size_t* restrict local = local_p; ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)count; ++i) { int64_t v = vertex[i]; owner[i] = VERTEX_OWNER(v); local[i] = VERTEX_LOCAL(v); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(||:any_range_errors)
100
& i_start <= (ptrdiff_t)nlocalverts); assert (i_end >= 0 && i_end <= (ptrdiff_t)nlocalverts); <LOOP-START>for (i = i_start; i < i_end; ++i) { int64_t p = get_pred_from_pred_entry(pred[i]); if (p < -1 || p >= nglobalverts) { fprintf(stderr, "%d: Validation error: parent of vertex %" PRId64 " is out-of-range value %" PRId64 ".\n", rank, vertex_to_global_for_pred(rank, i), p); any_range_errors = 1; } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(||:any_range_errors)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
(root_owner == rank); if (root_is_mine) assert (root_local < nlocalverts); { ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)nlocalverts; ++i) write_pred_entry_depth(&pred[i], UINT16_MAX); if (root_is_mine) write_pred_entry_depth(&pred[root_local], 0); } int64_t* restrict pred_pred = (int64_t*)xMPI_Alloc_mem(size_min(CHUNKSIZE, nlocalverts) * sizeof(int64_t)); /* Predecessor info of predecessor vertex for each local vertex */ gather* pred_win = init_gather((void*)pred, nlocalverts, sizeof(int64_t), pred_pred, size_min(CHUNKSIZE, nlocalverts), size_min(CHUNKSIZE, nlocalverts), MPI_INT64_T); int64_t* restrict pred_vtx = (int64_t*)xmalloc(size_min(CHUNKSIZE, nlocalverts) * sizeof(int64_t)); /* Vertex (not depth) part of pred map */ int* restrict pred_owner = (int*)xmalloc(size_min(CHUNKSIZE, nlocalverts) * sizeof(int)); size_t* restrict pred_local = (size_t*)xmalloc(size_min(CHUNKSIZE, nlocalverts) * sizeof(size_t)); int iter_number = 0; { /* Iteratively update depth[v] = min(depth[v], depth[pred[v]] + 1) [saturating at UINT16_MAX] until no changes. */ while (1) { ++iter_number; int any_changes = 0; ptrdiff_t ii; for (ii = 0; ii < (ptrdiff_t)maxlocalverts; ii += CHUNKSIZE) { ptrdiff_t i_start = ptrdiff_min(ii, nlocalverts); ptrdiff_t i_end = ptrdiff_min(ii + CHUNKSIZE, nlocalverts); begin_gather(pred_win); ptrdiff_t i; assert (i_start >= 0 && i_start <= (ptrdiff_t)nlocalverts); assert (i_end >= 0 && i_end <= (ptrdiff_t)nlocalverts); #pragma omp parallel for for (i = i_start; i < i_end; ++i) { pred_vtx[i - i_start] = get_pred_from_pred_entry(pred[i]); } get_vertex_distribution_for_pred(i_end - i_start, pred_vtx, pred_owner, pred_local); #pragma omp parallel for for (i = i_start; i < i_end; ++i) { if (pred[i] != -1) { add_gather_request(pred_win, i - i_start, pred_owner[i - i_start], pred_local[i - i_start], i - i_start); } else { pred_pred[i - i_start] = -1; } } end_gather(pred_win); #pragma omp parallel for reduction(&&:validation_passed) reduction(||:any_changes) for (i = i_start; i < i_end; ++i) { if (rank == root_owner && (size_t)i == root_local) continue; if (get_depth_from_pred_entry(pred_pred[i - i_start]) != UINT16_MAX) { if (get_depth_from_pred_entry(pred[i]) != UINT16_MAX && get_depth_from_pred_entry(pred[i]) != get_depth_from_pred_entry(pred_pred[i - i_start]) + 1) { fprintf(stderr, "%d: Validation error: BFS predecessors do not form a tree; see vertices %" PRId64 " (depth %" PRIu16 ") and %" PRId64 " (depth %" PRIu16 ").\n", rank, vertex_to_global_for_pred(rank, i), get_depth_from_pred_entry(pred[i]), get_pred_from_pred_entry(pred[i]), get_depth_from_pred_entry(pred_pred[i - i_start])); validation_passed = 0; } else if (get_depth_from_pred_entry(pred[i]) == get_depth_from_pred_entry(pred_pred[i - i_start]) + 1) { /* Nothing to do */ } else { write_pred_entry_depth(&pred[i], get_depth_from_pred_entry(pred_pred[i - i_start]) + 1); any_changes = 1; } } } } MPI_Allreduce(MPI_IN_PLACE, &any_changes, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); if (!any_changes) break; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
i_start <= (ptrdiff_t)nlocalverts); assert (i_end >= 0 && i_end <= (ptrdiff_t)nlocalverts); <LOOP-START>for (i = i_start; i < i_end; ++i) { pred_vtx[i - i_start] = get_pred_from_pred_entry(pred[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
} get_vertex_distribution_for_pred(i_end - i_start, pred_vtx, pred_owner, pred_local); <LOOP-START>for (i = i_start; i < i_end; ++i) { if (pred[i] != -1) { add_gather_request(pred_win, i - i_start, pred_owner[i - i_start], pred_local[i - i_start], i - i_start); } else { pred_pred[i - i_start] = -1; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed) reduction(||:any_changes)
100
else { pred_pred[i - i_start] = -1; } } end_gather(pred_win); <LOOP-START>for (i = i_start; i < i_end; ++i) { if (rank == root_owner && (size_t)i == root_local) continue; if (get_depth_from_pred_entry(pred_pred[i - i_start]) != UINT16_MAX) { if (get_depth_from_pred_entry(pred[i]) != UINT16_MAX && get_depth_from_pred_entry(pred[i]) != get_depth_from_pred_entry(pred_pred[i - i_start]) + 1) { fprintf(stderr, "%d: Validation error: BFS predecessors do not form a tree; see vertices %" PRId64 " (depth %" PRIu16 ") and %" PRId64 " (depth %" PRIu16 ").\n", rank, vertex_to_global_for_pred(rank, i), get_depth_from_pred_entry(pred[i]), get_pred_from_pred_entry(pred[i]), get_depth_from_pred_entry(pred_pred[i - i_start])); validation_passed = 0; } else if (get_depth_from_pred_entry(pred[i]) == get_depth_from_pred_entry(pred_pred[i - i_start]) + 1) { /* Nothing to do */ } else { write_pred_entry_depth(&pred[i], get_depth_from_pred_entry(pred_pred[i - i_start]) + 1); any_changes = 1; } } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed) reduction(||:any_changes)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed)
100
0.\n", rank, root, get_depth_from_pred_entry(pred[root_local])); validation_passed = 0; } <LOOP-START>for (i = 0; i < (ptrdiff_t)nlocalverts; ++i) { if (get_pred_from_pred_entry(pred[i]) == -1 && get_depth_from_pred_entry(pred[i]) != UINT16_MAX) { fprintf(stderr, "%d: Validation error: depth of vertex %" PRId64 " with no predecessor is %" PRIu16 ", not UINT16_MAX.\n", rank, vertex_to_global_for_pred(rank, i), get_depth_from_pred_entry(pred[i])); validation_passed = 0; } else if (get_pred_from_pred_entry(pred[i]) != -1 && get_depth_from_pred_entry(pred[i]) == UINT16_MAX) { fprintf(stderr, "%d: Validation error: predecessor of claimed unreachable vertex %" PRId64 " is %" PRId64 ", not -1.\n", rank, vertex_to_global_for_pred(rank, i), get_pred_from_pred_entry(pred[i])); validation_passed = 0; } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
assert (i_end - i_start >= 0 && i_end - i_start <= (ptrdiff_t)size_min(CHUNKSIZE, nlocalverts)); <LOOP-START>for (i = i_start; i < i_end; ++i) { pred_vtx[i - i_start] = get_pred_from_pred_entry(pred[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
i]); } get_vertex_distribution_for_pred(i_end - i_start, pred_vtx, pred_owner, pred_local); <LOOP-START>for (i = i_start; i < i_end; ++i) { if (pred[i] != -1) { add_gather_request(pred_win, i - i_start, pred_owner[i - i_start], pred_local[i - i_start], i - i_start); } else { pred_pred[i - i_start] = -1; } }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed)
100
start); } else { pred_pred[i - i_start] = -1; } } end_gather(pred_win); <LOOP-START>for (i = i_start; i < i_end; ++i) { if (rank == root_owner && (size_t)i == root_local) continue; if (get_pred_from_pred_entry(pred[i]) == -1) continue; /* Already checked */ if (get_depth_from_pred_entry(pred_pred[i - i_start]) == UINT16_MAX) { fprintf(stderr, "%d: Validation error: predecessor %" PRId64 " of vertex %" PRId64 " (depth %" PRIu16 ") is marked as unreachable.\n", rank, get_pred_from_pred_entry(pred[i]), vertex_to_global_for_pred(rank, i), get_depth_from_pred_entry(pred[i])); validation_passed = 0; } if (get_depth_from_pred_entry(pred[i]) != get_depth_from_pred_entry(pred_pred[i - i_start]) + 1) { fprintf(stderr, "%d: Validation error: BFS predecessors do not form a tree; see vertices %" PRId64 " (depth %" PRIu16 ") and %" PRId64 " (depth %" PRIu16 ").\n", rank, vertex_to_global_for_pred(rank, i), get_depth_from_pred_entry(pred[i]), get_pred_from_pred_entry(pred[i]), get_depth_from_pred_entry(pred_pred[i - i_start])); validation_passed = 0; } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
& i_start <= (ptrdiff_t)nlocalverts); assert (i_end >= 0 && i_end <= (ptrdiff_t)nlocalverts); <LOOP-START>for (i = i_start; i < i_end; ++i) { pred_vtx[i - i_start] = get_pred_from_pred_entry(pred[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed)
100
} get_vertex_distribution_for_pred(i_end - i_start, pred_vtx, pred_owner, pred_local); <LOOP-START>for (i = i_start; i < i_end; ++i) { if ((!root_is_mine || (size_t)i != root_local) && get_pred_from_pred_entry(pred[i]) != -1 && pred_owner[i - i_start] == rank && pred_local[i - i_start] == (size_t)i) { fprintf(stderr, "%d: Validation error: parent of non-root vertex %" PRId64 " is itself.\n", rank, vertex_to_global_for_pred(rank, i)); validation_passed = 0; } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
HALF_CHUNKSIZE, bufsize); assert (i_end - i_start <= edge_chunk_size); ptrdiff_t i; <LOOP-START>for (i = i_start; i < i_end; ++i) { int64_t v0 = get_v0_from_edge(&buf[i]); int64_t v1 = get_v1_from_edge(&buf[i]); edge_endpoint[(i - i_start) * 2 + 0] = v0; edge_endpoint[(i - i_start) * 2 + 1] = v1; }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for
100
pred(2 * (i_end - i_start), edge_endpoint, edge_owner, edge_local); begin_gather(pred_win); <LOOP-START>for (i = i_start; i < i_end; ++i) { add_gather_request(pred_win, (i - i_start) * 2 + 0, edge_owner[(i - i_start) * 2 + 0], edge_local[(i - i_start) * 2 + 0], (i - i_start) * 2 + 0); add_gather_request(pred_win, (i - i_start) * 2 + 1, edge_owner[(i - i_start) * 2 + 1], edge_local[(i - i_start) * 2 + 1], (i - i_start) * 2 + 1); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed) reduction(+:edge_visit_count)
100
) * 2 + 1); } end_gather(pred_win); begin_scatter_constant(pred_valid_win); <LOOP-START>for (i = i_start; i < i_end; ++i) { int64_t src = get_v0_from_edge(&buf[i]); int64_t tgt = get_v1_from_edge(&buf[i]); uint16_t src_depth = get_depth_from_pred_entry(edge_preds[(i - i_start) * 2 + 0]); uint16_t tgt_depth = get_depth_from_pred_entry(edge_preds[(i - i_start) * 2 + 1]); if (src_depth != UINT16_MAX && tgt_depth == UINT16_MAX) { fprintf(stderr, "%d: Validation error: edge connects vertex %" PRId64 " in the BFS tree (depth %" PRIu16 ") to vertex %" PRId64 " outside the tree.\n", rank, src, src_depth, tgt); validation_passed = 0; } else if (src_depth == UINT16_MAX && tgt_depth != UINT16_MAX) { fprintf(stderr, "%d: Validation error: edge connects vertex %" PRId64 " in the BFS tree (depth %" PRIu16 ") to vertex %" PRId64 " outside the tree.\n", rank, tgt, tgt_depth, src); validation_passed = 0; } else if (src_depth - tgt_depth < -1 || src_depth - tgt_depth > 1) { fprintf(stderr, "%d: Validation error: depths of edge endpoints %" PRId64 " (depth %" PRIu16 ") and %" PRId64 " (depth %" PRIu16 ") are too far apart (abs. val. > 1).\n", rank, src, src_depth, tgt, tgt_depth); validation_passed = 0; } else if (src_depth != UINT16_MAX) { ++edge_visit_count; } if (get_pred_from_pred_entry(edge_preds[(i - i_start) * 2 + 0]) == tgt) { add_scatter_constant_request(pred_valid_win, edge_owner[(i - i_start) * 2 + 0], edge_local[(i - i_start) * 2 + 0], (i - i_start) * 2 + 0); } if (get_pred_from_pred_entry(edge_preds[(i - i_start) * 2 + 1]) == src) { add_scatter_constant_request(pred_valid_win, edge_owner[(i - i_start) * 2 + 1], edge_local[(i - i_start) * 2 + 1], (i - i_start) * 2 + 1); } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed) reduction(+:edge_visit_count)<OMP-END>
cea-hpc/pcvs-benchmarks/applications/Corals/graph500-2.1.4/mpi/validate.c
#pragma omp parallel for reduction(&&:validation_passed)
100
dge_local); free(edge_endpoint); destroy_scatter_constant(pred_valid_win); ptrdiff_t i; <LOOP-START>for (i = 0; i < (ptrdiff_t)nlocalverts; ++i) { int64_t p = get_pred_from_pred_entry(pred[i]); if (p == -1) continue; int found_pred_edge = pred_valid[i]; if (root_owner == rank && root_local == (size_t)i) found_pred_edge = 1; /* Root vertex */ if (!found_pred_edge) { int64_t v = vertex_to_global_for_pred(rank, i); fprintf(stderr, "%d: Validation error: no graph edge from vertex %" PRId64 " to its parent %" PRId64 ".\n", rank, v, get_pred_from_pred_entry(pred[i])); validation_passed = 0; } }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(&&:validation_passed)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:sum)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
bit_and=1; bit_or=0; exclusiv_bit_or=0; known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2; <ompts:orphan> <LOOP-START>for (i=1;i<=LOOPCOUNT;i++) { sum=sum+i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:sum)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:diff)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
integers: Result was %d instead of %d\n",sum,known_sum); } diff = (LOOPCOUNT*(LOOPCOUNT+1))/2; <LOOP-START>for (i=1;i<=LOOPCOUNT;++i) { diff=diff-i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:diff)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:dsum)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
s */ dsum=0; dpt=1; for (i=0;i<DOUBLE_DIGITS;++i) { dpt*=dt; } dknown_sum = (1-dpt)/(1-dt); <LOOP-START>for (i=0;i<DOUBLE_DIGITS;++i) { dsum += pow(dt,i); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:dsum)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:ddiff)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
; for (i=0;i<DOUBLE_DIGITS;++i) { dpt*=dt; } fprintf(logFile,"\n"); ddiff = (1-dpt)/(1-dt); <LOOP-START>for (i=0;i<DOUBLE_DIGITS;++i) { ddiff -= pow(dt,i); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:ddiff)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(*:product)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
+; fprintf(logFile,"Error in Difference with doubles: Result was %E instead of 0.0\n",ddiff); } <LOOP-START>for(i=1;i<=MAX_FACTOR;i++) { product *= i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(*:product)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
s %d instead of %d\n\n",product,known_product); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=1; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_and = (logic_and && logics[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
++; fprintf(logFile,"Error in logic AND part 1.\n"); } logic_and = 1; logics[LOOPCOUNT/2]=0; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_and = logic_and && logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
printf(logFile,"Error in logic AND part 2.\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_or = logic_or || logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
ult++; fprintf(logFile,"Error in logic OR part 1.\n"); } logic_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_or = logic_or || logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
printf(logFile,"Error in logic OR part 2.\n"); } for(i=0;i<LOOPCOUNT;++i) { logics[i]=1; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_and = (bit_and & logics[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
sult++; fprintf(logFile,"Error in BIT AND part 1.\n"); } bit_and = 1; logics[LOOPCOUNT/2]=0; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_and = bit_and & logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
fprintf(logFile,"Error in BIT AND part 2.\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_or = bit_or | logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
result++; fprintf(logFile,"Error in BIT OR part 1\n"); } bit_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_or = bit_or | logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
fprintf(logFile,"Error in BIT OR part 2\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { exclusiv_bit_or = exclusiv_bit_or ^ logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
tf(logFile,"Error in EXCLUSIV BIT OR part 1\n"); } exclusiv_bit_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { exclusiv_bit_or = exclusiv_bit_or ^ logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_private.c
#pragma omp parallel for reduction(+:sum) schedule(static,1) private(i) <ompts:check>private(i2)</ompts:check>
100
m; int i; int i2; </ompts:orphan:vars> sum =0; i2=0; int known_sum; <LOOP-START><ompts:orphan> for (i=1;i<=LOOPCOUNT;i++) { i2 = i; #pragma omp flush do_some_work (); #pragma omp flush sum = sum + i2; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum) schedule(static,1) private(i) <ompts:check>private(i2)</ompts:check><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_ordered.c
#pragma omp parallel for schedule(static,1) private(i) <ompts:check>ordered</ompts:check>
100
is_larger; </ompts:orphan:vars> int known_sum; int i; sum = 0; is_larger = 1; last_i = 0; <LOOP-START>for (i = 1; i < 100; i++) { ii = i; <ompts:orphan> <ompts:check>#pragma omp ordered</ompts:check><ompts:crosscheck></ompts:crosscheck> { is_larger = check_i_islarger2 (ii) && is_larger; sum = sum + ii; } </ompts:orphan> }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static,1) private(i) <ompts:check>ordered</ompts:check><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:sum)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
lusiv_bit_or=0; result=0; dt = 1./3.; known_sum = (LOOPCOUNT*(LOOPCOUNT+1))/2; <ompts:orphan> <LOOP-START>for (i=1;i<=LOOPCOUNT;i++) { sum=sum+i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:sum)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:diff)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
integers: Result was %d instead of %d\n",sum,known_sum); } diff = (LOOPCOUNT*(LOOPCOUNT+1))/2; <LOOP-START>for (i=1;i<=LOOPCOUNT;++i) { diff=diff-i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:diff)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:dsum)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
s */ dsum=0; dpt=1; for (i=0;i<DOUBLE_DIGITS;++i) { dpt*=dt; } dknown_sum = (1-dpt)/(1-dt); <LOOP-START>for (i=0;i<DOUBLE_DIGITS;++i) { dsum += pow(dt,i); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(+:dsum)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:ddiff)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
; for (i=0;i<DOUBLE_DIGITS;++i) { dpt*=dt; } fprintf(logFile,"\n"); ddiff = (1-dpt)/(1-dt); <LOOP-START>for (i=0;i<DOUBLE_DIGITS;++i) { ddiff -= pow(dt,i); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(-:ddiff)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(*:product)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
+; fprintf(logFile,"Error in Difference with doubles: Result was %E instead of 0.0\n",ddiff); } <LOOP-START>for(i=1;i<=MAX_FACTOR;i++) { product *= i; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(*:product)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
s %d instead of %d\n\n",product,known_product); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=1; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_and = (logic_and && logics[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
++; fprintf(logFile,"Error in logic AND part 1.\n"); } logic_and = 1; logics[LOOPCOUNT/2]=0; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_and = logic_and && logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&&:logic_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
printf(logFile,"Error in logic AND part 2.\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_or = logic_or || logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
ult++; fprintf(logFile,"Error in logic OR part 1.\n"); } logic_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { logic_or = logic_or || logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(||:logic_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
printf(logFile,"Error in logic OR part 2.\n"); } for(i=0;i<LOOPCOUNT;++i) { logics[i]=1; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_and = (bit_and & logics[i]); }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
sult++; fprintf(logFile,"Error in BIT AND part 1.\n"); } bit_and = 1; logics[LOOPCOUNT/2]=0; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_and = bit_and & logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(&:bit_and)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
fprintf(logFile,"Error in BIT AND part 2.\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_or = bit_or | logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
result++; fprintf(logFile,"Error in BIT OR part 1\n"); } bit_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { bit_or = bit_or | logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(|:bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
fprintf(logFile,"Error in BIT OR part 2\n"); } for(i=0;i<LOOPCOUNT;i++) { logics[i]=0; } <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { exclusiv_bit_or = exclusiv_bit_or ^ logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_reduction.c
#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck>
100
tf(logFile,"Error in EXCLUSIV BIT OR part 1\n"); } exclusiv_bit_or = 0; logics[LOOPCOUNT/2]=1; <LOOP-START>for(i=0;i<LOOPCOUNT;++i) { exclusiv_bit_or = exclusiv_bit_or ^ logics[i]; }<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic,1) private(i) <ompts:check>reduction(^:exclusiv_bit_or)</ompts:check><ompts:crosscheck></ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_lastprivate.c
#pragma omp parallel for reduction(+:sum) schedule(static,7) private(i) <ompts:check>lastprivate(i0)</ompts:check><ompts:crosscheck>private(i0)</ompts:crosscheck>
100
sum; int i; int i0; </ompts:orphan:vars> sum =0; i0 = -1; int known_sum; <LOOP-START><ompts:orphan> for (i = 1; i <= LOOPCOUNT; i++) { sum = sum + i; i0 = i; }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum) schedule(static,7) private(i) <ompts:check>lastprivate(i0)</ompts:check><ompts:crosscheck>private(i0)</ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_if.c
#pragma omp parallel for private(i) <ompts:check>if (control==1)</ompts:check>
100
t control; </ompts:orphan:vars> control = 0; num_threads=0; sum = 0; sum2 = 0; <LOOP-START><ompts:orphan> for (i=0; i <= LOOPCOUNT; i++) { num_threads = omp_get_num_threads(); sum = sum + i; }<LOOP-END> <OMP-START>#pragma omp parallel for private(i) <ompts:check>if (control==1)</ompts:check><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/OpenUH/c/omp_parallel_for_firstprivate.c
#pragma omp parallel for reduction(+:sum) private(i) <ompts:check>firstprivate(i2)</ompts:check><ompts:crosscheck>private(i2)</ompts:crosscheck>
100
; int i2; int i; </ompts:orphan:vars> sum=0; i2=3; int known_sum; <LOOP-START><ompts:orphan> for (i = 1; i <= LOOPCOUNT; i++) { sum = sum + (i + i2); }<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:sum) private(i) <ompts:check>firstprivate(i2)</ompts:check><ompts:crosscheck>private(i2)</ompts:crosscheck><OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/EPCC/C/syncbench.c
#pragma omp parallel for
100
aylength); } } } } void testpfor() { int i, j; for (j = 0; j < innerreps; j++) { <LOOP-START>for (i = 0; i < nthreads; i++) { delay(delaylength); }<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/EPCC/C/syncbench.c
#pragma omp parallel for ordered schedule (static,1)
100
ck); delay(delaylength); omp_unset_lock(&lock); } } } void testorder() { int j; <LOOP-START>for (j = 0; j < (int)innerreps; j++) { #pragma omp ordered delay(delaylength); }<LOOP-END> <OMP-START>#pragma omp parallel for ordered schedule (static,1)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module two's work using "omp parallel for schedule(static)" * (contains 2 subcycles) */ void static_omp_module2() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module three's work using "omp parallel for schedule(static)" * (contains 3 subcycles) */ void static_omp_module3() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module three's work using "omp parallel for schedule(static)" * (contains 3 subcycles) */ void static_omp_module3() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(static)" * (contains 4 subcycles) */ void static_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(static)" * (contains 4 subcycles) */ void static_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(static)" * (contains 4 subcycles) */ void static_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do one cycle (10 subcycles) using "omp parallel for schedule(static)" */ void static_omp_cycle() { /* Emulate calls to 4 different packages, do 10 subcycles total */ static_omp_module1(); static_omp_module2(); static_omp_module3(); static_omp_module4(); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do one cycle (10 subcycles) using "omp parallel for schedule(static)" */ void static_omp_cycle() { /* Emulate calls to 4 different packages, do 10 subcycles total */ static_omp_module1(); static_omp_module2(); static_omp_module3(); static_omp_module4(); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(static) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do one cycle (10 subcycles) using "omp parallel for schedule(static)" */ void static_omp_cycle() { /* Emulate calls to 4 different packages, do 10 subcycles total */ static_omp_module1(); static_omp_module2(); static_omp_module3(); static_omp_module4(); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(static)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do one cycle (10 subcycles) using "omp parallel for schedule(static)" */ void static_omp_cycle() { /* Emulate calls to 4 different packages, do 10 subcycles total */ static_omp_module1(); static_omp_module2(); static_omp_module3(); static_omp_module4(); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(static)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module two's work using "omp parallel for schedule(dynamic)" * (contains 2 subcycles) */ void dynamic_omp_module2() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 2 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module three's work using "omp parallel for schedule(dynamic)" * (contains 3 subcycles) */ void dynamic_omp_module3() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module three's work using "omp parallel for schedule(dynamic)" * (contains 3 subcycles) */ void dynamic_omp_module3() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(dynamic)" * (contains 4 subcycles) */ void dynamic_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 3 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(dynamic)" * (contains 4 subcycles) */ void dynamic_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do module four's work using "omp parallel for schedule(dynamic)" * (contains 4 subcycles) */ void dynamic_omp_module4() { double deposit; long pidx; /* ---------------- SUBCYCLE 1 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>
cea-hpc/pcvs-benchmarks/OpenMP/CLOMP/clomp.c
#pragma omp parallel for private (pidx) schedule(dynamic)
100
posit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ <LOOP-START>for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 2 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 3 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); /* ---------------- SUBCYCLE 4 OF 4 ----------------- */ /* Calculate deposit for this subcycle based on last subcycle's residue */ deposit = calc_deposit (); /* Scan through zones and add appropriate deposit to each zone */ #pragma omp parallel for private (pidx) schedule(dynamic) for (pidx = 0; pidx < CLOMP_numParts; pidx++) update_part (partArray[pidx], deposit); } /* Do one cycle (10 subcycles) using "omp parallel for schedule(dynamic)" */ void dynamic_omp_cycle() { /* Emulate calls to 4 different packages, do 10 subcycles total */ dynamic_omp_module1(); dynamic_omp_module2(); dynamic_omp_module3(); dynamic_omp_module4(); }<LOOP-END> <OMP-START>#pragma omp parallel for private (pidx) schedule(dynamic)<OMP-END>