class MWWorkerID

This class keeps an identification of the worker application useful for the driver class

Public Fields

enum MWworker_states currentState
The state of the worker.
double networkLatency
Variables regarding the nw bandwidth.
MWTask* runningtask
The task running on this worker. NULL if there isn't one.

Public Methods

int get_arch()
Get this worker's arch class
double get_bench_result()
int get_exec_class( )
Gets the exec_class
char* get_executable( )
returns the executable name
int get_id1()
Return primary id of this worker
int get_id2()
Return secondard id of this worker
void get_machine_info()
Get the current machine information
int get_vid()
Return the virtual id
double getNetworkConnectivity( double &t )
int is_doomed()
returns TRUE if mark_for_removal was called previously
char* machine_name()
Returns a pointer to the machine's name
void mark_for_removal()
Mark this worker so that when the task completes it will exit
MWWorkerID()
Default constructor
virtual void printself( int level = 40 )
Print out a description of this worker
void set_arch( int a )
Set this worker's arch class
void set_bench_result( double bres )
void set_exec_class( int num )
Sets the exec_class
void set_executable( char *exec )
Sets the executable
void set_id1( int i )
Set primary id
void set_id2( int i )
Set secondary id
void set_machine_name( char * )
Set the machine's name
void setState( MWworker_states st )
Set the state of the worker
double timeval_to_double( struct timeval t )
A helper function
virtual ~MWWorkerID()
Default destructor

Public

A Special Printf
void lprintf( int vid, double now, char *fmt, ... )
The log printf - use it to print ONE log event
static char* ulv_filename
The name of the ulv log file
static FILE* lfp
The log file fp.
Checkpointing Call
void ckpt_stats( double *up, double *working, double *susp, double *cpu, double *norm, double* s_bench, int* n_bench )
Return the relevant stats info for this worker.
Private Data...
char mach_name[64]
The machine name of the worker
int id1
A "primary" identifier of this machine. (Was pvmd_tid)
int id2
A "secondary" identifier of this machine. (Was user_tid)
int virtual_id
A "virtual" number for this worker
int arch
This worker's arch class
int exec_class
This is the exec_class
char* executable_name
This is the executable_name
int doomed
TRUE if marked for removal, FALSE otherwise
double bench_result
The results of the benchmarking process.
enum MWworker_states state
The state of this worker.
Time information
double start_time
The time that this worker started.
double total_time
The total time that this worker ran for.
double last_event
The time of the last 'event'.
double total_suspended
The time spent in the suspended state
double total_working
The time spent working
double cpu_while_working
The cpu usage while working
double benchmarked_cpu_working_time
The benchmarked (weighted) cpu working time
double normalized_cpu_working_time
The benchmarked (normalized) cpu working time
double sum_benchmark
The sum of the benchmark values for that vid
int num_benchmark
The number of the benchmark values for that vid
Statistics Collection Calls
bool isIdle()
Returns true if this worker is idle.
bool isSusp()
Returns true if this worker is suspended.
void started()
This should be called when the master becomes aware of the existence of this worker
void benchmark()
Called when the worker is doing the benchmarking task
void benchmarkOver()
Called when the worker has done the benchmarking task
void gottask( int tasknum )
Called when this worker gets a task.
void completedtask( double wall_time = 0.0, double cpu_time = 0.0 )
Called when this worker just finished the task it was working on.
void suspended()
Called when the worker becomes suspended
void resumed()
Called when the worker resumes.
void ended()
Send flowers...this is called when the worker dies.
Virtual Id Helpers
void set_vid( int i )
Set virtual id
static int* vids
vids[i] is 1 if virtual id i is taken, 0 if not.
int get_next_vid()
Returns the lowest available virtual id; also sets it as used.
void release_vid( int vid )
Returns a virtual id to the pool
Worker Information
char Arch[64]
char OpSys[64]
double CondorLoadAvg
double LoadAvg
int Memory
int Cpus
int VirtualMemory
int Disk
int KFlops
int Mips
double get_total_time()
double get_last_event()
double get_total_suspended()
double get_total_working()

Documentation

This class keeps an identification of the worker application useful for the driver class. It also keeps statistical information that is useful to the stats class. This information will be used at the end of a run.
MWWorkerID()
Default constructor

virtual ~MWWorkerID()
Default destructor

int get_id1()
Return primary id of this worker

int get_id2()
Return secondard id of this worker

int get_vid()
Return the virtual id. This is an int starting at zero and increasing by one with each worker. When a worker dies, this number can be reused by a worker that joins us.

