diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-03-21 21:04:57 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-03-21 21:04:57 -0500 |
commit | a76cbfe23aa7aecca87b179566fe78ea7a45e320 (patch) | |
tree | 4f3e978e27b166ba30108b50702cc95a4d22c91b /Carpet/CarpetLib/src/data.cc | |
parent | 8e2769a2bb1a190d5b3b715b745dd30695896b77 (diff) |
OpenMP changes:
Use #pragma instead of _Pragma for OpenMP directives. The PGI compilers do
not understand the _Pragma syntax.
Use int instead of ptrdiff_t for loop variables which are parallelised via
OpenMP. The PGI compilers cannot handle ptrdiff_t.
Diffstat (limited to 'Carpet/CarpetLib/src/data.cc')
-rw-r--r-- | Carpet/CarpetLib/src/data.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc index bad80a00a..da1f8ab56 100644 --- a/Carpet/CarpetLib/src/data.cc +++ b/Carpet/CarpetLib/src/data.cc @@ -58,7 +58,8 @@ call_operator (void # if ! defined (CARPET_OPTIMISE) ibset allregbboxes; # endif - _Pragma ("omp parallel") { +#pragma omp parallel + { int const num_threads = omp_get_num_threads(); int const thread_num = omp_get_thread_num(); // Parallelise in z direction @@ -83,9 +84,8 @@ call_operator (void if (not myregbbox.empty()) { (* the_operator) (src, srcext, dst, dstext, srcbbox, dstbbox, myregbbox); # if ! defined (NDEBUG) && ! defined (CARPET_OPTIMISE) - _Pragma ("omp critical") { - allregbboxes += myregbbox; - } +#pragma omp critical + allregbboxes += myregbbox; # endif } } |