|
Rosetta 3.5
|
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 () | |
| virtual | ~WorkUnitBase () |
| 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_3 () |
| 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... | |
| 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... | |
| virtual 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_options (const std::string &text) |
| Accesor to the "options" text 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.
Definition at line 40 of file WorkUnitBase.hh.
| protocols::wum::WorkUnitBase::WorkUnitBase | ( | ) |
Definition at line 43 of file WorkUnitBase.cc.
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_.
Referenced by clone().
|
inlinevirtual |
Definition at line 49 of file WorkUnitBase.hh.
| void protocols::wum::WorkUnitBase::add_blacklist | ( | int | mpi_rank) |
| void protocols::wum::WorkUnitBase::clear_blacklist | ( | ) |
|
inlinevirtual |
Remove all data, make sure that the memory is also cleared, hence the cals to reserve.
Definition at line 56 of file WorkUnitBase.hh.
References serial_data_.
|
inlinevirtual |
Reimplemented in protocols::wum::WorkUnit_MoverWrapper, protocols::wum::WorkUnit_SilentStructStore, protocols::wum::WorkUnit_Wait, protocols::relax::WorkUnit_BatchRelax_and_PostRescore, protocols::relax::WorkUnit_BatchRelax, protocols::wum::DatabaseEntryWorkUnit, and protocols::loophash::WorkUnit_LoopHash.
Definition at line 51 of file WorkUnitBase.hh.
References WorkUnitBase().
|
inlineprotectedvirtual |
Make a unique number out of Processor Number and unix timestamp ?
Definition at line 93 of file WorkUnitBase.hh.
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.
Definition at line 90 of file WorkUnitBase.hh.
|
inline |
Accessor to the extra_data_1 and 3 field of the header.
Definition at line 73 of file WorkUnitBase.hh.
References protocols::wum::WorkUnitBase::WU_Header::extra_data_1_, and header.
|
inline |
Definition at line 74 of file WorkUnitBase.hh.
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.
Definition at line 197 of file WorkUnitBase.cc.
References header, and protocols::wum::WorkUnitBase::WU_Header::options_.
| core::Size protocols::wum::WorkUnitBase::get_run_time | ( | ) |
Returns the differrence between unix start and stop times.
Definition at line 210 of file WorkUnitBase.cc.
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.
Definition at line 181 of file WorkUnitBase.cc.
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.
Definition at line 69 of file WorkUnitBase.hh.
References header, and protocols::wum::WorkUnitBase::WU_Header::id_.
Finds in blacklist, true if is, false if it isn't.
Definition at line 69 of file WorkUnitBase.cc.
References blacklist_, and protocols::wum::mpi_rank().
|
inline |
Definition at line 172 of file WorkUnitBase.hh.
References last_received_from_.
|
inlinevirtual |
Return the memory usage of this WorkUnit.
Definition at line 144 of file WorkUnitBase.hh.
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.
Definition at line 104 of file WorkUnitBase.cc.
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::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_.
|
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.
Definition at line 148 of file WorkUnitBase.cc.
References header, raw_data_size(), serial_data(), core::io::serialization::size(), 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.
Definition at line 77 of file WorkUnitBase.cc.
References header, serial_data(), and protocols::wum::TR().
|
private |
Definition at line 141 of file WorkUnitBase.cc.
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::relax::WorkUnit_BatchRelax, and protocols::loophash::WorkUnit_LoopHash.
Definition at line 99 of file WorkUnitBase.cc.
References protocols::wum::TR().
|
inlineprotected |
Accessor to the serial data field.
Definition at line 98 of file WorkUnitBase.hh.
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.
Definition at line 101 of file WorkUnitBase.hh.
References serial_data_.
|
inlineprotectedvirtual |
Make ready for sending.
Reimplemented in protocols::wum::WorkUnit_SilentStructStore, and protocols::wum::DatabaseEntryWorkUnit.
Definition at line 87 of file WorkUnitBase.hh.
|
protected |
Accesor to the "options" text field.
Definition at line 187 of file WorkUnitBase.cc.
References header, and protocols::wum::WorkUnitBase::WU_Header::options_.
Referenced by WorkUnitBase().
|
protected |
Set the unixtime of the start of the execution of this WorkUnit.
Definition at line 202 of file WorkUnitBase.cc.
References header, and protocols::wum::WorkUnitBase::WU_Header::unixtime_start_.
|
protected |
Set the unixtime of the stop of the execution of this WorkUnit.
Definition at line 206 of file WorkUnitBase.cc.
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.
Definition at line 171 of file WorkUnitBase.cc.
References header, and protocols::wum::WorkUnitBase::WU_Header::wu_type_.
Referenced by WorkUnitBase().
|
friend |
Definition at line 42 of file WorkUnitBase.hh.
|
friend |
Definition at line 43 of file WorkUnitBase.hh.
|
friend |
Definition at line 44 of file WorkUnitBase.hh.
|
friend |
Definition at line 45 of file WorkUnitBase.hh.
|
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.
Definition at line 181 of file WorkUnitBase.hh.
Referenced by add_blacklist(), clear_blacklist(), and in_blacklist().
|
protected |
The header data.
Definition at line 175 of file WorkUnitBase.hh.
Referenced by extra_data_1(), extra_data_3(), protocols::loophash::WorkUnit_LoopHash::get_end(), get_options(), get_run_time(), protocols::loophash::WorkUnit_LoopHash::get_ssid(), protocols::loophash::WorkUnit_LoopHash::get_start(), get_wu_type(), id(), print(), raw_data_dump(), raw_data_load(), protocols::wum::WorkUnit_Wait::run(), protocols::loophash::WorkUnit_LoopHash::set_end(), set_options(), set_run_start(), set_run_stop(), protocols::loophash::WorkUnit_LoopHash::set_ssid(), protocols::loophash::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.
Definition at line 178 of file WorkUnitBase.hh.
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.
Definition at line 188 of file WorkUnitBase.hh.
Referenced by clear_serial_data(), and serial_data().
1.8.4