From 1d727f2bb9f8ae09cfb5d91ab1a5d0983798f556 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 28 Jan 2018 16:37:32 -0500 Subject: [PATCH] Split data_out_dof_data instantiations. This file currently requires 91s/3.9GB and 103s/3.3GB on debug and release, respectively, with GCC7.2. With the split these are 53s/2.6GB - 52s/2.6GB and 60.5s/2.6GB - 59.1s/2.5GB: much better for memory usage. --- source/numerics/CMakeLists.txt | 1 + source/numerics/data_out_dof_data.cc | 2 ++ source/numerics/data_out_dof_data_inst2.cc | 36 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 source/numerics/data_out_dof_data_inst2.cc diff --git a/source/numerics/CMakeLists.txt b/source/numerics/CMakeLists.txt index fd906c011a..1bcbeea1e2 100644 --- a/source/numerics/CMakeLists.txt +++ b/source/numerics/CMakeLists.txt @@ -36,6 +36,7 @@ SET(_unity_include_src SET(_separate_src data_out_dof_data.cc + data_out_dof_data_inst2.cc data_out_dof_data_codim.cc derivative_approximation.cc error_estimator_1d.cc diff --git a/source/numerics/data_out_dof_data.cc b/source/numerics/data_out_dof_data.cc index 1769f88ae7..a9db478c53 100644 --- a/source/numerics/data_out_dof_data.cc +++ b/source/numerics/data_out_dof_data.cc @@ -29,6 +29,8 @@ DEAL_II_NAMESPACE_OPEN +#define SPLIT_INSTANTIATIONS_COUNT 2 +#define SPLIT_INSTANTIATIONS_INDEX 0 #include "data_out_dof_data.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/source/numerics/data_out_dof_data_inst2.cc b/source/numerics/data_out_dof_data_inst2.cc new file mode 100644 index 0000000000..b5943d56f3 --- /dev/null +++ b/source/numerics/data_out_dof_data_inst2.cc @@ -0,0 +1,36 @@ +// --------------------------------------------------------------------- +// +// 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 at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +DEAL_II_NAMESPACE_OPEN + +#define SPLIT_INSTANTIATIONS_COUNT 2 +#define SPLIT_INSTANTIATIONS_INDEX 1 +#include "data_out_dof_data.inst" + +DEAL_II_NAMESPACE_CLOSE -- 2.39.5