From ad9fcbdd35c8d08e16e213263c476bba0afb770b Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 26 Oct 2023 10:40:48 +0200 Subject: [PATCH 1/3] mesh_partition: Make default `HILBERT` Allow octopus to be compiled without Metis Signed-off-by: Cristian Le --- src/grid/mesh_partition.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/grid/mesh_partition.F90 b/src/grid/mesh_partition.F90 index bce555a4b8..9f56b4f0f1 100644 --- a/src/grid/mesh_partition.F90 +++ b/src/grid/mesh_partition.F90 @@ -149,7 +149,10 @@ contains !%Option part_hilbert 3 !% Use the ordering along the Hilbert curve for partitioning. !%End + default = HILBERT +#ifdef HAVE_METIS default = METIS +#endif #ifdef HAVE_PARMETIS default = PARMETIS #endif -- GitLab From 15b914f6cf8a906b04634cf1151edac44a3f54fa Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Tue, 23 Apr 2024 19:11:35 +0200 Subject: [PATCH 2/3] CMake: Make METIS dependency optional Signed-off-by: Cristian Le --- cmake/CMakePresets-components.json | 10 +++++++++- cmake/Octopus_PackagesInfo.cmake | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/CMakePresets-components.json b/cmake/CMakePresets-components.json index e645ac51c5..e55e9313b3 100644 --- a/cmake/CMakePresets-components.json +++ b/cmake/CMakePresets-components.json @@ -139,7 +139,7 @@ }, "CMAKE_DISABLE_FIND_PACKAGE_METIS": { "type": "BOOL", - "value": false + "value": true }, "CMAKE_DISABLE_FIND_PACKAGE_ParMETIS": { "type": "BOOL", @@ -241,6 +241,10 @@ "type": "BOOL", "value": false }, + "CMAKE_DISABLE_FIND_PACKAGE_METIS": { + "type": "BOOL", + "value": false + }, "CMAKE_DISABLE_FIND_PACKAGE_ParMETIS": { "type": "BOOL", "value": false @@ -320,6 +324,10 @@ "type": "BOOL", "value": true }, + "CMAKE_REQUIRE_FIND_PACKAGE_METIS": { + "type": "BOOL", + "value": true + }, "CMAKE_REQUIRE_FIND_PACKAGE_ParMETIS": { "type": "BOOL", "value": true diff --git a/cmake/Octopus_PackagesInfo.cmake b/cmake/Octopus_PackagesInfo.cmake index 07b3fb8997..9ba8f11578 100644 --- a/cmake/Octopus_PackagesInfo.cmake +++ b/cmake/Octopus_PackagesInfo.cmake @@ -168,7 +168,7 @@ set_package_properties(CGAL PROPERTIES PURPOSE "Geometry library" ) set_package_properties(METIS PROPERTIES - TYPE REQUIRED + TYPE OPTIONAL PURPOSE "Geometry library" ) set_package_properties(ParMETIS PROPERTIES -- GitLab From 97b4f3224f9be7c1ae7006b6639b45be6cefbdcd Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Tue, 23 Apr 2024 21:33:17 +0200 Subject: [PATCH 3/3] Remove hard-coded metis mesh Signed-off-by: Cristian Le --- testsuite/functionals/07-sic.01-gs.inp | 2 -- testsuite/functionals/07-sic.02-scdm.inp | 2 -- 2 files changed, 4 deletions(-) diff --git a/testsuite/functionals/07-sic.01-gs.inp b/testsuite/functionals/07-sic.01-gs.inp index 9a87a14fa4..98c4d9c930 100644 --- a/testsuite/functionals/07-sic.01-gs.inp +++ b/testsuite/functionals/07-sic.01-gs.inp @@ -25,5 +25,3 @@ EigensolverMaxIter = 50 EigensolverTolerance = 1e-8 CGEnergyChangeThreshold = 1e-2 MaximumIter = 300 - -MeshPartitionPackage = metis diff --git a/testsuite/functionals/07-sic.02-scdm.inp b/testsuite/functionals/07-sic.02-scdm.inp index f50c15d119..af6521bc8e 100644 --- a/testsuite/functionals/07-sic.02-scdm.inp +++ b/testsuite/functionals/07-sic.02-scdm.inp @@ -26,6 +26,4 @@ EigensolverTolerance = 1e-8 CGEnergyChangeThreshold = 1e-2 MaximumIter = 300 -MeshPartitionPackage = metis - SCDMforPZSIC = yes -- GitLab