src/QMCDrivers/QMCDriverNew.cpp
/** Has nasty workaround for RandomNumberControl
 *   
 *  Num crowds must be less than omp_get_max_threads because RandomNumberControl is global c lib function
 *  masquerading as a C++ object.
 */
Has nasty workaround for RandomNumberControl

Num crowds must be less than omp_get_max_threads because RandomNumberControl is global c lib function
masquerading as a C++ object.
Has nasty workaround for RandomNumberControl Num crowds must be less than omp_get_max_threads because RandomNumberControl is global c lib function masquerading as a C ++ object .
QMCDriverNew::QMCDriverNew(QMCDriverInput&& input,
                           MCPopulation& population,
                           TrialWaveFunction& psi,
                           QMCHamiltonian& h,
                           WaveFunctionPool& ppool,
                           const std::string timer_prefix,
                           Communicate* comm)
    : MPIObjectBase(comm),
      qmcdriver_input_(input),
      branch_engine_(nullptr),
      population_(population),
      Psi(psi),
      H(h),
      psiPool(ppool),
      estimator_manager_(nullptr),
      wOut(0),
      walkers_per_crowd_(1),
      timers_(timer_prefix)
{
  QMCType = "invalid";
  if(Concurrency::maxThreads() < input.get_num_crowds())
    set_num_crowds(Concurrency::maxThreads(), "RandomNumberControl's maximum children set to omp_get_max_threads()");
  else
    num_crowds_ = input.get_num_crowds();
  rotation = 0;
}
QMCDriverNew :: QMCDriverNew ( QMCDriverInput && input , MCPopulation & population , TrialWaveFunction & psi , QMCHamiltonian & h , WaveFunctionPool & ppool , const std :: string timer_prefix , Communicate * comm ) : MPIObjectBase ( comm ) , qmcdriver_input_ ( input ) , branch_engine_ ( nullptr ) , population_ ( population ) , Psi ( psi ) , H ( h ) , psiPool ( ppool ) , estimator_manager_ ( nullptr ) , wOut ( 0 ) , walkers_per_crowd_ ( 1 ) , timers_ ( timer_prefix ) { QMCType = " " ; if ( Concurrency :: maxThreads ( ) < input . get_num_crowds ( ) ) set_num_crowds ( Concurrency :: maxThreads ( ) , " " ) ; else num_crowds_ = input . get_num_crowds ( ) ; rotation = 0 ; }
Has nasty workaround for RandomNumberControl
Has nasty workaround for RandomNumberControl
// num_crowds_(input.get_num_crowds()) // Avoids segmentation fault when RandomNumberControl::Children is too small, adds surprising behavior