Commit 0ff50612 authored by gbalduzz's avatar gbalduzz
Browse files

Merge remote-tracking branch 'origin/master' into optimize_ctaux

parents b9385497 fccf1b8e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -139,8 +139,10 @@ set(DCA_LIBS
  cluster_domains
  quantum_domains
  time_and_frequency_domains
  signals
  symmetrization
  coarsegraining
  stdc++fs # std::filesystem
  ${DCA_CONCURRENCY_LIB}
  ${DCA_THREADING_LIBS}
  lapack
+4 −1
Original line number Diff line number Diff line
@@ -14,13 +14,14 @@
#include <string>
#include <iostream>

#include "dca/application/dca_loop_dispatch.hpp"
#include "dca/config/cmake_options.hpp"
// Defines Concurrency, Threading, ParametersType, DcaData, DcaLoop, and Profiler.
#include "dca/config/dca.hpp"
#include "dca/io/json/json_reader.hpp"
#include "dca/util/git_version.hpp"
#include "dca/util/modules.hpp"
#include "dca/application/dca_loop_dispatch.hpp"
#include "dca/util/signal_handler.hpp"

int main(int argc, char** argv) {
  if (argc < 2) {
@@ -31,6 +32,8 @@ int main(int argc, char** argv) {
  Concurrency concurrency(argc, argv);

  try {
    dca::util::SignalHandler::init(concurrency.id() == concurrency.first());

    std::string input_file(argv[1]);

    Profiler::start();
+4 −1
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ function(dca_add_gtest name)
      target_include_directories(${name} PRIVATE ${MAGMA_INCLUDE_DIR})
      target_compile_definitions(${name} PRIVATE DCA_HAVE_MAGMA)
    endif()
    if(DCA_WITH_CUDA_AWARE_MPI)
      target_compile_definitions(${name} PRIVATE DCA_HAVE_CUDA_AWARE_MPI)
    endif()
    cuda_add_cublas_to_target(${name})
  endif()

@@ -118,7 +121,7 @@ function(dca_add_gtest name)

    add_test(NAME ${name}
             COMMAND ${TEST_RUNNER} ${MPIEXEC_NUMPROC_FLAG} ${DCA_ADD_GTEST_MPI_NUMPROC}
                     ${MPIEXEC_PREFLAGS}  ${CVD_LAUNCHER} "$<TARGET_FILE:${name}>")
                     ${MPIEXEC_PREFLAGS} ${SMPIARGS_FLAG_MPI} ${CVD_LAUNCHER} "$<TARGET_FILE:${name}>")
                 target_link_libraries(${name} ${MPI_C_LIBRARIES})
  else()
    if (TEST_RUNNER)
+27 −0
Original line number Diff line number Diff line
// Copyright (C) 2020 ETH Zurich
// Copyright (C) 2020 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)
//
// Conditional inclusion of std::filesystem

#ifndef DCA_IO_FILESYSTEM
#define DCA_IO_FILESYSTEM

#if __has_include(<filesystem>)

#include <filesystem>
namespace filesystem = std::filesystem;

#else

#include <experimental/filesystem>
namespace filesystem = std::experimental::filesystem;

#endif

#endif  // DCA_IO_FILESYSTEM
+3 −11
Original line number Diff line number Diff line
@@ -112,21 +112,15 @@ public:
    return execute(name, static_cast<io::Buffer::Container>(buffer));
  }

  operator bool() const {
  operator bool() const noexcept {
    return static_cast<bool>(file_);
  }

  void lock() {
    mutex_.lock();
  }

  void unlock() {
    mutex_.unlock();
  void set_verbose(bool verbose) {
    verbose_ = verbose;
  }

private:
  bool fexists(const char* filename);

  bool exists(const std::string& name) const;

  H5::DataSet write(const std::string& name, const std::vector<hsize_t>& size, H5::DataType type,
@@ -143,8 +137,6 @@ private:

  bool verbose_;

  std::mutex mutex_;

  std::vector<hsize_t> size_check_;
};

Loading