From 367243a1614218174cbdb19618bc258674f45977 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 1 Jul 2023 21:56:08 -0400 Subject: [PATCH] Remove the FEValues splits. Now that we have ReadVector this class is a lot less expensive to compile. In release mode I timed: - for 9.5: 85s for all six files - for ReadVector: 59.1s for all six files - for all files unified: 42s The maximum RSS is measured (by /usr/bin/time -v) as 2.6 GB in debug mode so we are still under our 3 GB rule-of-thumb. --- source/fe/CMakeLists.txt | 5 ----- source/fe/fe_values.cc | 5 +---- source/fe/fe_values_inst2.cc | 20 -------------------- source/fe/fe_values_inst3.cc | 17 ----------------- source/fe/fe_values_inst4.cc | 17 ----------------- source/fe/fe_values_inst5.cc | 17 ----------------- source/fe/fe_values_inst6.cc | 17 ----------------- 7 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 source/fe/fe_values_inst2.cc delete mode 100644 source/fe/fe_values_inst3.cc delete mode 100644 source/fe/fe_values_inst4.cc delete mode 100644 source/fe/fe_values_inst5.cc delete mode 100644 source/fe/fe_values_inst6.cc diff --git a/source/fe/CMakeLists.txt b/source/fe/CMakeLists.txt index 70fa5d0d2b..c356007e11 100644 --- a/source/fe/CMakeLists.txt +++ b/source/fe/CMakeLists.txt @@ -68,11 +68,6 @@ set(_unity_include_src set(_separate_src fe_values.cc - fe_values_inst2.cc - fe_values_inst3.cc - fe_values_inst4.cc - fe_values_inst5.cc - fe_values_inst6.cc mapping_fe_field.cc mapping_fe_field_inst2.cc fe_tools.cc diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index ffe9371e6b..62f3fb96c8 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -4803,10 +4803,7 @@ FESubfaceValues::do_reinit(const unsigned int face_no, /*------------------------------- Explicit Instantiations -------------*/ -#define SPLIT_INSTANTIATIONS_COUNT 6 -#ifndef SPLIT_INSTANTIATIONS_INDEX -# define SPLIT_INSTANTIATIONS_INDEX 0 -#endif + #include "fe_values.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/source/fe/fe_values_inst2.cc b/source/fe/fe_values_inst2.cc deleted file mode 100644 index 248e924688..0000000000 --- a/source/fe/fe_values_inst2.cc +++ /dev/null @@ -1,20 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2013 - 2015 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -// This file compiles the second half of the instantiations from fe_values.cc -// to get the memory consumption below 1.5gb with gcc. - -#define SPLIT_INSTANTIATIONS_INDEX 1 -#include "fe_values.cc" diff --git a/source/fe/fe_values_inst3.cc b/source/fe/fe_values_inst3.cc deleted file mode 100644 index e3e368034f..0000000000 --- a/source/fe/fe_values_inst3.cc +++ /dev/null @@ -1,17 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#define SPLIT_INSTANTIATIONS_INDEX 2 -#include "fe_values.cc" diff --git a/source/fe/fe_values_inst4.cc b/source/fe/fe_values_inst4.cc deleted file mode 100644 index a057bb5bff..0000000000 --- a/source/fe/fe_values_inst4.cc +++ /dev/null @@ -1,17 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#define SPLIT_INSTANTIATIONS_INDEX 3 -#include "fe_values.cc" diff --git a/source/fe/fe_values_inst5.cc b/source/fe/fe_values_inst5.cc deleted file mode 100644 index ce4df48111..0000000000 --- a/source/fe/fe_values_inst5.cc +++ /dev/null @@ -1,17 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#define SPLIT_INSTANTIATIONS_INDEX 4 -#include "fe_values.cc" diff --git a/source/fe/fe_values_inst6.cc b/source/fe/fe_values_inst6.cc deleted file mode 100644 index 9833794f75..0000000000 --- a/source/fe/fe_values_inst6.cc +++ /dev/null @@ -1,17 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2018 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - -#define SPLIT_INSTANTIATIONS_INDEX 5 -#include "fe_values.cc" -- 2.39.5