From 35c63e58ce032037de22cce0f966e152a557a2cc Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Tue, 24 Jun 2008 10:50:05 +0000
Subject: [PATCH] * Small bug, if not compiled with openmp

---
 AMDiS/src/CreatorMap.cc                | 2 ++
 AMDiS/src/ResidualParallelEstimator.cc | 3 +++
 AMDiS/src/ResidualParallelEstimator.h  | 4 ++++
 3 files changed, 9 insertions(+)

diff --git a/AMDiS/src/CreatorMap.cc b/AMDiS/src/CreatorMap.cc
index 13694e00..47e36b01 100644
--- a/AMDiS/src/CreatorMap.cc
+++ b/AMDiS/src/CreatorMap.cc
@@ -225,8 +225,10 @@ namespace AMDiS {
     creator = NEW ResidualEstimator::Creator;
     addCreator("residual", creator);
 
+#ifdef _OPENMP
     creator = NEW ResidualParallelEstimator::Creator;
     addCreator("residualparallel", creator);
+#endif
 
     creator = NEW RecoveryEstimator::Creator;
     addCreator("recovery", creator);
diff --git a/AMDiS/src/ResidualParallelEstimator.cc b/AMDiS/src/ResidualParallelEstimator.cc
index 80960891..467236b4 100644
--- a/AMDiS/src/ResidualParallelEstimator.cc
+++ b/AMDiS/src/ResidualParallelEstimator.cc
@@ -4,6 +4,8 @@
 #include "Parameters.h"
 #include "OpenMP.h"
 
+#ifdef _OPENMP
+
 namespace AMDiS {
   ResidualParallelEstimator::ResidualParallelEstimator(::std::string name, int r)
     : Estimator(name, r),
@@ -106,3 +108,4 @@ namespace AMDiS {
 
 }
 
+#endif // _OPENMP
diff --git a/AMDiS/src/ResidualParallelEstimator.h b/AMDiS/src/ResidualParallelEstimator.h
index d68173ba..7e819c65 100644
--- a/AMDiS/src/ResidualParallelEstimator.h
+++ b/AMDiS/src/ResidualParallelEstimator.h
@@ -26,6 +26,8 @@
 #ifndef AMDIS_RESIDUALPARALLELESTIMATOR_H
 #define AMDIS_RESIDUALPARALLELESTIMATOR_H
 
+#ifdef _OPENMP
+
 #include "ResidualEstimator.h"
 #include <vector>
 
@@ -106,4 +108,6 @@ namespace AMDiS {
   
 }
 
+#endif  // _OPENMP
+
 #endif // AMDIS_RESIDUALPARALLELESTIMATOR_H
-- 
GitLab