MADNESS 0.10.1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
madness::WorldGopInterface Class Reference

Provides collectives that interoperate with the AM and task interfaces. More...

#include <worldgop.h>

Collaboration diagram for madness::WorldGopInterface:
Collaboration graph
[legend]

Classes

struct  AllReduceTag
 
struct  BcastTag
 
class  DelayedSend
 Delayed send callback object. More...
 
struct  GroupAllReduceTag
 
struct  GroupBcastTag
 
struct  GroupLazySyncTag
 
struct  GroupReduceTag
 
struct  LazySyncTag
 
struct  PointToPointTag
 
struct  ReduceTag
 

Public Member Functions

 WorldGopInterface (World &world)
 
 ~WorldGopInterface ()
 
template<typename T >
void absmax (T *buf, size_t nelem)
 Inplace global absmax while still processing AM & tasks.
 
template<typename T >
void absmin (T *buf, size_t nelem)
 Inplace global absmin while still processing AM & tasks.
 
template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::typeall_reduce (const keyT &key, const valueT &value, const opT &op)
 Distributed all reduce.
 
template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::typeall_reduce (const keyT &key, const valueT &value, const opT &op, const Group &group)
 Distributed, group all reduce.
 
void barrier ()
 Synchronizes all processes in communicator ... does NOT fence pending AM or tasks.
 
template<typename keyT , typename valueT >
void bcast (const keyT &key, Future< valueT > &value, const ProcessID group_root, const Group &group) const
 Group broadcast.
 
template<typename keyT , typename valueT >
void bcast (const keyT &key, Future< valueT > &value, const ProcessID root) const
 Broadcast.
 
template<typename T >
void bit_and (T *buf, size_t nelem)
 
template<typename T >
void bit_or (T *buf, size_t nelem)
 
template<typename T >
void bit_xor (T *buf, size_t nelem)
 
template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void broadcast (T &t)
 Broadcast of a scalar from node 0 to all other nodes.
 
template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void broadcast (T &t, ProcessID root)
 Broadcast of a scalar from node root to all other nodes.
 
template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void broadcast (T *buf, size_t nelem, ProcessID root)
 Broadcasts typed contiguous data from process root while still processing AM & tasks.
 
void broadcast (void *buf, size_t nbyte, ProcessID root, bool dowork=true, Tag bcast_tag=-1)
 Broadcasts bytes from process root while still processing AM & tasks.
 
template<typename objT , typename = std::void_t<decltype(std::declval<archive::BufferInputArchive&>()&std::declval<objT&>())>, typename = std::void_t<decltype(std::declval<archive::BufferOutputArchive&>()&std::declval<const objT&>())>>
void broadcast_serializable (objT &obj, ProcessID root)
 Broadcast a serializable object.
 
template<typename T >
std::vector< Tconcat0 (const std::vector< T > &v, size_t bufsz=1024 *1024)
 Concatenate an STL vector of serializable stuff onto node 0.
 
void fence (bool debug=false)
 Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
 
template<typename keyT , typename opT >
void lazy_sync (const keyT &key, const opT &op) const
 Lazy sync.
 
template<typename keyT , typename opT >
void lazy_sync (const keyT &key, const opT &op, const Group &group) const
 Group lazy sync.
 
template<typename T >
void logic_and (T *buf, size_t nelem)
 
template<typename T >
void logic_or (T *buf, size_t nelem)
 
template<typename T >
void max (T &a)
 Global max of a scalar while still processing AM & tasks.
 
template<typename T >
void max (T *buf, size_t nelem)
 Inplace global max while still processing AM & tasks.
 
int max_reducebcast_msg_size () const
 Returns the maximum size of messages (in bytes) sent by reduce and broadcast.
 
template<typename T >
void min (T &a)
 Global min of a scalar while still processing AM & tasks.
 
template<typename T >
void min (T *buf, size_t nelem)
 Inplace global min while still processing AM & tasks.
 
template<typename T >
void product (T *buf, size_t nelem)
 Inplace global product while still processing AM & tasks.
 
template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::typereduce (const keyT &key, const valueT &value, const opT &op, const ProcessID group_root, const Group &group)
 Distributed group reduce.
 
template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::typereduce (const keyT &key, const valueT &value, const opT &op, const ProcessID root)
 Distributed reduce.
 
template<typename T , class opT >
void reduce (T *buf, std::size_t nelem, opT op)
 Inplace global reduction (like MPI all_reduce) while still processing AM & tasks.
 
template<typename keyT , typename valueT >
void send (const ProcessID dest, const keyT &key, const valueT &value) const
 Send value to dest.
 
void serial_invoke (std::function< void()> action)
 Executes an action on single (this) thread after ensuring all other work is done.
 
bool set_debug (bool value)
 Set debug flag to new value and return old value.
 
bool set_forbid_fence (bool value)
 Set forbid_fence flag to new value and return old value.
 
int set_max_reducebcast_msg_size (int sz)
 Set the maximum size of messages (in bytes) sent by reduce and broadcast.
 
template<typename T >
void sum (T &a)
 Global sum of a scalar while still processing AM & tasks.
 
template<typename T >
void sum (T *buf, size_t nelem)
 Inplace global sum while still processing AM & tasks.
 

Static Public Member Functions

template<typename valueT , typename keyT >
static Future< valueTrecv (const ProcessID source, const keyT &key)
 Receive data from source.
 

Private Member Functions

template<typename tagT , typename keyT , typename valueT >
void bcast_internal (const keyT &key, Future< valueT > &value, const ProcessID group_root, const Group &group) const
 Group broadcast.
 
template<typename tagT , typename keyT , typename valueT >
void bcast_internal (const keyT &key, Future< valueT > &value, const ProcessID root) const
 Broadcast.
 
template<typename keyT , typename valueT >
void bcast_task (const keyT &key, const valueT &value, const ProcessID root) const
 Broadcast task.
 
void fence_impl (std::function< void()> epilogue=[]{}, bool pause_during_epilogue=false, bool debug=false)
 Implementation of fence.
 
template<typename keyT , typename valueT >
void group_bcast_task (const keyT &key, const valueT &value, const ProcessID group_root, const Group &group) const
 
int initial_max_reducebcast_msg_size ()
 
