]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
PETSc examples work with threading enabled at configure time. Turn off at runtime.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Mar 2013 20:18:22 +0000 (20:18 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Mar 2013 20:18:22 +0000 (20:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@29047 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-17/CMakeLists.txt
deal.II/examples/step-17/step-17.cc
deal.II/examples/step-18/CMakeLists.txt
deal.II/examples/step-18/step-18.cc
deal.II/examples/step-36/CMakeLists.txt
deal.II/examples/step-36/step-36.cc
deal.II/examples/step-40/CMakeLists.txt
deal.II/examples/step-40/step-40.cc

index f49c2263328f46ab84d8cbd6a9ad1ca6854bf22f..77d825f29b0c64575e63fb81d45b72137614fe7b 100644 (file)
@@ -30,11 +30,10 @@ ENDIF ()
 #
 # Are all dependencies fullfilled?
 #
-IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_THREADS)
+IF(NOT DEAL_II_WITH_PETSC)
   MESSAGE(FATAL_ERROR "
 Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
     DEAL_II_WITH_PETSC = ON
-    DEAL_II_WITH_THREADS = OFF
 which is required for this tutorial step."
     )
 ENDIF()
index 34cfece8430469a1e1ee375571d2929dedfd8d34..9f7f7c6b14b0cf7d7cdc100097c0c9ae955e8bad 100644 (file)
@@ -908,8 +908,7 @@ int main (int argc, char **argv)
       // destructor of <code>elastic_problem</code> would run after
       // <code>PetscFinalize</code>; since the destructor involves calls to
       // PETSc functions, we would get strange error messages from PETSc.)
-      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
-
+      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
       {
         deallog.depth_console (0);
 
index a0b84d2c0db20757a3679f4baaa7cb9afa80fb89..c1e1076991e81c7b55779d1db35b5e8ec1559fbe 100644 (file)
@@ -30,11 +30,10 @@ ENDIF ()
 #
 # Are all dependencies fullfilled?
 #
-IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_THREADS)
+IF(NOT DEAL_II_WITH_PETSC)
   MESSAGE(FATAL_ERROR "
 Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
     DEAL_II_WITH_PETSC = ON
-    DEAL_II_WITH_THREADS = OFF
 which is required for this tutorial step."
     )
 ENDIF()
index 92871e9f4e1f7686b6eab92f9ebe1950df2a2e05..607d760ecb0b4d046d093f92ce85482202aff46b 100644 (file)
@@ -1989,7 +1989,7 @@ int main (int argc, char **argv)
       using namespace dealii;
       using namespace Step18;
 
-      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
+      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
       {
         deallog.depth_console (0);
 
index cabd34cc91f63429cb2e9f3ae103dd320cf7f453..5e72c8ca3e2f780490236c2bf3933e0b0e38b4c0 100644 (file)
@@ -29,12 +29,11 @@ ENDIF()
 #
 # Are all dependencies fullfilled?
 #
-IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_SLEPC OR DEAL_II_WITH_THREADS)
+IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_SLEPC)
   MESSAGE(FATAL_ERROR "
 Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
     DEAL_II_WITH_PETSC = ON
     DEAL_II_WITH_SLEPC = ON
-    DEAL_II_WITH_THREADS = OFF
 which is required for this tutorial step."
     )
 ENDIF()
index e018e89f44ad17f7c3ec4429c8b7c4fc20f162d5..6a4fc8651c2f513d463c47f419ef71b5d338ae9d 100644 (file)
@@ -426,12 +426,7 @@ int main (int argc, char **argv)
   try
     {
 
-      // Here is another difference from other steps: We initialize the SLEPc
-      // work space which inherently initializes the PETSc work space, then go
-      // ahead run the whole program. After that is done, we finalize the
-      // SLEPc-PETSc work.
-      SlepcInitialize (&argc, &argv, 0, 0);
-
+      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
       {
         using namespace dealii;
         using namespace Step36;
@@ -441,8 +436,6 @@ int main (int argc, char **argv)
         EigenvalueProblem<2> problem ("step-36.prm");
         problem.run ();
       }
-
-      SlepcFinalize ();
     }
 
   // All the while, we are watching out if any exceptions should have been
index 65ebf1d444267b58ee14dd1545e7070d2e114198..ed9f3e4c1da74036fb608ffbe50f576680ef2e7e 100644 (file)
@@ -29,12 +29,11 @@ ENDIF()
 #
 # Are all dependencies fullfilled?
 #
-IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_P4EST OR DEAL_II_WITH_THREADS)
+IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_P4EST)
   MESSAGE(FATAL_ERROR "
 Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
     DEAL_II_WITH_PETSC = ON
     DEAL_II_WITH_P4EST = ON
-    DEAL_II_WITH_THREADS = OFF
 which is required for this tutorial step."
     )
 ENDIF()
index 5c2ce3bbee61d076ce9cfad15b1c82090173bb66..5b9d32310c55c528395f94b01378ea7054923cbe 100644 (file)
@@ -650,7 +650,7 @@ int main(int argc, char *argv[])
       using namespace dealii;
       using namespace Step40;
 
-      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
+      Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
       deallog.depth_console (0);
 
       {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.