class MWTask

This the class that represents a unit of work

Public Fields

int number
The task's number
MWTaskType taskType
The task's type.

Public Methods

MWTask()
Default constructor
virtual ~MWTask()
Default Destructor

Public

Checkpointing Utilities
virtual void write_ckpt_info( FILE *fp )
Write the state of this task out to a FILE*
virtual void read_ckpt_info( FILE *fp )
Read the state of this task from a FILE* (overwriting any existing state
List management
MWWorkerID* worker
A pointer to the worker ID executing this task (NULL if none)
Packing and Unpacking
virtual void pack_work( void )
Pack the work portion of the task
virtual void unpack_work( void )
Unpack the work portion of the task
virtual void pack_results( void )
Pack the result portion of the task
virtual void unpack_results( void )
Unpack the result portion of the task
virtual void printself( int level = 60 )
Dump this task to the screen
Time and usage data
double working_time
The time (wall clock) that it takes to run the 'execute_task' function on the worker's side
double cpu_time
The amount of user+system time taken by this task, measured from start to finish of the 'execute_task' function

Documentation

This the class that represents a unit of work.

The task consits of two main components. The "work" to be done, and the "result" of the completed task. In order to create an application, the user must specify methods for packing and unpacking both the "work" and "result" portions of the task. The user is not responsible for initializing the send or for packing the task's number

When the task is being serviced by a worker, it contains a link to the ID of that instance of the worker.

MWTask()
Default constructor

virtual ~MWTask()
Default Destructor

int number
The task's number

MWTaskType taskType
The task's type.

Time and usage data

double working_time
The time (wall clock) that it takes to run the 'execute_task' function on the worker's side

double cpu_time
The amount of user+system time taken by this task, measured from start to finish of the 'execute_task' function

Packing and Unpacking
The user must pack and unpack the contents of the class so that it can be sent to the worker and back. These functions will make RMC->pack() and RMC->unpack() calls.

virtual void pack_work( void )
Pack the work portion of the task

virtual void unpack_work( void )
Unpack the work portion of the task

virtual void pack_results( void )
Pack the result portion of the task

virtual void unpack_results( void )
Unpack the result portion of the task

virtual void printself( int level = 60 )
Dump this task to the screen

Checkpointing Utilities
These two functions are used when checkpointing. Simply put, they write/read the state of the task to this file pointer provided.

virtual void write_ckpt_info( FILE *fp )
Write the state of this task out to a FILE*

virtual void read_ckpt_info( FILE *fp )
Read the state of this task from a FILE* (overwriting any existing state

List management
The task also has pointers that aid for managing the list of tasks to be done

MWWorkerID* worker
A pointer to the worker ID executing this task (NULL if none)


This class has no child classes.
Author:
Mike Yoder, modified by Jeff Linderoth and Jean-Pierre Goux
See Also:
MWDriver
MWWorker

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de