template<typename keyT , typename opT >
void lazy_sync_children (const ProcessID child0, const ProcessID child1, const keyT &key, opT &op, const ProcessID) const
 Lazy sync parent task.
 
template<typename tagT , typename keyT , typename opT >
void lazy_sync_internal (const ProcessID parent, const ProcessID child0, const ProcessID child1, const keyT &key, const opT &op) const
 Start a distributed lazy sync operation.
 
template<typename keyT >
void lazy_sync_parent (const ProcessID parent, const keyT &key, const ProcessID, const ProcessID) const
 Lazy sync parent task.
 
template<typename tagT , typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::typereduce_internal (const ProcessID parent, const ProcessID child0, const ProcessID child1, const ProcessID root, const keyT &key, const valueT &value, const opT &op)
 Distributed reduce.
 
template<typename keyT , typename valueT >
std::enable_if<!is_future< valueT >::value >::type send_internal (const ProcessID dest, const keyT &key, const valueT &value) const
 Send value to dest.
 
template<typename keyT , typename valueT >
void send_internal (ProcessID dest, const keyT &key, const Future< valueT > &value) const
 Send value to dest.
 

Static Private Member Functions

template<typename keyT , typename valueT , typename taskfnT >
static void bcast_handler (const AmArg &arg)
 
template<typename keyT , typename valueT , typename taskfnT >
static void group_bcast_handler (const AmArg &arg)
 
template<typename valueT , typename keyT >
static Future< valueTrecv_internal (const keyT &key)
 Receive data from remote node.
 
template<typename opT >
static detail::result_of< opT >::type reduce_result_task (const std::vector< Future< typename detail::result_of< opT >::type > > &results, const opT &op)
 
template<typename valueT , typename opT >
static detail::result_of< opT >::type reduce_task (const valueT &value, const opT &op)
 

Private Attributes

bool debug_
 Debug mode.
 
std::shared_ptr< detail::DeferredCleanupdeferred_
 Deferred cleanup object.
 
bool forbid_fence_ =false
 forbid calling fence() in case of several active worlds
 
int max_reducebcast_msg_size_ = std::numeric_limits<int>::max()
 maximum size of messages (in bytes) sent by reduce and broadcast
 
Worldworld_
 World object that this is a part of.
 

Friends

class detail::DeferredCleanup
 

Detailed Description

Provides collectives that interoperate with the AM and task interfaces.

If native AM interoperates with MPI we probably should map these to MPI.

Constructor & Destructor Documentation

◆ WorldGopInterface()

madness::WorldGopInterface::WorldGopInterface ( World world)
inline

◆ ~WorldGopInterface()

madness::WorldGopInterface::~WorldGopInterface ( )
inline

References deferred_.

Member Function Documentation

◆ absmax()

template<typename T >
void madness::WorldGopInterface::absmax ( T buf,
size_t  nelem 
)
inline

Inplace global absmax while still processing AM & tasks.

◆ absmin()

template<typename T >
void madness::WorldGopInterface::absmin ( T buf,
size_t  nelem 
)
inline

Inplace global absmin while still processing AM & tasks.

◆ all_reduce() [1/2]

template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::type > madness::WorldGopInterface::all_reduce ( const keyT &  key,
const valueT value,
const opT &  op 
)
inline

Distributed all reduce.

The reduce functor must have the following signature:

class ReduceFunc {
public:
// Typedefs
typedef ... result_type;
typedef ... argument_type;
// Constructors
ReduceFunc(const ReduceFunc&);
// Initialization operation, which returns a default result object
result_type operator()() const;
// Reduce two result objects
void operator()(result_type&, const result_type&) const;
// Reduce a result object and an argument object
void operator()(result_type&, const argument_type&) const;
}; // class ReduceFunc
Template Parameters
keyTThe key type
valueTThe data type to be reduced
opTThe reduction operation type
Parameters
keyThe key associated with this reduction
valueThe local value to be reduced
opThe reduction operation to be applied to local and remote data
Returns
A future to the reduce value on the root process, otherwise an uninitialized future that may be ignored.
Note
It is the user's responsibility to ensure that key does not conflict with other calls to all_reduce. Keys may be reused after the associated operation has finished.

References SafeMPI::Intracomm::binary_tree_info(), madness::World::mpi, op(), madness::World::rank(), madness::World::size(), and world_.

◆ all_reduce() [2/2]

template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::type > madness::WorldGopInterface::all_reduce ( const keyT &  key,
const valueT value,
const opT &  op,
const Group group 
)
inline

Distributed, group all reduce.

The reduce functor must have the following signature:

class ReduceFunc {
public:
// Typedefs
typedef ... result_type;
typedef ... argument_type;
// Constructors
ReduceFunc(const ReduceFunc&);
// Initialization operation, which returns a default result object
result_type operator()() const;
// Reduce two result objects
void operator()(result_type&, const result_type&) const;
// Reduce a result object and an argument object
void operator()(result_type&, const argument_type&) const;
}; // class ReduceFunc
Template Parameters
keyTThe key type
valueTThe data type to be reduced
opTThe reduction operation type
Parameters
keyThe key associated with this reduction
valueThe local value to be reduced
opThe reduction operation to be applied to local and remote data
groupThe group that will preform the reduction
Returns
A future to the reduce value on the root process, otherwise an uninitialized future that may be ignored
Exceptions
madness::ExceptionWhen group is empty
madness::ExceptionWhen group is not registered
madness::ExceptionWhen the world id of group is not equal to that of the world used to construct this object
madness::ExceptionWhen this process is not in the group
Note
It is the user's responsibility to ensure that key does not conflict with other calls to reduce. Keys may be reused after the associated operation has finished.

References madness::Group::empty(), madness::Group::get_world(), madness::World::id(), MADNESS_ASSERT, madness::Group::make_tree(), op(), madness::Group::rank(), madness::Group::size(), and world_.

◆ barrier()

void madness::WorldGopInterface::barrier ( )
inline

Synchronizes all processes in communicator ... does NOT fence pending AM or tasks.

References madness::error(), madness::World::rank(), madness::World::size(), sum, and world_.

Referenced by madness::plotvtk_data(), and madness::plotvtk_data().

◆ bcast() [1/2]

