![]() |
Rosetta
2021.16
|
The base class for all work units. More...
#include <WorkUnitBase.hh>

Classes | |
| struct | WU_Header |
| this structure can contain any non-dynamicly allocated data. Any simple data types can be used here, ints, real, floats, char, etc.. More... | |
Public Member Functions | |
| WorkUnitBase () | |
| ~WorkUnitBase () override=default | |
| virtual protocols::wum::WorkUnitBaseOP | clone () const |
| virtual void | clear_serial_data () |
| Remove all data, make sure that the memory is also cleared, hence the cals to reserve. More... | |
| virtual void | run () |
| Run the workunit - overloaded by children of this class. More... | |
| void | print (std::ostream &out, bool verbose=false) const |
| Print header information to the stream, single line by default or verbose if verbose is set to true. More... | |
| core::Size | id () |
| Accessor to the ID of the WorkUnit. More... | |
| core::Size | extra_data_1 () |
| Accessor to the extra_data_1 and 3 field of the header. More... | |
| core::Size | extra_data_2 () |
| core::Size | extra_data_3 () |
| void | set_extra_data_1 (core::Size const value) |
| void | set_extra_data_2 (core::Size const value) |
| void | set_extra_data_3 (core::Size const value) |
| void | add_blacklist (int mpi_rank) |
| Adds to the blacklist. More... | |
| void | clear_blacklist () |
| Erases the blacklist. More... | |
| bool | in_blacklist (int mpi_rank) |
| Finds in blacklist, true if is, false if it isn't. More... | |
| void | set_options (const std::string &text) |
| Accesor to the "options" text field. More... | |
| core::Size | get_run_time () |
| Returns the differrence between unix start and stop times. More... | |
| std::string | get_wu_type () const |
| Accessor to header structure, return the WorkUnit Type. More... | |
| void | set_wu_type (const std::string &text) |
| Accessor to header structure, sets the WorkUnit Type. More... | |
| std::string | get_options () const |
| Optain the options string from the header. More... | |
| virtual core::Size | mem_footprint () const |
| Return the memory usage of this WorkUnit. More... | |
| core::Size | last_received_from () |
Protected Member Functions | |
| virtual void | serialize () |
| Make ready for sending. More... | |
| virtual void | deserialize () |
| Make ready for working - i.o.w. take information in serial_data_ and turn it into whatever real data the derivative class has. More... | |
| void | create_unique_id () |
| Make a unique number out of Processor Number and unix timestamp ? More... | |
| std::string & | serial_data () |
| Accessor to the serial data field. More... | |
| const std::string & | serial_data () const |
| Accessor to the serial data field. More... | |
| void | set_run_start () |
| Set the unixtime of the start of the execution of this WorkUnit. More... | |
| void | set_run_stop () |
| Set the unixtime of the stop of the execution of this WorkUnit. More... | |
Protected Attributes | |
| WU_Header | header |
| The header data. More... | |
| core::Size | last_received_from_ |
| Contains the serial number of whatever Rank/Node this WU was last receeived from. More... | |
| std::vector< int > | blacklist_ |
| Contains blacklist of nodes. This data is NOT sent, and is only used on the sending side to determine where not to send a workunit. More... | |
Private Member Functions | |
| unsigned int | raw_data_size () const |
| unsigned int | raw_data_dump (unsigned char **raw_data_ptr) const |
| This allocates and returns a pointer to a block of memory with the workunit data totally serialized. Note that it is that callers responsibility to call delete [] on this memory when they're done with it. More... | |
| void | raw_data_load (const unsigned char *raw_data_ptr, unsigned int size) |
| Read in Header and serial data from a raw block of memeory, like one you'd get from a lowlevel network communication. More... | |
Private Attributes | |
| std::string | serial_data_ |
| Contains more data, such as decoys, silent structucts, .. whatever really. Must be serialized, i.e. in plain text form read for transmission. More... | |
Friends | |
| class | MPI_WorkUnitManager |
| class | MPI_WorkUnitManager_Slave |
| class | WorkUnitManager |
| class | WorkUnitQueue |
The base class for all work units.
| protocols::wum::WorkUnitBase::WorkUnitBase | ( | ) |
References create_unique_id(), protocols::wum::WorkUnitBase::WU_Header::extra_data_1_, protocols::wum::WorkUnitBase::WU_Header::extra_data_2_, protocols::wum::WorkUnitBase::WU_Header::extra_data_3_, protocols::wum::WorkUnitBase::WU_Header::extra_data_4_, header, protocols::wum::WorkUnitBase::WU_Header::id_, last_received_from_, set_options(), set_wu_type(), protocols::wum::TR(), protocols::wum::WorkUnitBase::WU_Header::unixtime_creation_, protocols::wum::WorkUnitBase::WU_Header::unixtime_start_, and protocols::wum::WorkUnitBase::WU_Header::unixtime_stop_.
|
overridedefault |
| void protocols::wum::WorkUnitBase::add_blacklist | ( | int | mpi_rank | ) |
Adds to the blacklist.
References blacklist_.
| void protocols::wum::WorkUnitBase::clear_blacklist | ( | ) |
Erases the blacklist.
References blacklist_.
|
inlinevirtual |
Remove all data, make sure that the memory is also cleared, hence the cals to reserve.
References serial_data_.
|
inlinevirtual |
Reimplemented in protocols::wum::WorkUnit_MoverWrapper, protocols::wum::WorkUnit_SilentStructStore, protocols::wum::WorkUnit_Wait, protocols::mpi_refinement::WorkUnit_PartialAbinitio, protocols::mpi_refinement::WorkUnit_RamaPerturber, protocols::mpi_refinement::WorkUnit_KicCloser, protocols::mpi_refinement::WorkUnit_Relax, protocols::mpi_refinement::WorkUnit_NormalMode, protocols::mpi_refinement::WorkUnit_FragInsert, protocols::mpi_refinement::WorkUnit_MD, protocols::relax::WorkUnit_BatchRelax_and_PostRescore, protocols::wum::DatabaseEntryWorkUnit, protocols::relax::WorkUnit_BatchRelax, protocols::loophash::WorkUnit_LoopHash, protocols::mpi_refinement::WorkUnit_CombinePose, protocols::mpi_refinement::WorkUnit_LoopHash, and protocols::mpi_refinement::WorkUnit_bbGauss.
|
inlineprotected |
Make a unique number out of Processor Number and unix timestamp ?
Referenced by WorkUnitBase().
|
inlineprotectedvirtual |
Make ready for working - i.o.w. take information in serial_data_ and turn it into whatever real data the derivative class has.
Reimplemented in protocols::wum::WorkUnit_SilentStructStore, and protocols::wum::DatabaseEntryWorkUnit.
|
inline |
Accessor to the extra_data_1 and 3 field of the header.
References protocols::wum::WorkUnitBase::WU_Header::extra_data_1_, and header.
|
inline |
References protocols::wum::WorkUnitBase::WU_Header::extra_data_2_, and header.
|
inline |
References protocols::wum::WorkUnitBase::WU_Header::extra_data_3_, and header.
| std::string protocols::wum::WorkUnitBase::get_options | ( | ) | const |
Optain the options string from the header.
References header, and protocols::wum::WorkUnitBase::WU_Header::options_.
Referenced by protocols::mpi_refinement::WorkUnit_KicCloser::run().
| core::Size protocols::wum::WorkUnitBase::get_run_time | ( | ) |
Returns the differrence between unix start and stop times.
References header, protocols::wum::WorkUnitBase::WU_Header::unixtime_start_, and protocols::wum::WorkUnitBase::WU_Header::unixtime_stop_.
| std::string protocols::wum::WorkUnitBase::get_wu_type | ( | ) | const |
Accessor to header structure, return the WorkUnit Type.
References header, and protocols::wum::WorkUnitBase::WU_Header::wu_type_.
Referenced by protocols::wum::WorkUnitList::get_work_unit(), and protocols::wum::WorkUnitList::get_work_unit_clone().
|
inline |
Accessor to the ID of the WorkUnit.
References header, and protocols::wum::WorkUnitBase::WU_Header::id_.
| bool protocols::wum::WorkUnitBase::in_blacklist | ( | int | mpi_rank | ) |
Finds in blacklist, true if is, false if it isn't.
References blacklist_, and protocols::wum::mpi_rank().
|
inline |
References last_received_from_.
|
inlinevirtual |
Return the memory usage of this WorkUnit.
References serial_data().
| void protocols::wum::WorkUnitBase::print | ( | std::ostream & | out, |
| bool | verbose = false |
||
| ) | const |
Print header information to the stream, single line by default or verbose if verbose is set to true.
References protocols::wum::WorkUnitBase::WU_Header::extra_data_1_, protocols::wum::WorkUnitBase::WU_Header::extra_data_2_, protocols::wum::WorkUnitBase::WU_Header::extra_data_3_, protocols::wum::WorkUnitBase::WU_Header::extra_data_4_, header, protocols::wum::WorkUnitBase::WU_Header::id_, protocols::mean_field::max(), protocols::wum::WorkUnitBase::WU_Header::options_, serial_data(), protocols::wum::WorkUnitBase::WU_Header::unixtime_creation_, protocols::wum::WorkUnitBase::WU_Header::unixtime_start_, protocols::wum::WorkUnitBase::WU_Header::unixtime_stop_, and protocols::wum::WorkUnitBase::WU_Header::wu_type_.
Referenced by protocols::loophash::MPI_LoopHashRefine_Master::process_inbound_wus(), protocols::mpi_refinement::MPI_Refine_Master::process_inbound_wus(), protocols::mpi_refinement::MPI_Refine_Emperor::process_inbound_wus(), and protocols::loophash::MPI_LoopHashRefine_Emperor::process_inbound_wus().
|
private |
This allocates and returns a pointer to a block of memory with the workunit data totally serialized. Note that it is that callers responsibility to call delete [] on this memory when they're done with it.
References header, raw_data_size(), serial_data(), and protocols::wum::TR().
|
private |
Read in Header and serial data from a raw block of memeory, like one you'd get from a lowlevel network communication.
References header, serial_data(), and protocols::wum::TR().
|
private |
References serial_data(), and protocols::wum::TR().
Referenced by raw_data_dump().
|
virtual |
Run the workunit - overloaded by children of this class.
Reimplemented in protocols::wum::WorkUnit_MoverWrapper, protocols::wum::WorkUnit_SilentStructStore, protocols::wum::WorkUnit_Wait, protocols::mpi_refinement::WorkUnit_PartialAbinitio, protocols::mpi_refinement::WorkUnit_RamaPerturber, protocols::mpi_refinement::WorkUnit_KicCloser, protocols::mpi_refinement::WorkUnit_Relax, protocols::mpi_refinement::WorkUnit_NormalMode, protocols::mpi_refinement::WorkUnit_FragInsert, protocols::mpi_refinement::WorkUnit_MD, protocols::mpi_refinement::WorkUnit_CombinePose, protocols::mpi_refinement::WorkUnit_LoopHash, protocols::mpi_refinement::WorkUnit_bbGauss, protocols::mpi_refinement::WorkUnit_Sampler, protocols::loophash::WorkUnit_LoopHash, and protocols::relax::WorkUnit_BatchRelax.
References protocols::wum::TR().
|
inlineprotected |
Accessor to the serial data field.
References serial_data_.
Referenced by protocols::wum::DatabaseEntryWorkUnit::deserialize(), protocols::wum::WorkUnit_SilentStructStore::deserialize(), mem_footprint(), print(), raw_data_dump(), raw_data_load(), raw_data_size(), protocols::wum::DatabaseEntryWorkUnit::serialize(), and protocols::wum::WorkUnit_SilentStructStore::serialize().
|
inlineprotected |
Accessor to the serial data field.
References serial_data_.
|
inlineprotectedvirtual |
Make ready for sending.
Reimplemented in protocols::wum::WorkUnit_SilentStructStore, and protocols::wum::DatabaseEntryWorkUnit.
|
inline |
References protocols::wum::WorkUnitBase::WU_Header::extra_data_1_, and header.
|
inline |
References protocols::wum::WorkUnitBase::WU_Header::extra_data_2_, and header.
|
inline |
References protocols::wum::WorkUnitBase::WU_Header::extra_data_3_, and header.
| void protocols::wum::WorkUnitBase::set_options | ( | const std::string & | text | ) |
Accesor to the "options" text field.
References protocols::wum::WorkUnitBase::WU_Header::BUFFER_SIZE, header, and protocols::wum::WorkUnitBase::WU_Header::options_.
Referenced by protocols::mpi_refinement::WorkUnit_KicCloser::WorkUnit_KicCloser(), protocols::mpi_refinement::WorkUnit_MD::WorkUnit_MD(), and WorkUnitBase().
|
protected |
Set the unixtime of the start of the execution of this WorkUnit.
References header, and protocols::wum::WorkUnitBase::WU_Header::unixtime_start_.
|
protected |
Set the unixtime of the stop of the execution of this WorkUnit.
References header, and protocols::wum::WorkUnitBase::WU_Header::unixtime_stop_.
| void protocols::wum::WorkUnitBase::set_wu_type | ( | const std::string & | text | ) |
Accessor to header structure, sets the WorkUnit Type.
References protocols::wum::WorkUnitBase::WU_Header::BUFFER_SIZE, header, and protocols::wum::WorkUnitBase::WU_Header::wu_type_.
Referenced by WorkUnitBase().
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Contains blacklist of nodes. This data is NOT sent, and is only used on the sending side to determine where not to send a workunit.
Referenced by add_blacklist(), clear_blacklist(), and in_blacklist().
|
protected |
The header data.
Referenced by extra_data_1(), extra_data_2(), extra_data_3(), protocols::mpi_refinement::WorkUnit_CombinePose::get_cartesian(), protocols::mpi_refinement::WorkUnit_bbGauss::get_centroid(), protocols::mpi_refinement::WorkUnit_MD::get_cstweight(), protocols::mpi_refinement::WorkUnit_Relax::get_cstweight(), protocols::loophash::WorkUnit_LoopHash::get_end(), protocols::mpi_refinement::WorkUnit_LoopHash::get_end(), protocols::mpi_refinement::WorkUnit_LoopHash::get_global(), protocols::mpi_refinement::WorkUnit_bbGauss::get_kT(), protocols::mpi_refinement::WorkUnit_RamaPerturber::get_kT(), protocols::mpi_refinement::WorkUnit_NormalMode::get_maxscale(), protocols::mpi_refinement::WorkUnit_NormalMode::get_nmodes(), protocols::mpi_refinement::WorkUnit_NormalMode::get_nmtype(), protocols::mpi_refinement::WorkUnit_Relax::get_nrepeat(), protocols::mpi_refinement::WorkUnit_FragInsert::get_nsteps(), protocols::mpi_refinement::WorkUnit_KicCloser::get_nsteps(), protocols::mpi_refinement::WorkUnit_RamaPerturber::get_nsteps(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::get_nsteps(), protocols::mpi_refinement::WorkUnit_bbGauss::get_nstruct(), protocols::mpi_refinement::WorkUnit_CombinePose::get_nstruct(), protocols::mpi_refinement::WorkUnit_MD::get_nstruct(), get_options(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::get_reconstruct(), protocols::mpi_refinement::WorkUnit_MD::get_relaxtype(), protocols::mpi_refinement::WorkUnit_NormalMode::get_relaxtype(), protocols::mpi_refinement::WorkUnit_Relax::get_relaxtype(), protocols::mpi_refinement::WorkUnit_FragInsert::get_res1(), protocols::mpi_refinement::WorkUnit_KicCloser::get_res1(), protocols::mpi_refinement::WorkUnit_RamaPerturber::get_res1(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::get_res1(), protocols::mpi_refinement::WorkUnit_FragInsert::get_res2(), protocols::mpi_refinement::WorkUnit_KicCloser::get_res2(), protocols::mpi_refinement::WorkUnit_RamaPerturber::get_res2(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::get_res2(), get_run_time(), protocols::mpi_refinement::WorkUnit_MD::get_scoretype(), protocols::mpi_refinement::WorkUnit_FragInsert::get_scoretype(), protocols::mpi_refinement::WorkUnit_Relax::get_scoretype(), protocols::mpi_refinement::WorkUnit_KicCloser::get_scoretype(), protocols::mpi_refinement::WorkUnit_bbGauss::get_segdef(), protocols::loophash::WorkUnit_LoopHash::get_ssid(), protocols::mpi_refinement::WorkUnit_LoopHash::get_ssid(), protocols::loophash::WorkUnit_LoopHash::get_start(), protocols::mpi_refinement::WorkUnit_LoopHash::get_start(), get_wu_type(), id(), print(), raw_data_dump(), raw_data_load(), protocols::wum::WorkUnit_Wait::run(), protocols::mpi_refinement::WorkUnit_CombinePose::set_cartesian(), protocols::mpi_refinement::WorkUnit_bbGauss::set_centroid(), protocols::mpi_refinement::WorkUnit_MD::set_cstweight(), protocols::mpi_refinement::WorkUnit_Relax::set_cstweight(), protocols::loophash::WorkUnit_LoopHash::set_end(), protocols::mpi_refinement::WorkUnit_LoopHash::set_end(), set_extra_data_1(), set_extra_data_2(), set_extra_data_3(), protocols::mpi_refinement::WorkUnit_LoopHash::set_global(), protocols::mpi_refinement::WorkUnit_bbGauss::set_kT(), protocols::mpi_refinement::WorkUnit_RamaPerturber::set_kT(), protocols::mpi_refinement::WorkUnit_NormalMode::set_maxscale(), protocols::mpi_refinement::WorkUnit_NormalMode::set_nmodes(), protocols::mpi_refinement::WorkUnit_NormalMode::set_nmtype(), protocols::mpi_refinement::WorkUnit_Relax::set_nrepeat(), protocols::mpi_refinement::WorkUnit_FragInsert::set_nsteps(), protocols::mpi_refinement::WorkUnit_KicCloser::set_nsteps(), protocols::mpi_refinement::WorkUnit_RamaPerturber::set_nsteps(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::set_nsteps(), protocols::mpi_refinement::WorkUnit_bbGauss::set_nstruct(), protocols::mpi_refinement::WorkUnit_CombinePose::set_nstruct(), protocols::mpi_refinement::WorkUnit_MD::set_nstruct(), set_options(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::set_reconstruct(), protocols::mpi_refinement::WorkUnit_MD::set_relaxtype(), protocols::mpi_refinement::WorkUnit_NormalMode::set_relaxtype(), protocols::mpi_refinement::WorkUnit_Relax::set_relaxtype(), protocols::mpi_refinement::WorkUnit_FragInsert::set_res1(), protocols::mpi_refinement::WorkUnit_KicCloser::set_res1(), protocols::mpi_refinement::WorkUnit_RamaPerturber::set_res1(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::set_res1(), protocols::mpi_refinement::WorkUnit_FragInsert::set_res2(), protocols::mpi_refinement::WorkUnit_KicCloser::set_res2(), protocols::mpi_refinement::WorkUnit_RamaPerturber::set_res2(), protocols::mpi_refinement::WorkUnit_PartialAbinitio::set_res2(), set_run_start(), set_run_stop(), protocols::mpi_refinement::WorkUnit_MD::set_scoretype(), protocols::mpi_refinement::WorkUnit_FragInsert::set_scoretype(), protocols::mpi_refinement::WorkUnit_Relax::set_scoretype(), protocols::mpi_refinement::WorkUnit_KicCloser::set_scoretype(), protocols::mpi_refinement::WorkUnit_bbGauss::set_segdef(), protocols::loophash::WorkUnit_LoopHash::set_ssid(), protocols::mpi_refinement::WorkUnit_LoopHash::set_ssid(), protocols::loophash::WorkUnit_LoopHash::set_start(), protocols::mpi_refinement::WorkUnit_LoopHash::set_start(), set_wu_type(), protocols::wum::WorkUnit_Wait::WorkUnit_Wait(), and WorkUnitBase().
|
protected |
Contains the serial number of whatever Rank/Node this WU was last receeived from.
Referenced by last_received_from(), and WorkUnitBase().
|
private |
Contains more data, such as decoys, silent structucts, .. whatever really. Must be serialized, i.e. in plain text form read for transmission.
Referenced by clear_serial_data(), and serial_data().
1.8.7