void set_id1( int i )
Set primary id

void set_id2( int i )
Set secondary id

void set_machine_name( char * )
Set the machine's name

void get_machine_info()
Get the current machine information

char* machine_name()
Returns a pointer to the machine's name

void set_arch( int a )
Set this worker's arch class

int get_arch()
Get this worker's arch class

void set_exec_class( int num )
Sets the exec_class

int get_exec_class( )
Gets the exec_class

void set_executable( char *exec )
Sets the executable

char* get_executable( )
returns the executable name

void mark_for_removal()
Mark this worker so that when the task completes it will exit

int is_doomed()
returns TRUE if mark_for_removal was called previously

void set_bench_result( double bres )

double get_bench_result()

double getNetworkConnectivity( double &t )

MWTask* runningtask
The task running on this worker. NULL if there isn't one.

enum MWworker_states currentState
The state of the worker.

void setState( MWworker_states st )
Set the state of the worker

virtual void printself( int level = 40 )
Print out a description of this worker
Parameters:
level - The debug level to use

Statistics Collection Calls
These methods are called when events happen to workers.

bool isIdle()
Returns true if this worker is idle.

bool isSusp()
Returns true if this worker is suspended.

void started()
This should be called when the master becomes aware of the existence of this worker

void benchmark()
Called when the worker is doing the benchmarking task

void benchmarkOver()
Called when the worker has done the benchmarking task

void gottask( int tasknum )
Called when this worker gets a task.

void completedtask( double wall_time = 0.0, double cpu_time = 0.0 )
Called when this worker just finished the task it was working on.

void suspended()
Called when the worker becomes suspended

void resumed()
Called when the worker resumes.

void ended()
Send flowers...this is called when the worker dies.

Checkpointing Call
Yes, each instance of a MWWorkerID needs to be able to checkpoint itself. Why? It has to store statistics information on itself. It never has to read them in, though, because stats that we write out here wind up being read in by the stats class when we restart.

void ckpt_stats( double *up, double *working, double *susp, double *cpu, double *norm, double* s_bench, int* n_bench )
Return the relevant stats info for this worker.

Worker Information
This is now collected from condor_status. It's the work of one of JP's students...

Note that this Arch is different from arch. This one is what condor claims its arch is to the outside world.

char Arch[64]

char OpSys[64]

double CondorLoadAvg

double LoadAvg

int Memory

int Cpus

int VirtualMemory

int Disk

int KFlops

int Mips

double get_total_time()

double get_last_event()

double get_total_suspended()

double get_total_working()

Private Data...

char mach_name[64]
The machine name of the worker

int id1
A "primary" identifier of this machine. (Was pvmd_tid)

int id2
A "secondary" identifier of this machine. (Was user_tid)

int virtual_id
A "virtual" number for this worker. Assigned starting at 0 and working upwards by one. Also, when a worker dies, this number can get taken over by another worker

int arch
This worker's arch class

int exec_class
This is the exec_class

char* executable_name
This is the executable_name

int doomed
TRUE if marked for removal, FALSE otherwise

double bench_result
The results of the benchmarking process.

enum MWworker_states state
The state of this worker.

Time information
Note that all time information is really stored as a double. We use gettimeofday() internally, and convert the result to a double. That way, we don't have to mess around with the struct timeval...

double start_time
The time that this worker started.

double total_time
The total time that this worker ran for.

double last_event
The time of the last 'event'.

double total_suspended
The time spent in the suspended state

double total_working
The time spent working

double cpu_while_working
The cpu usage while working

double benchmarked_cpu_working_time
The benchmarked (weighted) cpu working time

double normalized_cpu_working_time
The benchmarked (normalized) cpu working time

double sum_benchmark
The sum of the benchmark values for that vid

int num_benchmark
The number of the benchmark values for that vid

double timeval_to_double( struct timeval t )
A helper function...struct timeval->double.

Virtual Id Helpers

void set_vid( int i )
Set virtual id

static int* vids
vids[i] is 1 if virtual id i is taken, 0 if not.

int get_next_vid()
Returns the lowest available virtual id; also sets it as used.

void release_vid( int vid )
Returns a virtual id to the pool

A Special Printf
Used to make output for John Bent's ulv program...

void lprintf( int vid, double now, char *fmt, ... )
The log printf - use it to print ONE log event. It will automagically add the "..." delimiter for you.

static char* ulv_filename
The name of the ulv log file

static FILE* lfp
The log file fp.

double networkLatency
Variables regarding the nw bandwidth.


This class has no child classes.

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