Commit 33f0e5fd authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

Merge branch '4-update-dca-source' into 's_of_q_omega_demo'

Resolve "Update DCA source"

Closes #4

See merge request ndip/tool-sources/dca/dca-main!4
parents 6dc40f54 537878cb
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
# Build directories (exclude build-aux)
build*
!build-aux
cmake-build*


# Bin directories
bin*
@@ -16,3 +18,6 @@ bin*
*#
*.swp
.idea


.nfs*
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -4,10 +4,10 @@
#
# CMake build script for DCA++

cmake_minimum_required(VERSION 3.21)
cmake_minimum_required(VERSION 3.20)
project(DCA++ LANGUAGES C CXX)

cmake_policy(VERSION 3.21)
cmake_policy(VERSION 3.20)

################################################################################
# Always use <PackageName>_ROOT vars to search first
+41 −50
Original line number Diff line number Diff line
@@ -71,26 +71,19 @@ int main(int argc, char** argv) {
  DcaDataType dca_data(parameters);
  dca_data.initialize();

#ifdef DCA_HAVE_ADIOS2
  adios2::ADIOS adios;

  if (dca::io::stringToIOType(parameters.get_output_format()) == dca::io::IOType::ADIOS2) {
  int rank = concurrency.id();
  std::cout << "\nProcessor " << concurrency.id() << " is writing data." << std::endl;
    dca::io::Writer writer(adios, concurrency, parameters.get_output_format(), true);
  dca::io::Writer writer(concurrency, "HDF5", true);
  std::string filename_bse(parameters.get_directory() + parameters.getAppropriateFilenameAnalysis());
  writer.open_file(filename_bse);

  std::string filename(parameters.get_directory() + parameters.get_filename_dca());
    dca::io::Reader reader(concurrency, parameters.get_output_format());
  dca::io::Reader reader(concurrency, "HDF5");
  reader.open_file(filename);
    auto& adios2_reader = std::get<dca::io::ADIOS2Reader<Concurrency>>(reader.getUnderlying());
    std::size_t step_count = adios2_reader.getStepCount();

  int ranks = concurrency.get_size();

  std::size_t step_count = reader.getStepCount();
  int current_step = 0;

  while (true) {
    if (current_step >= step_count - 1)
      break;
@@ -100,12 +93,12 @@ int main(int argc, char** argv) {
      // cut off the last weird step dca is saving
      if (current_step >= step_count - 1)
        goto end_steps;
        adios2_reader.begin_step();
      reader.begin_step();
      if (rank == ir) {
        dca_data.read(reader);
        got_step_num = current_step;
      }
        adios2_reader.end_step();
      reader.end_step();
      ++current_step;
    }
    if (got_step_num >= 0) {
@@ -125,8 +118,6 @@ int main(int argc, char** argv) {
    parameters.write(writer);
  writer.end_step();
  writer.close_file();
  }
#endif
  std::cout << "\nFinish time: " << dca::util::print_time() << "\n" << std::endl;
  return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#

# Check compiler version
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
  message(FATAL_ERROR "Requires gcc 9.0 or higher ")
endif()

+4 −4
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ RUN apt-get update \
      git \
  && apt-get clean

RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz \
 && tar -zxvf cmake-3.20.0.tar.gz \
 && cd cmake-3.20.0 \
 && ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF && make && make install && cd .. && rm -rf cmake-3.20.0
RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0.tar.gz \
 && tar -zxvf cmake-3.21.0.tar.gz \
 && cd cmake-3.21.0 \
 && ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF && make && make install && cd .. && rm -rf cmake-3.21.0

ENV ADIOS2_DIR=/opt/adios2
RUN mkdir -p $ADIOS2_DIR
Loading