Unverified Commit d510f6f1 authored by Peter Doak's avatar Peter Doak Committed by GitHub
Browse files

Merge pull request #74 from CompFUSE/tweak_accum_memory

Tweak accumulator memory.
parents 4ffcef97 5e1afb22
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -255,6 +255,26 @@ else()
  set(GNUPLOT_INTERFACE_LIBRARY "" CACHE INTERNAL "" FORCE)
endif()

################################################################################
# Accumulation options.
option(DCA_WITH_MEMORY_SAVINGS "Save memory in the two particle accumulation at a slight performance
       cost." OFF)
if (DCA_WITH_MEMORY_SAVINGS)
  set(MEMORY_SAVINGS true)
else()
  set(MEMORY_SAVINGS false)
endif()

if (DCA_WITH_SINGLE_PRECISION_MEASUREMENTS)
  set(MC_ACCUMULATION_SCALAR float)
else()
  set(MC_ACCUMULATION_SCALAR double)
endif()

configure_file("${PROJECT_SOURCE_DIR}/include/dca/config/accumulation_options.hpp.in"
        "${CMAKE_BINARY_DIR}/include/dca/config/accumulation_options.hpp" @ONLY)


################################################################################
# Generate applications' config files.
configure_file("${PROJECT_SOURCE_DIR}/include/dca/config/analysis.hpp.in"
+28 −0
Original line number Diff line number Diff line
// Copyright (C) 2018 ETH Zurich
// Copyright (C) 2018 UT-Battelle, LLC
// All rights reserved.
//
// See LICENSE for terms of usage.
// See CITATION.md for citation guidelines, if DCA++ is used for scientific publications.
//
// Author: Giovanni Balduzzi (gbalduzz@itp.phys.ethz.ch)
//
// This class stores compile time options for the MC accumulation.

#ifndef DCA_CONFIG_ACCUMULATON_OPTIONS_HPP
#define DCA_CONFIG_ACCUMULATON_OPTIONS_HPP

namespace dca {
namespace config {
// dca::config::

struct AccumulationOptions {
  using MCAccumulationScalar = @MC_ACCUMULATION_SCALAR@;

  static constexpr bool memory_savings = @MEMORY_SAVINGS@;
};

}  // config
}  // dca

#endif  // DCA_CONFIG_ACCUMULATON_OPTIONS_HPP
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ struct CMakeOptions {
  static const std::string dca_with_gnuplot;
  static const std::string dca_with_reduced_vertex_function;
  static const std::string dca_with_single_precision_measurements;
  static const std::string dca_with_memory_savings;

  static const std::string dca_with_qmc_bit;

  static void print();
+6 −0
Original line number Diff line number Diff line
@@ -113,6 +113,12 @@ public:
  const scalartype* values() const {
    return fnc_values;
  }
  scalartype* data() {
    return fnc_values;
  }
  const scalartype* data() const {
    return fnc_values;
  }

  //
  // Methods for index conversion
+3 −3
Original line number Diff line number Diff line
@@ -26,9 +26,9 @@ namespace lapack {
// Out: b
// Preconditions: lda >= m, ldb >= m.
// Type can be float, double, cuComplex, cuDoubleComplex, std::complex<float>, std::complex<double>.
template <typename Type>
void multiplyDiagonalLeft_gpu(int m, int n, const Type* d, int inc_d, const Type* a, int lda,
                              Type* b, int ldb, int thread_id, int stream_id);
template <typename ScalarIn, typename ScalarOut>
void multiplyDiagonalLeft_gpu(int m, int n, const ScalarIn* d, int inc_d, const ScalarIn* a,
                              int lda, ScalarOut* b, int ldb, int thread_id, int stream_id);
template <typename Type>
inline void multiplyDiagonalLeft_gpu(int m, int n, const std::complex<Type>* d, int inc_d,
                                     const std::complex<Type>* a, int lda, std::complex<Type>* b,
Loading