Permalink
Browse files

Some OpenMP fixes.

  • Loading branch information...
1 parent 11bc002 commit 2f1837a34c4eb164fae11c4f0532f2ebcb3f50fa @l-korous l-korous committed Mar 3, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −1 CMakeLists.txt
  2. +0 −2 hermes2d/test_examples/04-complex-adapt/main.cpp
View
@@ -100,7 +100,7 @@ project(hermes)
#
# Enable OpenMP for shared memory processing.
#
- set(WITH_OPENMP NO)
+ set(WITH_OPENMP YES)
# If MPI is enabled, the MPI library installed on the system should be found by
# CMake automatically. If the found library doesn't match the one used to compile the
@@ -194,6 +194,11 @@ project(hermes)
endif()
endif()
+ if(NOT(WITH_OPENMP))
+ set(NUM_THREADS 1)
+ endif(NOT(WITH_OPENMP))
+
+
MESSAGE(STATUS "Hermes will by default be using ${NUM_THREADS} threads for calculation.")
macro (DETERMINE_HERMES_COMMON_RELEASE_DEBUG HXD)
@@ -74,8 +74,6 @@ int main(int argc, char* argv[])
MeshReaderH2D mloader;
mloader.load("domain.mesh", &mesh);
- Hermes2DApi.set_integral_param_value(numThreads, 1);
-
// Perform initial mesh refinements.
for (int i = 0; i < INIT_REF_NUM; i++) mesh.refine_all_elements();

0 comments on commit 2f1837a

Please sign in to comment.