]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add support for metis
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 16 Sep 2012 18:39:56 +0000 (18:39 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 16 Sep 2012 18:39:56 +0000 (18:39 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26415 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/contrib/cmake/configure/configure_metis.cmake [new file with mode: 0644]
deal.II/contrib/cmake/configure/configure_netcdf.cmake
deal.II/contrib/cmake/modules/FindAMD.cmake
deal.II/contrib/cmake/modules/FindMETIS.cmake [new file with mode: 0644]
deal.II/contrib/cmake/modules/FindNETCDF.cmake
deal.II/contrib/cmake/modules/FindTBB.cmake
deal.II/contrib/cmake/modules/FindUMFPACK.cmake
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old

index 8a7952e4fdceaf79ebbf6f3480167c7a9b8985ef..9a6228be65e8bb6d4223637cc7a7225178b0ac60 100644 (file)
@@ -113,7 +113,7 @@ OPTION(DEAL_II_WITH_LAPACK
 
 OPTION(DEAL_II_WITH_METIS
   "Build deal.II with support for Metis."
-  OFF)
+  ON)
 
 OPTION(DEAL_II_WITH_MPI
   "Build deal.II with support for mpi."
@@ -121,7 +121,7 @@ OPTION(DEAL_II_WITH_MPI
 
 OPTION(DEAL_II_WITH_NETCDF
   "Build deal.II with support for netcdf."
-  OFF)
+  ON)
 
 OPTION(DEAL_II_WITH_TBB
   "Build deal.II with support for tbb. This will enable thread support in deal.II."
@@ -132,7 +132,7 @@ OPTION(DEAL_II_FORCE_CONTRIB_TBB
 
 OPTION(DEAL_II_WITH_UMFPACK
   "Build deal.II with support for UMFPACK."
-  ON)
+  OFF)
 OPTION(DEAL_II_FORCE_CONTRIB_UMFPACK
   "Always use the bundled umfpack library instead of an external one."
   OFF)
@@ -143,7 +143,7 @@ OPTION(DEAL_II_WITH_ZLIB
 
 OPTION(DEAL_II_FORCE_CONTRIB_BOOST
   "Always use the bundled boost library instead of an external one."
-  ON)
+  OFF)
 
 
 #
@@ -259,6 +259,8 @@ INCLUDE(configure_umfpack)
 
 INCLUDE(configure_functionparser)
 
+INCLUDE(configure_metis)
+
 INCLUDE(configure_mpi)
 
 INCLUDE(configure_netcdf)
diff --git a/deal.II/contrib/cmake/configure/configure_metis.cmake b/deal.II/contrib/cmake/configure/configure_metis.cmake
new file mode 100644 (file)
index 0000000..f749799
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Configuration for the netcdf library:
+#
+
+MACRO(FIND_FEATURE_METIS_EXTERNAL var)
+
+  FIND_PACKAGE(METIS)
+
+  IF(METIS_FOUND)
+    SET(${var} TRUE)
+  ENDIF()
+
+ENDMACRO()
+
+
+MACRO(CONFIGURE_FEATURE_METIS_EXTERNAL var)
+
+  INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIR})
+  LIST(APPEND deal_ii_external_libraries ${METIS_LIBRARY})
+
+  SET(DEAL_II_USE_METIS TRUE)
+
+  SET(${var} TRUE)
+ENDMACRO()
+
+
+MACRO(CONFIGURE_FEATURE_METIS_ERROR_MESSAGE)
+
+  MESSAGE(SEND_ERROR "
+Could not find the metis library!
+
+Please ensure that the metis library is installed on your computer.
+If the library is not at a default location, either provide some hints
+via environment variables:
+METIS_LIBRARY_DIR METIS_INCLUDE_DIR
+Or set the relevant variables by hand in ccmake.
+
+")
+
+ENDMACRO()
+
+
+CONFIGURE_FEATURE(METIS)
index 6afb37a9e75e3c06336936822241a5587f9a903b..102d19400df7ee44bda0cc6613086c3b94877ade 100644 (file)
@@ -30,7 +30,9 @@ Could not find the netcdf library!
 
 Please ensure that the netcdf library is installed on your computer.
 If the library is not at a default location, either provide some hints
-for the autodetection, or set the relevant variables by hand in ccmake.
+via environment variables:
+NETCDF_LIBRARY_DIR NETCDF_INCLUDE_DIR
+Or set the relevant variables by hand in ccmake.
 
 ")
 
index d8e96d8c405e73ce1fb8f0fb45abc4b014ea2602..b595db9829c84ea4d3b8142e0228f6075530d0e4 100644 (file)
@@ -9,7 +9,7 @@ FIND_PATH(AMD_INCLUDE_DIR amd.h
 )
 
 FIND_LIBRARY(AMD_LIBRARY
-  NAMES libumfpack.so
+  NAMES amd
   PATHS
   $ENV{AMD_LIBRARY_DIR}
   ${AMD_LIBRARY_DIR}
diff --git a/deal.II/contrib/cmake/modules/FindMETIS.cmake b/deal.II/contrib/cmake/modules/FindMETIS.cmake
new file mode 100644 (file)
index 0000000..881d6cb
--- /dev/null
@@ -0,0 +1,26 @@
+# Try to find METIS
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PATH(METIS_INCLUDE_DIR metis/metis.h
+  HINTS
+  $ENV{NETCDF_INCLUDE_DIR}
+  ${NETCDF_INCLUDE_DIR}
+)
+
+FIND_LIBRARY(METIS_LIBRARY
+  NAMES metis
+  PATHS
+  $ENV{NETCDF_LIBRARY_DIR}
+  ${NETCDF_LIBRARY_DIR}
+  PATH_SUFFIXES lib64 lib
+)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(METIS DEFAULT_MSG METIS_LIBRARY METIS_INCLUDE_DIR)
+
+IF(METIS_FOUND)
+  MARK_AS_ADVANCED(
+    METIS_LIBRARY
+    METIS_INCLUDE_DIR
+  )
+ENDIF()
index 600ecf3a1b16b9f24447ed63189c5c91370d7104..b68b318cdcf5aeb9cdc30228e6d9e6cc7d294fc1 100644 (file)
@@ -9,7 +9,7 @@ FIND_PATH(NETCDF_INCLUDE_DIR netcdf.hh
 )
 
 FIND_LIBRARY(NETCDF_LIBRARY
-  NAMES libnetcdf_c++.so libnetcdf_cpp.so
+  NAMES netcdf_c++ netcdf_cpp
   PATHS
   $ENV{NETCDF_LIBRARY_DIR}
   ${NETCDF_LIBRARY_DIR}
index 86535929e06adf5beb68ec31911d9e743c3d46ad..66dfc7ac4417ff98ec1aeeed06765d458f74964b 100644 (file)
@@ -9,7 +9,7 @@ FIND_PATH(TBB_INCLUDE_DIR tbb/parallel_reduce.h
 )
 
 FIND_LIBRARY(TBB_LIBRARY
-  NAMES libtbb.so
+  NAMES tbb
   PATHS
   $ENV{TBB_LIBRARY_DIR}
   ${TBB_LIBRARY_DIR}
@@ -17,7 +17,7 @@ FIND_LIBRARY(TBB_LIBRARY
 )
 
 FIND_LIBRARY(TBB_DEBUG_LIBRARY
-  NAMES libtbb_debug.so
+  NAMES tbb_debug
   PATHS
   $ENV{TBB_DEBUG_LIBRARY_DIR}
   ${TBB_DEBUG_LIBRARY_DIR}
index 9e7471330d7f1e12107683c9dad068611d9b4958..be0c325eed0fe9df3b8b3ab51ac825cb3d0f3187 100644 (file)
@@ -9,7 +9,7 @@ FIND_PATH(UMFPACK_INCLUDE_DIR umfpack.h
 )
 
 FIND_LIBRARY(UMFPACK_LIBRARY
-  NAMES libumfpack.so
+  NAMES umfpack
   PATHS
   $ENV{UMFPACK_LIBRARY_DIR}
   ${UMFPACK_LIBRARY_DIR}
index 09df9bcc65491f9e0697c6725fbd6bd609695fcb..459ada2fff2a09a9c28b994d0ba0e77387fa18ae 100644 (file)
 /* Defined if you have the `functionparser' library */
 #cmakedefine HAVE_FUNCTIONPARSER
 
+/****************************************
+ * Configured in configure_metis.cmake: *
+ ****************************************/
+
+/* Defined if a Metis installation was found and is going to be used */
+#cmakedefine DEAL_II_USE_METIS
+
 
 /**************************************
  * Configured in configure_mpi.cmake: *
index 1d08801e38b3e7f03ef2a5041761c77da29bc4ce..fd7b04580efdd4af44a27dbbf6ff829e385f02a3 100644 (file)
 /* Defined if an ARPACK installation was found and is going to be used */
 #cmakedefine DEAL_II_USE_ARPACK
 
-/* Defined if a Metis installation was found and is going to be used */
-#cmakedefine DEAL_II_USE_METIS
-
 /* Defined if a MUMPS installation was found and is going to be used */
 #cmakedefine DEAL_II_USE_MUMPS
 

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.