template<typename keyT , typename valueT >
void madness::WorldGopInterface::bcast ( const keyT &  key,
Future< valueT > &  value,
const ProcessID  group_root,
const Group group 
) const
inline

Group broadcast.

Broadcast data from the group_root process to all processes in group. The input/output data is held by value.

Parameters
[in]keyThe key associated with this broadcast
[in,out]valueOn the group_root process, this is used as the input data that will be broadcast to all other processes in the group. On other processes it is used as the output to the broadcast
group_rootThe process in group that owns the data to be broadcast
groupThe process group where value will be broadcast
Exceptions
madness::ExceptionWhen group is empty
madness::ExceptionWhen group is not registered
madness::ExceptionWhen the world id of group is not equal to that of the world used to construct this object
madness::ExceptionWhen this process is not in the group
madness::ExceptionWhen group_root is less than 0 or greater than or equal to group size
madness::ExceptionWhen data has been set except on the root process
Note
It is the user's responsibility to ensure that key does not conflict with other calls to bcast. Keys may be reused after the associated operation has finished.

References madness::Group::empty(), madness::Group::get_world(), madness::World::id(), MADNESS_ASSERT, madness::Future< T >::probe(), madness::Group::rank(), madness::Group::size(), and world_.

◆ bcast() [2/2]

template<typename keyT , typename valueT >
void madness::WorldGopInterface::bcast ( const keyT &  key,
Future< valueT > &  value,
const ProcessID  root 
) const
inline

Broadcast.

Broadcast data from the root process to all processes. The input/ output data is held by value.

Parameters
[in]keyThe key associated with this broadcast
[in,out]valueOn the root process, this is used as the input data that will be broadcast to all other processes. On other processes it is used as the output to the broadcast.
rootThe process that owns the data to be broadcast
Exceptions
madness::ExceptionWhen root is less than 0 or greater than or equal to the world size.
madness::ExceptionWhen value has been set, except on the root process.
Note
It is the user's responsibility to ensure that key does not conflict with other calls to bcast. Keys may be reused after the associated operation has finished.

References MADNESS_ASSERT, madness::Future< T >::probe(), madness::World::rank(), madness::World::size(), and world_.

◆ bcast_handler()

template<typename keyT , typename valueT , typename taskfnT >
static void madness::WorldGopInterface::bcast_handler ( const AmArg arg)
inlinestaticprivate

◆ bcast_internal() [1/2]

template<typename tagT , typename keyT , typename valueT >
void madness::WorldGopInterface::bcast_internal ( const keyT &  key,
Future< valueT > &  value,
const ProcessID  group_root,
const Group group 
) const
inlineprivate

Group broadcast.

Broadcast data from the group_root process to all processes in group. The input/output data is held by value.

Template Parameters
tagTThe tag type that is attached to keyT
keyTThe base key type
valueTThe value type that will be broadcast
Parameters
[in]keyThe key associated with this broadcast
[in,out]valueOn the group_root process, this is used as the input data that will be broadcast to all other processes in the group. On other processes it is used as the output to the broadcast
group_rootThe process in group that owns the data to be broadcast
groupThe process group where value will be broadcast
Exceptions
madness::ExceptionWhen value has been set, except on the group_root process.

References madness::WorldTaskQueue::add(), madness::Future< T >::get(), madness::detail::DistCache< keyT >::get_cache_value(), group_bcast_task(), madness::TaskAttributes::hipri(), madness::Group::local_update(), MADNESS_ASSERT, madness::Future< T >::probe(), madness::Group::rank(), madness::World::taskq, and world_.

◆ bcast_internal() [2/2]

template<typename tagT , typename keyT , typename valueT >
void madness::WorldGopInterface::bcast_internal ( const keyT &  key,
Future< valueT > &  value,
const ProcessID  root 
) const
inlineprivate

Broadcast.

Broadcast data from the root process to all processes in world. The input/output data is held by value.

Template Parameters
tagTThe tag type that is attached to keyT
keyTThe base key type
valueTThe value type that will be broadcast
Parameters
[in]keyThe key associated with this broadcast
[in,out]valueOn the root process, this is used as the input data that will be broadcast to all other processes in the group. On other processes it is used as the output to the broadcast
rootThe process that owns the data to be broadcast
Exceptions
madness::ExceptionWhen value has been set, except on the root process.

References madness::WorldTaskQueue::add(), bcast_task(), madness::Future< T >::get(), madness::detail::DistCache< keyT >::get_cache_value(), madness::TaskAttributes::hipri(), MADNESS_ASSERT, madness::Future< T >::probe(), madness::World::rank(), madness::World::size(), madness::World::taskq, and world_.

◆ bcast_task()

template<typename keyT , typename valueT >
void madness::WorldGopInterface::bcast_task ( const keyT &  key,
const valueT value,
const ProcessID  root 
) const
inlineprivate

Broadcast task.

This task will set the local cache with the broadcast data and send it to child processes in the binary tree.

References madness::World::am, madness::RMI::ATTR_UNORDERED, SafeMPI::Intracomm::binary_tree_info(), madness::copy_am_arg(), madness::World::mpi, madness::new_am_arg(), madness::WorldAmInterface::send(), madness::detail::DistCache< keyT >::set_cache_value(), and world_.

Referenced by bcast_internal().

◆ bit_and()

template<typename T >
void madness::WorldGopInterface::bit_and ( T buf,
size_t  nelem 
)
inline

◆ bit_or()

template<typename T >
void madness::WorldGopInterface::bit_or ( T buf,
size_t  nelem 
)
inline

◆ bit_xor()

template<typename T >
void madness::WorldGopInterface::bit_xor ( T buf,
size_t  nelem 
)
inline

◆ broadcast() [1/4]

template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void madness::WorldGopInterface::broadcast ( T t)
inline

Broadcast of a scalar from node 0 to all other nodes.

References broadcast().

◆ broadcast() [2/4]

template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void madness::WorldGopInterface::broadcast ( T t,
ProcessID  root 
)
inline

Broadcast of a scalar from node root to all other nodes.

References broadcast().

◆ broadcast() [3/4]

template<typename T , typename = std::enable_if_t<madness::is_trivially_copyable_v<T>>>
void madness::WorldGopInterface::broadcast ( T buf,
size_t  nelem,
ProcessID  root 
)
inline

