Commit b8371066 authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

fix ctaux_stdthread_tp test. Reenable unbalanced walker/accumulator

parent 09f2e7c6
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -240,12 +240,11 @@ void StdThreadQmciClusterSolver<QmciSolver>::integrate() {

  auto& pool = dca::parallel::ThreadPool::get_instance();
  for (int i = 0; i < thread_task_handler_.size(); ++i) {
    // if (thread_task_handler_.getTask(i) == "walker")
    //   futures.emplace_back(pool.enqueue(&ThisType::startWalker, this, i));
    // else if (thread_task_handler_.getTask(i) == "accumulator")
    //   futures.emplace_back(pool.enqueue(&ThisType::startAccumulator, this, i, parameters_));
    // else
    if (thread_task_handler_.getTask(i) == "walker and accumulator")
    if (thread_task_handler_.getTask(i) == "walker")
      futures.emplace_back(pool.enqueue(&ThisType::startWalker, this, i));
    else if (thread_task_handler_.getTask(i) == "accumulator")
      futures.emplace_back(pool.enqueue(&ThisType::startAccumulator, this, i, parameters_));
    else if (thread_task_handler_.getTask(i) == "walker and accumulator")
      futures.emplace_back(pool.enqueue(&ThisType::startWalkerAndAccumulator, this, i, parameters_));
    else
      throw std::logic_error("Thread task is undefined.");
+10 −4
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ void MciParameters::readWrite(ReaderOrWriter& reader_or_writer) {

  reader_or_writer.close_group();

  if constexpr (ReaderOrWriter::is_reader) {
    // The input file can contain an integral seed or the seeding option "random".  
  // Check parameters consistency.
  if (g4_distribution_ == DistType::BLOCKED) {
#ifdef DCA_HAVE_MPI
@@ -346,12 +348,16 @@ void MciParameters::readWrite(ReaderOrWriter& reader_or_writer) {
#else
    throw(std::logic_error("MPI distribution requested with no MPI available."));
#endif  // DCA_HAVE_MPI

    if (stamping_period_ != 0) {
      if (!(shared_walk_and_accumulation_thread_ && walkers_ == accumulators_))
	throw std::runtime_error("Individual measurement stamping not available unless shared-walk-and-accumulation-thread = true and walkers == acceptors!");
    }
    // Solve conflicts
  }
  }
  if (!time_correlation_window_)
      compute_G_correlation_ = false;
}
}  // namespace params

void MciParameters::solveDcaIterationConflict(int iterations) {
  // Solve conflicts between number of iterations and mci parameters.