MADNESS 0.10.1
|
#include <macrotaskq.h>
Public Member Functions | |
MacroTaskQ (World &universe, int nworld, const long printlevel=0) | |
create an empty taskq and initialize the subworlds | |
~MacroTaskQ () | |
void | add_tasks (MacroTaskBase::taskqT &vtask) |
long | get_nsubworld () const |
World & | get_subworld () |
void | print_taskq () const |
void | run_all (MacroTaskBase::taskqT vtask=MacroTaskBase::taskqT()) |
run all tasks, tasks may store the results in the cloud | |
void | set_printlevel (const long p) |
Public Member Functions inherited from madness::WorldObject< MacroTaskQ > | |
WorldObject (const WorldObject &other) | |
WorldObject (World &world) | |
Constructor that associates an object (via the derived class) with a globally unique ID. | |
virtual | ~WorldObject () |
World & | get_world () const |
Returns a reference to the world . | |
const uniqueidT & | id () const |
Returns the globally unique object ID. | |
WorldObject & | operator= (const WorldObject &)=delete |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9) const |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)() . | |
Public Member Functions inherited from madness::WorldObjectBase | |
virtual | ~WorldObjectBase ()=default |
Static Public Member Functions | |
static std::shared_ptr< World > | create_worlds (World &universe, const std::size_t nsubworld) |
static void | set_pmap (World &world) |
Public Attributes | |
madness::Cloud | cloud |
Private Member Functions | |
void | add_replicated_task (const std::shared_ptr< MacroTaskBase > &task) |
long | get_scheduled_task_number (World &subworld) |
scheduler is located on universe.rank==0 | |
long | get_scheduled_task_number_local () |
bool | printdebug () const |
bool | printprogress () const |
bool | printtimings () const |
void | set_complete (const long task_number) const |
scheduler is located on rank==0 | |
void | set_complete_local (const long task_number) const |
scheduler is located on rank==0 | |
std::size_t | size () const |
Private Attributes | |
long | nsubworld =1 |
std::shared_ptr< WorldDCPmapInterface< Key< 1 > > > | pmap1 |
std::shared_ptr< WorldDCPmapInterface< Key< 2 > > > | pmap2 |
std::shared_ptr< WorldDCPmapInterface< Key< 3 > > > | pmap3 |
std::shared_ptr< WorldDCPmapInterface< Key< 4 > > > | pmap4 |
std::shared_ptr< WorldDCPmapInterface< Key< 5 > > > | pmap5 |
std::shared_ptr< WorldDCPmapInterface< Key< 6 > > > | pmap6 |
long | printlevel =0 |
std::shared_ptr< World > | subworld_ptr |
MacroTaskBase::taskqT | taskq |
std::mutex | taskq_mutex |
World & | universe |
Additional Inherited Members | |
Public Types inherited from madness::WorldObject< MacroTaskQ > | |
typedef WorldObject< MacroTaskQ > | objT |
Protected Member Functions inherited from madness::WorldObject< MacroTaskQ > | |
void | process_pending () |
To be called from derived constructor to process pending messages. | |
|
inline |
create an empty taskq and initialize the subworlds
References create_worlds(), madness::WorldObject< MacroTaskQ >::process_pending(), subworld_ptr, and universe.
|
inline |
|
inlineprivate |
References madness::WorldObject< MacroTaskQ >::task(), and taskq.
Referenced by add_tasks(), and run_all().
|
inline |
References add_replicated_task(), madness::World::rank(), and universe.
|
inlinestatic |
for each process create a world using a communicator shared with other processes by round-robin copy-paste from test_world.cc
References madness::WorldMpiInterface::comm(), madness::WorldGopInterface::fence(), madness::World::gop, madness::World::mpi, nsubworld, madness::World::rank(), SafeMPI::Intracomm::Split(), and universe.
Referenced by MacroTaskQ(), main(), and simple_example().
|
inline |
References nsubworld.
|
inlineprivate |
scheduler is located on universe.rank==0
References madness::WorldGopInterface::broadcast_serializable(), madness::WorldGopInterface::fence(), madness::Future< T >::get(), get_scheduled_task_number_local(), madness::World::gop, madness::World::rank(), and madness::WorldObject< MacroTaskQ >::send().
Referenced by run_all().
|
inlineprivate |
References MADNESS_ASSERT, madness::World::rank(), taskq, taskq_mutex, and universe.
Referenced by get_scheduled_task_number().
|
inline |
References subworld_ptr.
Referenced by run_all().
|
inline |
References madness::WorldGopInterface::fence(), madness::World::gop, madness::print(), madness::World::rank(), taskq, and universe.
Referenced by run_all().
|
inlineprivate |
References printlevel.
Referenced by printprogress(), and run_all().
|
inlineprivate |
References printdebug(), and printlevel.
Referenced by run_all().
|
inlineprivate |
References printlevel, madness::World::rank(), and universe.
Referenced by run_all().
|
inline |
run all tasks, tasks may store the results in the cloud
References add_replicated_task(), madness::Cloud::clear(), madness::Cloud::clear_cache(), cloud, madness::cpu_time(), madness::WorldGopInterface::fence(), madness::FunctionDefaults< NDIM >::get_pmap(), get_scheduled_task_number(), get_subworld(), madness::World::gop, madness::World::id(), pmap1, pmap2, pmap3, pmap4, pmap5, pmap6, madness::print(), madness::Cloud::print_size(), print_taskq(), madness::Cloud::print_timings(), printdebug(), printlevel, printprogress(), printtimings(), madness::World::rank(), madness::Cloud::replicate(), set_complete(), madness::WorldGopInterface::set_forbid_fence(), madness::FunctionDefaults< NDIM >::set_pmap(), set_pmap(), madness::World::size(), madness::WorldGopInterface::sum(), madness::WorldObject< MacroTaskQ >::task(), taskq, universe, and madness::wall_time().
|
inlineprivate |
scheduler is located on rank==0
References set_complete_local(), and madness::WorldObject< MacroTaskQ >::task().
Referenced by run_all().
|
inlineprivate |
scheduler is located on rank==0
References MADNESS_ASSERT, madness::World::rank(), taskq, and universe.
Referenced by set_complete().
|
inlinestatic |
References madness::FunctionDefaults< NDIM >::set_default_pmap(), and madness::WorldObject< MacroTaskQ >::world.
Referenced by main(), run_all(), simple_example(), and test_custom_worldobject().
|
inline |
References p(), and printlevel.
|
inlineprivate |
References taskq.
madness::Cloud madness::MacroTaskQ::cloud |
Referenced by run_all().
|
private |
Referenced by create_worlds(), and get_nsubworld().
|
private |
Referenced by run_all().
|
private |
Referenced by run_all().
|
private |
Referenced by run_all().
|
private |
Referenced by run_all().
|
private |
Referenced by run_all().
|
private |
Referenced by run_all().
|
private |
Referenced by printdebug(), printprogress(), printtimings(), run_all(), and set_printlevel().
|
private |
Referenced by MacroTaskQ(), and get_subworld().
|
private |
Referenced by add_replicated_task(), get_scheduled_task_number_local(), print_taskq(), run_all(), set_complete_local(), and size().
|
private |
Referenced by get_scheduled_task_number_local().
|
private |
Referenced by MacroTaskQ(), add_tasks(), create_worlds(), get_scheduled_task_number_local(), print_taskq(), printtimings(), run_all(), and set_complete_local().