Broadcasts typed contiguous data from process root while still processing AM & tasks.

Optimizations can be added for long messages

References broadcast(), and T().

◆ broadcast() [4/4]

void madness::WorldGopInterface::broadcast ( void *  buf,
size_t  nbyte,
ProcessID  root,
bool  dowork = true,
Tag  bcast_tag = -1 
)

◆ broadcast_serializable()

template<typename objT , typename = std::void_t<decltype(std::declval<archive::BufferInputArchive&>()&std::declval<objT&>())>, typename = std::void_t<decltype(std::declval<archive::BufferOutputArchive&>()&std::declval<const objT&>())>>
void madness::WorldGopInterface::broadcast_serializable ( objT &  obj,
ProcessID  root 
)
inline

◆ concat0()

template<typename T >
std::vector< T > madness::WorldGopInterface::concat0 ( const std::vector< T > &  v,
size_t  bufsz = 1024*1024 
)
inline

Concatenate an STL vector of serializable stuff onto node 0.

Parameters
[in]vinput vector
[in]bufszthe max number of bytes in the result; must be less than std::numeric_limits<int>::max()
Returns
on rank 0 returns the concatenated vector, elsewhere returns an empty vector

References madness::World::await(), SafeMPI::Intracomm::binary_tree_info(), madness::WorldMpiInterface::Irecv(), madness::WorldMpiInterface::Isend(), MADNESS_ASSERT, max_reducebcast_msg_size(), madness::World::mpi, MPI_BYTE, MPI_INT, posix_memalign(), madness::WorldMpiInterface::Recv(), madness::WorldMpiInterface::Send(), madness::archive::BufferOutputArchive::size(), SafeMPI::Intracomm::unique_tag(), SafeMPI::Intracomm::unique_tag_period(), v, and world_.

Referenced by madness::LoadBalanceDeux< NDIM >::load_balance().

◆ fence()

void madness::WorldGopInterface::fence ( bool  debug = false)

Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.

References debug, and fence_impl().

