KMR
Public Member Functions | Public Attributes | List of all members
MPIDP Class Reference

A Tool to Run Tasks under MPI. More...

Public Member Functions

virtual void check_command_line ()
 Checks the command-line options. More...
 
virtual void collect_results (const struct kmr_kv_box kv[], const long n, const KMR_KVS *kvs, KMR_KVS *kvo)
 Collects result status in ir[] on rank#0. More...
 
virtual void copy_conf (KMR_KVS *confkvs)
 Initializes the MPI-DP object by copying run conditions stored as the key-value pairs. More...
 
virtual vector< string > make_argv_for_task (int index, int retry)
 Makes argument-list (argv) from a task list entry, by substituting variables in parameters. More...
 
virtual void put_conf (KMR_KVS *confkvs)
 Puts the run conditions into the KVS, which will be copied to all processes. More...
 
virtual void put_task_list (KMR_KVS *kvs)
 Puts task entries of TABLE_LIST into KVS, after substituting variables in parameters and packing argv in a single string. More...
 
virtual void read_jobs_list ()
 Opens and reads jobs-list file. More...
 
virtual void start_task (struct kmr_kv_box kv, const KMR_KVS *kvs, KMR_KVS *kvo)
 Starts an application using argv in value data. More...
 
virtual void write_report (ofstream &logging)
 Writes jobs and workers report in log. More...
 

Public Attributes

vector< string > _appargv
 
int _argc
 
char ** _argv
 
char * _host_names
 
string _jobs_list_file
 
ofstream _logging
 
KMR_mr
 
int _ntry_limit
 
int _out_file_position
 
string _parameters
 
RankLog_rank_logs
 
vector< string > _table_list
 
int _table_numof_fields
 
TaskLog_task_logs
 
string _title
 
int _worker_life
 

Detailed Description

A Tool to Run Tasks under MPI.

MPI-DP runs tasks which are almost independent with master-slave scheduling. It reads a "jobs-list" table, starts MPI processes, and then calls an application entry point. _ARGC and _ARGV are copies of ones passed to main. _APPARGV is the unhandled part of argv which is passed to the application as argv. _TABLE_NUMOF_FIELDS on rank0 holds the number of fields in the jobs-list table.

Definition at line 113 of file kmrdp.cpp.

Member Function Documentation

void MPIDP::check_command_line ( )
virtual

Checks the command-line options.

Definition at line 453 of file kmrdp.cpp.

void MPIDP::read_jobs_list ( )
virtual

Opens and reads jobs-list file.

Definition at line 592 of file kmrdp.cpp.

void MPIDP::put_task_list ( KMR_KVS kvs)
virtual

Puts task entries of TABLE_LIST into KVS, after substituting variables in parameters and packing argv in a single string.

Definition at line 665 of file kmrdp.cpp.

vector< string > MPIDP::make_argv_for_task ( int  index,
int  retry 
)
virtual

Makes argument-list (argv) from a task list entry, by substituting variables in parameters.

The first argument is used for the output file name (or a string "-" if an output file position is not specified), and it should be removed when passing to the application. Non-zero RETRY is meaningless. IT COPIES THE RESULT.

Definition at line 702 of file kmrdp.cpp.

void MPIDP::put_conf ( KMR_KVS kvs)
virtual

Puts the run conditions into the KVS, which will be copied to all processes.

It runs only on rank#0. (There is nothing to be copied, currently).

Definition at line 559 of file kmrdp.cpp.

void MPIDP::copy_conf ( KMR_KVS confkvs)
virtual

Initializes the MPI-DP object by copying run conditions stored as the key-value pairs.

Copying on rank#0 is totally redundant, as overwriting fields by the same contents. (There is nothing to be copied, currently).

Definition at line 580 of file kmrdp.cpp.

void MPIDP::start_task ( struct kmr_kv_box  kv,
const KMR_KVS kvs,
KMR_KVS kvo 
)
virtual

Starts an application using argv in value data.

Note that the passed argv has an extra entry indicating the output file name in the first, and it is dropped.

Definition at line 798 of file kmrdp.cpp.

void MPIDP::collect_results ( const struct kmr_kv_box  kv[],
const long  n,
const KMR_KVS kvs,
KMR_KVS kvo 
)
virtual

Collects result status in ir[] on rank#0.

Definition at line 874 of file kmrdp.cpp.

void MPIDP::write_report ( ofstream &  logging)
virtual

Writes jobs and workers report in log.

Definition at line 916 of file kmrdp.cpp.


The documentation for this class was generated from the following file: