From c9f0c3058b60eaa4ce397034d3fd1cc722853664 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Wed, 1 Oct 2008 09:30:01 +0000
Subject: [PATCH] * Bugfix for "parallel omp barrier" with intel compiler

---
 AMDiS/src/ProblemVec.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index 532c6590..81dd6b45 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -943,6 +943,10 @@ namespace AMDiS {
 	tmpVector->set(0.0);
       }
 
+      // Because we are using the parallel traverse stack, each thread will
+      // traverse only a part of the mesh.
+      ElInfo *elInfo = stack.traverseFirst(mesh, -1, assembleFlag);
+
       // After creating privat copies of the DOFMatrix and the DOFVector, all threads
       // have to wait at this barrier. Especially for small problems this is required,
       // because otherwise one thread may be finished with assembling, before another
@@ -950,10 +954,6 @@ namespace AMDiS {
 #ifdef _OPENMP
 #pragma omp barrier
 #endif
-
-      // Because we are using the parallel traverse stack, each thread will
-      // traverse only a part of the mesh.
-      ElInfo *elInfo = stack.traverseFirst(mesh, -1, assembleFlag);
       while (elInfo) {
 	if (useGetBound_) {
 	  basisFcts->getBound(elInfo, bound);
-- 
GitLab