Referenced by DF::DF(), madness::FunctionImpl< T, NDIM >::FunctionImpl(), madness::LoadBalanceDeux< NDIM >::LoadBalanceDeux(), madness::Znemo::timer::timer(), madness::timer::timer(), madness::abssq(), madness::add(), madness::add(), madness::add(), madness::add(), madness::MP2::add_local_coupling(), madness::apply(), madness::apply(), madness::FunctionImpl< T, NDIM >::apply(), madness::apply(), madness::apply(), madness::apply(), madness::apply(), madness::apply(), madness::apply(), madness::apply(), madness::FunctionImpl< T, NDIM >::apply_1d_realspace_push(), apply_BSH(), apply_BSH_new(), madness::MP2::apply_exchange_vector(), madness::TDHF::apply_excitation_operators(), madness::TDHF::apply_G(), madness::GTHPseudopotential< Q >::apply_potential(), apply_potential(), madness::SCF::apply_potential(), madness::FunctionImpl< T, NDIM >::apply_source_driven(), madness::projector_irrep::apply_symmetry_operators(), madness::FunctionImpl< T, NDIM >::binaryXX(), madness::Solver< T, NDIM >::build_fock_matrix(), Calculation::calc_optimal_coeffs(), madness::change_tree_state(), madness::Function< T, NDIM >::clear(), madness::Cloud::clear_cache(), madness::compress(), madness::PNO::compute_fluctuation_matrix(), madness::F12Potentials::compute_fQc_integrals_ij(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::compute_K_tile(), madness::NemoBase::compute_kinetic_energy(), madness::CC2::compute_local_coupling(), madness::Nemo::compute_nemo_potentials(), madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::compute_offdiagonal_batch_in_symmetric_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::F12Potentials::compute_regularized_fluctuation_matrix(), madness::SCF::compute_residual(), Calculation::compute_residuals(), madness::Solver< T, NDIM >::compute_rho(), madness::Solver< T, NDIM >::compute_rho_slow(), madness::conj(), madness::convert(), madness::response_space::copy(), madness::copy(), madness::copy(), madness::copy(), madness::FunctionImpl< T, NDIM >::copy_coeffs(), madness::PotentialManager::core_projection(), madness::MacroTaskQ::create_worlds(), madness::cross(), madness::SCF::derivatives(), dipole_generator(), madness::div(), madness::FunctionImpl< T, NDIM >::do_dirac_convolution(), madness::Znemo::do_step_restriction(), madness::SCF::do_step_restriction(), doit(), dostuff(), madness::Znemo::timer::end(), molresponse::end_timer(), molresponse::end_timer(), energy(), energy(), madness::BinSorter< T, inserterT >::finish(), madness::FunctionImpl< T, NDIM >::flo_unary_op_node_inplace(), madness::FunctionImpl< T, NDIM >::flo_unary_op_node_inplace(), madness::FunctionImpl< T, NDIM >::gaxpy(), madness::gaxpy(), madness::gaxpy(), gaxpy1(), madness::FunctionImpl< T, NDIM >::gaxpy_ext(), madness::FunctionImpl< T, NDIM >::gaxpy_inplace(), madness::FunctionImpl< T, NDIM >::gaxpy_inplace_reconstructed(), madness::MacroTaskQ::get_scheduled_task_number(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::WorldDCPmapInterface< keyT >::global_size(), madness::grad(), madness::grad_ble_one(), madness::grad_ble_two(), madness::grad_bpsline_two(), madness::grad_bspline_one(), madness::grad_bspline_three(), CoreFittingTarget::gradient(), ground_exchange(), ground_exchange_multiworld(), madness::BasisFunctions::guess_with_exop(), madness::hartree_product(), madness::FunctionImpl< T, NDIM >::hartree_product(), madness::Solver< T, NDIM >::initial_guess(), initial_loadbal(), initialize_calc_params(), madness::inner(), madness::inner(), madness::innerXX(), madness::timer::interrupt(), madness::CC2::iterate_singles(), madness::SCF::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), madness::Kinetic< T, NDIM >::kinetic_energy_matrix(), line_plot(), madness::FunctionImpl< T, NDIM >::load(), madness::archive::ArchiveLoadImpl< ParallelInputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::load(), madness::LoadBalanceDeux< NDIM >::load_balance(), madness::SCF::load_mos(), Calculation::load_mos(), madness::Solver< T, NDIM >::load_orbitals(), madness::load_quadrature(), madness::SCF::loadbal(), loadbal(), loadbal(), loadbal(), main(), madness::main(), main(), main(), DF::make_component_lineplots(), DF::make_component_logplots(), madness::Nemo::make_density(), madness::SCF::make_density(), madness::SCF::make_density(), MiniDFT::make_density(), DF::make_density_lineplots(), madness::SCF::make_fock_matrix(), madness::Zcis::make_guess(), madness::TDHF::make_perturbed_fock_matrix(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::make_redundant(), Calculation::make_reference(), Calculation::make_Upsi(), madness::TDHF::make_virtuals(), madness::FunctionImpl< T, NDIM >::make_Vphi(), madness::FunctionImpl< T, NDIM >::make_Vphi_only(), MiniDFT::makeao(), makeao_slow(), madness::matrix_dot(), madness::matrix_inner(), madness::matrix_inner_old(), madness::matrix_mul_sparse(), madness::FunctionImpl< T, NDIM >::merge_trees(), madness::mul(), madness::mul(), madness::mul(), madness::mul(), madness::mul_sparse(), madness::mul_sparse(), madness::EigSolverOp< T, NDIM >::multi_op_o(), madness::EigSolverOp< T, NDIM >::multi_op_r(), madness::FunctionImpl< T, NDIM >::multi_to_multi_op_values(), madness::Function< T, NDIM >::multiop_values(), madness::FunctionImpl< T, NDIM >::multiop_values(), madness::multiply(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::FunctionImpl< T, NDIM >::mulXX(), madness::FunctionImpl< T, NDIM >::mulXXvec(), madness::nonstandard(), madness::norm2(), madness::X_space::norm2s(), madness::norm2s(), madness::norm2s(), madness::norm2s_T(), madness::norm_tree(), madness::norm_tree(), madness::normalize(), madness::pg_operator::operator()(), MyDerivativeOperator< T, NDIM >::operator()(), madness::DerivativeOperator< T, NDIM >::operator()(), madness::partial_mul(), madness::plot_along(), madness::plot_along(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), madness::plot_line(), Calculation::plot_p(), madness::plotdx(), madness::plotvtk_begin(), madness::plotvtk_data(), madness::plotvtk_data(), madness::plotvtk_end(), madness::MolecularOrbitals< T, NDIM >::post_process_mos(), preloadbal(), madness::XCOperator< T, NDIM >::prep_xc_args(), madness::XCOperator< T, NDIM >::prep_xc_args_response(), madness::WorldProfile::print(), madness::WorldDCPmapInterface< keyT >::print_data_sizes(), madness::Solver< T, NDIM >::print_fock_matrix_eigs(), madness::Solver< T, NDIM >::print_potential_matrix_eigs(), madness::print_stats(), madness::MacroTaskQ::print_taskq(), madness::SCF::project(), madness::Solver< T, NDIM >::project_ao_basis(), madness::SCF::project_ao_basis_only(), madness::projector_irrep::project_on_irreps(), madness::Function< T, NDIM >::project_out(), madness::FunctionImpl< T, NDIM >::project_out(), propagate(), propagate(), GroundStateCalculation::read(), realmain(), madness::reconstruct(), madness::FunctionImpl< T, NDIM >::recursive_apply(), madness::FunctionImpl< T, NDIM >::recursive_apply(), madness::WorldDCPmapInterface< keyT >::redistribute(), madness::FunctionImpl< T, NDIM >::refine(), madness::refine(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate(), madness::Cloud::replicate(), madness::CompositeFunctorInterface< T, NDIM, MDIM >::replicate_low_dim_functions(), madness::Solver< T, NDIM >::reproject(), response_exchange_multiworld(), madness::timer::resume(), madness::rot(), madness::Znemo::rotate_subspace(), madness::SCF::rotate_subspace(), madness::Nemo::rotate_subspace(), madness::SCF::rotate_subspace(), madness::MacroTaskQ::run_all(), madness::scale(), madness::scale(), madness::scale(), madness::scale(), madness::FunctionImpl< T, NDIM >::scale_oop(), serial_invoke(), madness::Function< T, NDIM >::set_impl(), madness::set_thresh(), simple_example(), madness::standard(), madness::MyTimer::start(), molresponse::start_timer(), DF::start_timer(), START_TIMER(), START_TIMER(), START_TIMER(), madness::Solver< T, NDIM >::START_TIMER(), madness::START_TIMER(), madness::MP2::START_TIMER(), madness::startup(), madness::FunctionImpl< T, NDIM >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store(), madness::Cloud::store(), madness::Cloud::store_other(), madness::Cloud::store_other(), madness::sub(), madness::sub(), madness::LoadBalanceDeux< NDIM >::sum(), madness::sum(), madness::Znemo::timer::tag(), madness::timer::tag(), test(), test0(), test1(), test10(), test11(), test12(), test13(), test14(), test15(), test2(), test5(), test6(), test6a(), test7(), test_apply_push_1d(), test_basic(), test_bsh(), TEST_CASE(), test_conv(), test_conversion(), test_convolution(), test_diff(), test_florian(), test_gconv(), test_io(), test_local(), test_math(), test_multi(), test_multi_world(), test_opdir(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_plot(), test_qm(), test_transform(), test_unaryop(), madness::transform(), madness::transform(), madness::transform(), madness::transform(), madness::Zcis::transform(), transform(), madness::transform_reconstructed(), madness::truncate(), madness::truncate(), madness::SCF::twoint(), madness::FunctionImpl< T, NDIM >::unary_op_coeff_inplace(), madness::FunctionImpl< T, NDIM >::unary_op_node_inplace(), madness::FunctionImpl< T, NDIM >::unary_op_value_inplace(), madness::FunctionImpl< T, NDIM >::unaryXX(), madness::FunctionImpl< T, NDIM >::unaryXXvalues(), madness::SubspaceK< T, NDIM >::update_subspace(), madness::Subspace< T, NDIM >::update_subspace(), madness::SCF::update_subspace(), madness::MolecularEnergy::value(), CoreFittingTarget::value(), madness::Function< T, NDIM >::vmulXX(), madness::FunctionImpl< T, NDIM >::vtransform(), work_even(), work_odd(), madness::zero_functions(), madness::X_space::zero_functions(), and madness::zero_functions_compressed().

◆ fence_impl()

void madness::WorldGopInterface::fence_impl ( std::function< void()>  epilogue = []{},
bool  pause_during_epilogue = false,
bool  debug = false 
)
private

Implementation of fence.

Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.

Parameters
[in]epiloguethe action to execute (by the calling thread) immediately after the fence
[in]pause_during_epiloguewhether to suspend work while executing epilogue
[in]debugset to true to print progress statistics using madness::print(); the default is false.
Warning
currently only pause_during_epilogue=false is supported

Runs Dykstra-like termination algorithm on binary tree by locally ensuring ntask=0 and all am sent and processed, and then participating in a global sum of nsent and nrecv. Then globally checks that nsent=nrecv and that both are constant over two traversals. We are then we are sure that all tasks and AM are processed and there no AM in flight.

References madness::World::am, madness::World::await(), SafeMPI::Intracomm::binary_tree_info(), broadcast(), debug, deferred_, madness::WorldTaskQueue::fence(), forbid_fence_, madness::WorldAmInterface::free_managed_buffers(), madness::WorldMpiInterface::Irecv(), madness::WorldMpiInterface::Isend(), MADNESS_ASSERT, MADNESS_CHECK, madness::World::mpi, MPI_BYTE, madness::WorldAmInterface::nrecv, madness::WorldAmInterface::nsent, madness::print(), PROFILE_MEMBER_FUNC, madness::World::rank(), madness::WorldTaskQueue::size(), sum, madness::World::taskq, SafeMPI::Intracomm::unique_tag(), and world_.

Referenced by fence().

◆ group_bcast_handler()

template<typename keyT , typename valueT , typename taskfnT >
static void madness::WorldGopInterface::group_bcast_handler ( const AmArg arg)
inlinestaticprivate

◆ group_bcast_task()

template<typename keyT , typename valueT >
void madness::WorldGopInterface::group_bcast_task ( const keyT &  key,
const valueT value,
const ProcessID  group_root,
const Group group 
) const
inlineprivate

◆ initial_max_reducebcast_msg_size()

int madness::WorldGopInterface::initial_max_reducebcast_msg_size ( )
inlineprivate

◆ lazy_sync() [1/2]

template<typename keyT , typename opT >
void madness::WorldGopInterface::lazy_sync ( const keyT &  key,
const opT &  op 
) const
inline

Lazy sync.

Lazy sync functions are asynchronous barriers with a nullary functor that is called after all processes have called it with the same key. You can think of lazy_sync as an asynchronous barrier. The lazy_sync functor must have the following signature:

class SyncFunc {
public:
// typedefs
typedef void result_type;
// Constructors
SyncFunc(const SyncFunc&);
// The function that performs the sync operation
void operator()();
}; // class SyncFunc
Template Parameters
keyTThe key type
opTThe operation type
Parameters
keyThe sync key
opThe sync operation to be executed on this process
Note
It is the user's responsibility to ensure that key does not conflict with other calls to lazy_sync. Keys may be reused after the associated operation has finished.

References madness::WorldTaskQueue::add(), SafeMPI::Intracomm::binary_tree_info(), madness::TaskAttributes::hipri(), madness::World::mpi, op(), madness::World::size(), madness::World::taskq, and world_.

◆ lazy_sync() [2/2]

template<typename keyT , typename opT >
void madness::WorldGopInterface::lazy_sync ( const keyT &  key,
const opT &  op,
const Group group 
) const
inline

Group lazy sync.

Lazy sync functions are asynchronous barriers with a nullary functor that is called after all processes in the group have called it with the same key. You can think of lazy_sync as an asynchronous barrier. The op functor must have the following signature:

class SyncFunc {
public:
// typedefs
typedef void result_type;
// Constructors
SyncFunc(const SyncFunc&);
// The function that performs the sync operation
void operator()();
}; // class SyncFunc
Template Parameters
keyTThe key type
opTThe operation type
Parameters
keyThe sync key
opThe sync operation to be executed on this process
Note
It is the user's responsibility to ensure that key does not conflict with other calls to lazy_sync. Keys may be reused after the associated operation has finished.

References madness::WorldTaskQueue::add(), madness::Group::empty(), madness::Group::get_world(), madness::TaskAttributes::hipri(), madness::World::id(), MADNESS_ASSERT, madness::Group::make_tree(), op(), madness::Group::size(), madness::World::taskq, and world_.

◆ lazy_sync_children()

template<typename keyT , typename opT >
void madness::WorldGopInterface::lazy_sync_children ( const ProcessID  child0,
const ProcessID  child1,
const keyT &  key,
opT &  op,
const ProcessID   
) const
inlineprivate

Lazy sync parent task.

Send signal to the child processes in the binary tree for a lazy sync operation. After the signal has been sent to the children, the sync operation, op, will be run.

Template Parameters
keyTThe key type
opTThe sync operation type
Parameters
child0The first child process of this process in the binary tree
child1The second child process of this process in the binary tree
keyThe key associated with the sync operation
opThe sync operation that will be run

References op(), and send_internal().

◆ lazy_sync_internal()

template<typename tagT , typename keyT , typename opT >
void madness::WorldGopInterface::lazy_sync_internal ( const ProcessID  parent,
const ProcessID  child0,
const ProcessID  child1,
const keyT &  key,
const opT &  op 
) const
inlineprivate

Start a distributed lazy sync operation.

Parameters
keyThe sync key
opThe sync operation to be executed on this process

References madness::WorldTaskQueue::add(), madness::TaskAttributes::hipri(), op(), madness::Future< T >::probe(), madness::World::rank(), send_internal(), madness::World::taskq, and world_.

◆ lazy_sync_parent()

template<typename keyT >
void madness::WorldGopInterface::lazy_sync_parent ( const ProcessID  parent,
const keyT &  key,
const ProcessID  ,
const ProcessID   
) const
inlineprivate

Lazy sync parent task.

Send signal to the parent process in the binary tree for a lazy sync operation.

Template Parameters
keyTThe key type
Parameters
parentThe parent process of this process in the binary tree
keyThe lazy sync key

References send_internal().

◆ logic_and()

template<typename T >
void madness::WorldGopInterface::logic_and ( T buf,
size_t  nelem 
)
inline

◆ logic_or()

template<typename T >
void madness::WorldGopInterface::logic_or ( T buf,
size_t  nelem 
)
inline

◆ max() [1/2]

template<typename T >
void madness::WorldGopInterface::max ( T a)
inline

Global max of a scalar while still processing AM & tasks.

References a, and max.

◆ max() [2/2]

template<typename T >
void madness::WorldGopInterface::max ( T buf,
size_t  nelem 
)
inline

Inplace global max while still processing AM & tasks.

Referenced by madness::Cloud::print_size(), madness::print_stats(), test15(), and madness::time_transform().

◆ max_reducebcast_msg_size()

int madness::WorldGopInterface::max_reducebcast_msg_size ( ) const
inline

Returns the maximum size of messages (in bytes) sent by reduce and broadcast.

Returns
the maximum size of messages (in bytes) sent by reduce and broadcast

References max_reducebcast_msg_size_.

Referenced by broadcast(), concat0(), and reduce().

◆ min() [1/2]

template<typename T >
void madness::WorldGopInterface::min ( T a)
inline

Global min of a scalar while still processing AM & tasks.

References a, and min().

◆ min() [2/2]

template<typename T >
void madness::WorldGopInterface::min ( T buf,
size_t  nelem 
)
inline

Inplace global min while still processing AM & tasks.

Referenced by min(), madness::Cloud::print_size(), madness::print_stats(), and madness::time_transform().

◆ product()

template<typename T >
void madness::WorldGopInterface::product ( T buf,
size_t  nelem 
)
inline

Inplace global product while still processing AM & tasks.

◆ recv()

template<typename valueT , typename keyT >
static Future< valueT > madness::WorldGopInterface::recv ( const ProcessID  source,
const keyT &  key 
)
inlinestatic

Receive data from source.

Template Parameters
valueTThe data type stored in cache
keyTThe key type
Parameters
sourceThe process that is sending the data to this process
keyThe key associated with the received data
Returns
A future that will be set with the received data
Note
It is the user's responsibility to ensure that key does not conflict with other calls to recv. Keys may be reused after the associated operation has finished.

References source().

◆ recv_internal()

template<typename valueT , typename keyT >
static Future< valueT > madness::WorldGopInterface::recv_internal ( const keyT &  key)
inlinestaticprivate

Receive data from remote node.

Template Parameters
valueTThe data type stored in cache
Parameters
keyThe distributed ID
Returns
A future to the data

◆ reduce() [1/3]

template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::type > madness::WorldGopInterface::reduce ( const keyT &  key,
const valueT value,
const opT &  op,
const ProcessID  group_root,
const Group group 
)
inline

Distributed group reduce.

The reduce functor must have the following signature:

class ReduceFunc {
public:
// Typedefs
typedef ... result_type;
typedef ... argument_type;
// Constructors
ReduceFunc(const ReduceFunc&);
// Initialization operation, which returns a default result object
result_type operator()() const;
// Reduce two result objects
void operator()(result_type&, const result_type&) const;
// Reduce a result object and an argument object
void operator()(result_type&, const argument_type&) const;
}; // class ReduceFunc
Template Parameters
keyTThe key type
valueTThe data type to be reduced
opTThe reduction operation type
Parameters
keyThe key associated with this reduction
valueThe local value to be reduced
opThe reduction operation to be applied to local and remote data
group_rootThe group process that will receive the result of the reduction
groupThe group that will preform the reduction
Returns
A future to the reduce value on the root process, otherwise an uninitialized future that may be ignored.
Exceptions
madness::ExceptionWhen group is empty
madness::ExceptionWhen group is not registered
madness::ExceptionWhen the world id of group is not equal to that of the world used to construct this object
madness::ExceptionWhen this process is not in the group
madness::ExceptionWhen group_root is less than zero or greater than or equal to group size.
Note
It is the user's responsibility to ensure that key does not conflict with other calls to reduce. Keys may be reused after the associated operation has finished.

References madness::Group::empty(), madness::Group::get_world(), madness::World::id(), MADNESS_ASSERT, madness::Group::make_tree(), op(), madness::Group::size(), and world_.

◆ reduce() [2/3]

template<typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::type > madness::WorldGopInterface::reduce ( const keyT &  key,
const valueT value,
const opT &  op,
const ProcessID  root 
)
inline

Distributed reduce.

The reduce functor must have the following signature:

class ReduceFunc {
public:
// Typedefs
typedef ... result_type;
typedef ... argument_type;
// Constructors
ReduceFunc(const ReduceFunc&);
// Initialization operation, which returns a default result object
result_type operator()() const;
// Reduce two result objects
void operator()(result_type&, const result_type&) const;
// Reduce a result object and an argument object
void operator()(result_type&, const argument_type&) const;
}; // class ReduceFunc
Template Parameters
keyTThe key type
valueTThe data type to be reduced
opTThe reduction operation type
Parameters
keyThe key associated with this reduction
valueThe local value to be reduced
opThe reduction operation to be applied to local and remote data
rootThe process that will receive the result of the reduction
Returns
A future to the reduce value on the root process, otherwise an uninitialized future that may be ignored.
Note
It is the user's responsibility to ensure that key does not conflict with other calls to reduce. Keys may be reused after the associated operation has finished.

References SafeMPI::Intracomm::binary_tree_info(), MADNESS_ASSERT, madness::World::mpi, op(), madness::World::size(), and world_.

◆ reduce() [3/3]

template<typename T , class opT >
void madness::WorldGopInterface::reduce ( T buf,
std::size_t  nelem,
opT  op 
)
inline

Inplace global reduction (like MPI all_reduce) while still processing AM & tasks.

Optimizations can be added for long messages and to reduce the memory footprint

References madness::World::await(), SafeMPI::Intracomm::binary_tree_info(), broadcast(), madness::WorldMpiInterface::Irecv(), madness::WorldMpiInterface::Isend(), MADNESS_ASSERT, max_reducebcast_msg_size(), madness::World::mpi, MPI_BYTE, op(), posix_memalign(), T(), SafeMPI::Intracomm::unique_tag(), and world_.

◆ reduce_internal()

template<typename tagT , typename keyT , typename valueT , typename opT >
Future< typename detail::result_of< opT >::type > madness::WorldGopInterface::reduce_internal ( const ProcessID  parent,
const ProcessID  child0,
const ProcessID  child1,
const ProcessID  root,
const keyT &  key,
const valueT value,
const opT &  op 
)
inlineprivate

Distributed reduce.

Template Parameters
tagTThe tag type to be added to the key type
keyTThe key type
valueTThe data type to be reduced
opTThe reduction operation type
Parameters
keyThe key associated with this reduction
valueThe local value to be reduced
opThe reduction operation to be applied to local and remote data
rootThe process that will receive the result of the reduction
Returns
A future to the reduce value on the root process, otherwise an uninitialized future that may be ignored.

References madness::WorldTaskQueue::add(), madness::Future< T >::default_initializer(), madness::TaskAttributes::hipri(), op(), madness::World::rank(), send_internal(), madness::World::taskq, and world_.

◆ reduce_result_task()

template<typename opT >
static detail::result_of< opT >::type madness::WorldGopInterface::reduce_result_task ( const std::vector< Future< typename detail::result_of< opT >::type > > &  results,
const opT &  op 
)
inlinestaticprivate

◆ reduce_task()

template<typename valueT , typename opT >
static detail::result_of< opT >::type madness::WorldGopInterface::reduce_task ( const valueT value,
const opT &  op 
)
inlinestaticprivate

References op().

◆ send()

template<typename keyT , typename valueT >
void madness::WorldGopInterface::send ( const ProcessID  dest,
const keyT &  key,
const valueT value 
) const
inline

Send value to dest.

Template Parameters
keyTThe key type
valueTThe value type (this may be a Future type)
Parameters
destThe process where the data will be sent
keyThe key that is associated with the data
valueThe data to be sent to dest
Note
It is the user's responsibility to ensure that key does not conflict with other calls to send. Keys may be reused after the associated operation has finished.

References madness::World::rank(), send_internal(), and world_.

◆ send_internal() [1/2]

template<typename keyT , typename valueT >
std::enable_if<!is_future< valueT >::value >::type madness::WorldGopInterface::send_internal ( const ProcessID  dest,
const keyT &  key,
const valueT value 
) const
inlineprivate

Send value to dest.

Send non-future data to dest.

Template Parameters
keyTThe key type
valueTThe value type
Parameters
destThe node where the data will be sent
keyThe key that is associated with the data
valueThe data to be sent to dest

References madness::WorldTaskQueue::add(), madness::TaskAttributes::hipri(), madness::World::rank(), madness::World::taskq, and world_.

Referenced by lazy_sync_children(), lazy_sync_internal(), lazy_sync_parent(), madness::WorldGopInterface::DelayedSend< keyT, valueT >::notify(), reduce_internal(), and send().

◆ send_internal() [2/2]

template<typename keyT , typename valueT >
void madness::WorldGopInterface::send_internal ( ProcessID  dest,
const keyT &  key,
const Future< valueT > &  value 
) const
inlineprivate

Send value to dest.

Send data that is stored in a future to dest. The data in value is only sent to the remote process once it has been set.

Template Parameters
keyTThe key type
valueTThe value type
Parameters
destThe node where the data will be sent
keyThe key that is associated with the data
valueThe data to be sent to dest

References madness::WorldTaskQueue::add(), madness::Future< T >::get(), madness::TaskAttributes::hipri(), madness::Future< T >::probe(), madness::World::rank(), madness::World::taskq, and world_.

◆ serial_invoke()

void madness::WorldGopInterface::serial_invoke ( std::function< void()>  action)

Executes an action on single (this) thread after ensuring all other work is done.

Parameters
[in]actionthe action to execute (by the calling thread)

References fence().

◆ set_debug()

bool madness::WorldGopInterface::set_debug ( bool  value)
inline

Set debug flag to new value and return old value.

References debug_, and status.

◆ set_forbid_fence()

bool madness::WorldGopInterface::set_forbid_fence ( bool  value)
inline

Set forbid_fence flag to new value and return old value.

References forbid_fence_, and status.

Referenced by madness::innerXX(), and madness::MacroTaskQ::run_all().

◆ set_max_reducebcast_msg_size()

int madness::WorldGopInterface::set_max_reducebcast_msg_size ( int  sz)
inline

Set the maximum size of messages (in bytes) sent by reduce and broadcast.

Parameters
szthe maximum size of messages (in bytes) sent by reduce and broadcast
Returns
the previous maximum size of messages (in bytes) sent by reduce and broadcast
Precondition
sz>0

References MADNESS_ASSERT, and max_reducebcast_msg_size_.

Referenced by test14().

◆ sum() [1/2]

template<typename T >
void madness::WorldGopInterface::sum ( T a)
inline

Global sum of a scalar while still processing AM & tasks.

References a, and sum.

◆ sum() [2/2]

template<typename T >
void madness::WorldGopInterface::sum ( T buf,
size_t  nelem 
)
inline

Friends And Related Symbol Documentation

◆ detail::DeferredCleanup

friend class detail::DeferredCleanup
friend

Member Data Documentation

◆ debug_

bool madness::WorldGopInterface::debug_
private

Debug mode.

Referenced by set_debug().

◆ deferred_

std::shared_ptr<detail::DeferredCleanup> madness::WorldGopInterface::deferred_
private

Deferred cleanup object.

Referenced by ~WorldGopInterface(), and fence_impl().

◆ forbid_fence_

bool madness::WorldGopInterface::forbid_fence_ =false
private

forbid calling fence() in case of several active worlds

Referenced by fence_impl(), and set_forbid_fence().

◆ max_reducebcast_msg_size_

int madness::WorldGopInterface::max_reducebcast_msg_size_ = std::numeric_limits<int>::max()
private

maximum size of messages (in bytes) sent by reduce and broadcast

Referenced by max_reducebcast_msg_size(), and set_max_reducebcast_msg_size().

◆ world_

World& madness::WorldGopInterface::world_
private

The documentation for this class was generated from the following files: