]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
A bunch of bugfixes for mpi support
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Sep 2012 13:46:20 +0000 (13:46 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Sep 2012 13:46:20 +0000 (13:46 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26724 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_1_mpi.cmake
deal.II/cmake/configure/configure_petsc.cmake
deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/config/Config.cmake.in
deal.II/source/lac/constraint_matrix.inst.in

index 2b824ee9b73a7dbf0b2b396f7a83c92e319ad680..07017f682e5d7a8eddcafb9f2be7df7075e9ea42 100644 (file)
@@ -28,13 +28,16 @@ MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL var)
   # The user has to know the location of the mpi headers as well:
   LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MPI_CXX_INCLUDE_PATH})
 
-  # TODO: Set up the rest:
 
-  #MPI_CXX_COMPILER        MPI Compiler wrapper for CXX
-  #MPIEXEC                 Executable for running MPI programs
-  #MPIEXEC_NUMPROC_FLAG    Flag to pass to MPIEXEC before giving it the number of processors to run on
-  #MPIEXEC_PREFLAGS        Flags to pass to MPIEXEC directly before the executable to run.
-  #MPIEXEC_POSTFLAGS       Flags to pass to MPIEXEC after other flags
+  SET(DEAL_II_SET_MPI_COMPILER ON CACHE BOOL
+    "Set compiler to the detected mpi wrapper"
+    )
+  MARK_AS_ADVANCED(DEAL_II_SET_MPI_COMPILER)
+
+  IF(DEAL_II_SET_MPI_COMPILER)
+    SET(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
+    SET(CMAKE_C_COMPILER   ${MPI_C_COMPILER})
+  ENDIF()
 
   SET(DEAL_II_COMPILER_SUPPORTS_MPI TRUE)
 
index e5dfc46dc07f0b7fe64446cc9669dd9e013660a7..a8c452bcc6f18b02e7351405b06da69ed2caa5fa 100644 (file)
@@ -79,9 +79,12 @@ MACRO(FEATURE_PETSC_CONFIGURE_EXTERNAL var)
   ENDIF()
 
   SET(DEAL_II_EXPAND_PETSC_VECTOR "PETScWrappers::Vector")
-  SET(DEAL_II_EXPAND_PETSC_MPI_VECTOR "PETScWrappers::MPI::Vector")
   SET(DEAL_II_EXPAND_PETSC_BLOCKVECTOR "PETScWrappers::BlockVector")
-  SET(DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR "PETScWrappers::MPI::BlockVector")
+
+  IF(DEAL_II_WITH_MPI)
+    SET(DEAL_II_EXPAND_PETSC_MPI_VECTOR "PETScWrappers::MPI::Vector")
+    SET(DEAL_II_EXPAND_PETSC_MPI_BLOCKVECTOR "PETScWrappers::MPI::BlockVector")
+  ENDIF()
 
   SET(${var} TRUE)
 ENDMACRO()
index d2e6efeccc0af075fecad8fdb79bbd5529e6ea09..33a2b4cf237bdf8adced5704f3eba093465aab94 100644 (file)
@@ -161,12 +161,15 @@ MACRO(FEATURE_TRILINOS_CONFIGURE_EXTERNAL var)
   SET(DEAL_II_USE_TRILINOS TRUE)
 
   SET(DEAL_II_EXPAND_TRILINOS_VECTOR "TrilinosWrappers::Vector")
-  SET(DEAL_II_EXPAND_TRILINOS_MPI_VECTOR "TrilinosWrappers::MPI::Vector")
   SET(DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR "TrilinosWrappers::BlockVector")
-  SET(DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR "TrilinosWrappers::MPI::BlockVector")
   SET(DEAL_II_EXPAND_TRILINOS_SPARSITY_PATTERN "TrilinosWrappers::SparsityPattern")
   SET(DEAL_II_EXPAND_TRILINOS_BLOCK_SPARSITY_PATTERN "TrilinosWrappers::BlockSparsityPattern")
 
+  IF(DEAL_II_WITH_MPI)
+    SET(DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR "TrilinosWrappers::MPI::BlockVector")
+    SET(DEAL_II_EXPAND_TRILINOS_MPI_VECTOR "TrilinosWrappers::MPI::Vector")
+  ENDIF()
+
 
   #
   #  used with -W -Wall (which includes -Wunused). Regrettable
index 899927523cb97fca0eb1172e6745a8dc7a6cfed3..25b38952fd1d5c7f6a4146b9817f5b587915b45d 100644 (file)
@@ -17,6 +17,10 @@ MARK_AS_ADVANCED(file_cmd)
 #
 FOREACH(flags ${deal_ii_used_flags})
   SET(${flags} "${${flags}} ${${flags}_SAVED}")
+  #
+  # Strip leading and trailing whitespace:
+  #
+  STRING(STRIP "${flags}" flags)
 ENDFOREACH()
 
 
@@ -39,6 +43,7 @@ MESSAGE("
       CMAKE_BINARY_DIR:       ${CMAKE_BINARY_DIR}
 
       CMAKE_CXX_COMPILER:     ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}
+                              ${CMAKE_CXX_COMPILER}
 
 Compiler flags used for this build:
       CMAKE_CXX_FLAGS:                     ${CMAKE_CXX_FLAGS}")
@@ -61,6 +66,7 @@ IF(FEATURE_UMFPACK_CONTRIB_CONFIGURED)
   MESSAGE("
 The contrib UMFPACK library will be compiled with the following C compiler:
       CMAKE_C_COMPILER:         ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}
+                                ${CMAKE_C_COMPILER}
       CMAKE_C_FLAGS:           ${CMAKE_C_FLAGS}")
   IF(CMAKE_BUILD_TYPE MATCHES "Release")
     MESSAGE("      DEAL_II_C_FLAGS_RELEASE: ${DEAL_II_C_FLAGS_RELEASE}")
index 257e0c8e569ffeb4154fa37e019f433caa47b87b..f96c2666faa525500894f8ecd86823ad2a7e5df0 100644 (file)
@@ -57,7 +57,6 @@ SET(DEAL_II_LINKER_FLAGS_RELEASE "${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}")
 SET(DEAL_II_LINKER "${CMAKE_LINKER}")
 SET(DEAL_II_AR "${CMAKE_AR}")
 
-
 #
 # Information on where to find the deal.II libraries and headers
 #
index b457cfb8e4ae5dfad757e55fd13b833c29d6d5a4..400f44cd4f28da04e519f9937dfa24eb273ab2e5 100644 (file)
@@ -34,7 +34,7 @@ for (V: EXTERNAL_SEQUENTIAL_VECTORS)
   }
 
 
-for (V: EXTERNAL_DISTRIBUTED_VECTORS)
+for (V: EXTERNAL_PARALLEL_VECTORS)
   {
     template void ConstraintMatrix::set_zero<V >(V&) const;
   }

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.