simboinc.C File Reference

#include "msg/msg.h"
#include "constants.h"
#include <assert.h>
#include "xbt/log.h"
#include "xbt.h"
#include "simboinc.h"
#include <stdlib.h>
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>
#include "server.h"
#include "client.h"
#include "client_boinc.h"
#include "hostmonitor.h"
#include "request_handler.h"
#include "request_handler_boinc.h"
#include "parse_sim.h"
#include "job.h"
#include "sim.h"
#include "hostinfo_sim.h"
#include "test.h"

Include dependency graph for simboinc.C:


Defines

#define ASSERT(expression)   assert(expression)

Functions

MSG_error_t runsim (const char *platform_file, const char *workload_file, const char *states_file, const char *sim_file)
int main (int argc, char *argv[])
int parse_states_file (const char *states_file)
 Parse the client_states.xml file.
int parse_workload_file (const char *workload_file)
int parse_sim_file (const char *sim_file)
bool is_primary_host (m_host_t host)
void add_cpu (m_host_t host)
void create_request_handler_obj ()
void set_primary_hosts_g (m_host_t *hosts, int numhosts)
void set_primary_hosts_map_g (m_host_t *hosts, int numhosts)
void create_cpus_host_data (m_host_t *hosts, int numhosts)
 intializes the primary hosts so that their data points to an array of CPU
void validate ()
void validate_cpus ()
 check that number of cpus of hosts in client_states.xml file matches number of cpus in platform.xml file
void init_tasks_output_g ()
void init_tasks_output_cpu_g (m_host_t *hosts, int numhosts)
void init_project_metrics_map_g ()
 XBT_LOG_NEW_DEFAULT_CATEGORY (simboinclog,"Messages specific for simboinc")
m_process_t create_client_on_host (m_host_t host, const char *processname)

Variables

HOSTMONITORhostmonitorobj_g
SIMsim_g
REQUEST_HANDLERrequesthandlerobj_g
SERVERserverobj_g
std::map< string, CLIENT_STATE * > client_states_g
 This is where the global state of all the clients is held.
FILE * tasks_output_g
std::map< string, FILE * > tasks_output_cpu_g
std::vector< m_host_t > primary_hosts_g
std::map< string, m_host_t > primary_hosts_map_g
std::map< string, std::map<
string, PROJECT_METRICS * > > 
project_metrics_map_g
 store metrics per project of each client here
int num_channels_used_g
std::map< string, JOB * > jobs_g

Define Documentation

#define ASSERT expression   )     assert(expression)
 


Function Documentation

void add_cpu m_host_t  host  ) 
 

m_process_t create_client_on_host m_host_t  host,
const char *  processname
 

void create_cpus_host_data m_host_t *  hosts,
int  numhosts
 

intializes the primary hosts so that their data points to an array of CPU

void create_request_handler_obj  ) 
 

void init_project_metrics_map_g  ) 
 

For each client, for each project, store a new PROJECT_METRICS in the map. Must be called after client_states and workload is intialized.

void init_tasks_output_cpu_g m_host_t *  hosts,
int  numhosts
 

void init_tasks_output_g  ) 
 

bool is_primary_host m_host_t  host  ) 
 

int main int  argc,
char *  argv[]
 

Where the simulation is run. Logging configuration is set here as well.

int parse_sim_file const char *  sim_file  ) 
 

int parse_states_file const char *  states_file  ) 
 

Parse the client_states.xml file.

int parse_workload_file const char *  workload_file  ) 
 

MSG_error_t runsim const char *  platform_file,
const char *  workload_file,
const char *  states_file,
const char *  sim_file
 

Test function

void set_primary_hosts_g m_host_t *  hosts,
int  numhosts
 

void set_primary_hosts_map_g m_host_t *  hosts,
int  numhosts
 

void validate  ) 
 

validates atate of the simulator

void validate_cpus  ) 
 

check that number of cpus of hosts in client_states.xml file matches number of cpus in platform.xml file

In particular, check that client_state n_cpus matches number of non-null entries in CPU array contained by each host.

XBT_LOG_NEW_DEFAULT_CATEGORY simboinclog  ,
"Messages specific for simboinc" 
 


Variable Documentation

std::map<string, CLIENT_STATE *> client_states_g
 

This is where the global state of all the clients is held.

HOSTMONITOR* hostmonitorobj_g
 

std::map<string, JOB *> jobs_g
 

int num_channels_used_g
 

std::vector<m_host_t> primary_hosts_g
 

std::map<string, m_host_t> primary_hosts_map_g
 

std::map<string, std::map<string, PROJECT_METRICS *> > project_metrics_map_g
 

store metrics per project of each client here

client_name -> project_name -> project_metrics

REQUEST_HANDLER* requesthandlerobj_g
 

SERVER* serverobj_g
 

SIM* sim_g
 

std::map<string, FILE *> tasks_output_cpu_g
 

FILE* tasks_output_g
 


Generated on Mon Mar 12 16:21:53 2007 for SimBOINC by  doxygen 1.4.6