PPL Logo

arch/net/charmrun/charmrun.c File Reference

Go to the source code of this file.

Data Structures

struct  pathfixlist
struct  ppdef

Functions

double GetClock (void)
int probefile (char *path)
char * mylogin (void)
void ping_developers ()
pathfixlist pathfix_append (char *s1, char *s2, pathfixlist l)
char * pathfix (char *path, pathfixlist fixes)
char * pathextfix (char *path, pathfixlist fixes, char *ext)
int is_quote (char c)
void zap_newline (char *s)
char * substr (char *lo, char *hi)
int subeqs (char *lo, char *hi, char *str)
char * skipblanks (char *p)
char * skipstuff (char *p)
char * getenv_rsh ()
char * getenv_display ()
char * getenv_display_no_tamper ()
static ppdef pparam_find (char *lname) const
static ppdef pparam_cell (char *lname) const
void pparam_int (int *where, int defValue, const char *arg, const char *doc)
void pparam_flag (int *where, int defValue, const char *arg, const char *doc)
void pparam_real (double *where, double defValue, const char *arg, const char *doc)
void pparam_str (char **where, char *defValue, const char *arg, const char *doc)
static int pparam_setdef (ppdef def, char *value)
int pparam_set (char *lname, char *value)
char * pparam_getdef (ppdef def)
void pparam_printdocs ()
void pparam_delarg (int i)
int pparam_countargs (char **argv)
int pparam_parseopt ()
int pparam_parsecmd (char optchr, char **argv)
char ** dupargv (char **argv)
void arg_init (int argc, char **argv)

Variables

int mynodes_start
static double ftTimer
double start_timer
intrsh_pids = NULL
static ppdef ppdefs
static int pparam_pos
static char ** pparam_argv
static char pparam_optc = '-'
char pparam_error [100]
char ** arg_argv
int arg_argc
int arg_requested_pes
int arg_timeout
int arg_verbose
char * arg_nodelist
char * arg_nodegroup
char * arg_runscript
char * arg_charmrunip
char * arg_vmispecfile
int arg_debug
int arg_debug_no_pause
int arg_debug_no_xrdb
int arg_charmdebug
char * arg_debug_commands
int arg_local
int arg_batch_spawn
int arg_scalable_start
int arg_hierarchical_start
int arg_child_charmrun
int arg_help
int arg_ppn
int arg_usehostname
int arg_read_pes = 0
int arg_maxrsh
char * arg_shell
int arg_in_xterm
char * arg_debugger
char * arg_xterm
char * arg_display
int arg_ssh_display
char * arg_mylogin
int arg_mpiexec
int arg_no_va_rand
char * arg_nodeprog_a
char * arg_nodeprog_r
char * arg_currdir_a
char * arg_currdir_r
int arg_server
int arg_server_port = 0
char * arg_server_auth = NULL
int replay_single = 0
int arg_startpe
int arg_endpe
int arg_singlemaster
int arg_skipmaster


Function Documentation

double GetClock ( void   ) 

Definition at line 99 of file charmrun.c.

Referenced by arg_init(), CommunicationsClock(), CommunicationServer(), and KillOnAllSigs().

int probefile ( char *  path  ) 

Definition at line 114 of file charmrun.c.

Referenced by arg_init().

char* mylogin ( void   ) 

Definition at line 123 of file charmrun.c.

References p.

Referenced by arg_init(), and ping_developers().

void ping_developers (  ) 

Definition at line 165 of file charmrun.c.

References mylogin(), skt_build_addr(), skt_close(), and skt_lookup_ip().

Referenced by arg_init().

pathfixlist pathfix_append ( char *  s1,
char *  s2,
pathfixlist  l 
)

Definition at line 197 of file charmrun.c.

References malloc(), pathfixlist::next, pathfixlist::s1, and pathfixlist::s2.

Referenced by arg_init().

char* pathfix ( char *  path,
pathfixlist  fixes 
)

Definition at line 206 of file charmrun.c.

References pathfixlist::next, pathfixlist::s1, and pathfixlist::s2.

Referenced by arg_init(), and pathextfix().

char* pathextfix ( char *  path,
pathfixlist  fixes,
char *  ext 
)

Definition at line 229 of file charmrun.c.

References malloc(), and pathfix().

Referenced by arg_init().

int is_quote ( char  c  ) 

Definition at line 246 of file charmrun.c.

Referenced by substr().

void zap_newline ( char *  s  ) 

Definition at line 251 of file charmrun.c.

References p.

Referenced by arg_init().

char* substr ( char *  lo,
char *  hi 
)

Definition at line 262 of file charmrun.c.

References is_quote(), and malloc().

Referenced by arg_init().

int subeqs ( char *  lo,
char *  hi,
char *  str 
)

Definition at line 275 of file charmrun.c.

Referenced by arg_init().

char* skipblanks ( char *  p  ) 

Definition at line 284 of file charmrun.c.

Referenced by arg_init().

char* skipstuff ( char *  p  ) 

Definition at line 291 of file charmrun.c.

Referenced by arg_init().

char* getenv_rsh (  ) 

Definition at line 309 of file charmrun.c.

Referenced by arg_init().

char* getenv_display (  ) 

Definition at line 319 of file charmrun.c.

References p, skt_my_ip(), and skt_print_ip().

char* getenv_display_no_tamper (  ) 

Definition at line 334 of file charmrun.c.

References p.

Referenced by arg_init().

static ppdef pparam_find ( char *  lname  )  const [static]

Definition at line 377 of file charmrun.c.

References ppdef::lname, and ppdef::next.

Referenced by pparam_cell(), and pparam_parseopt().

static ppdef pparam_cell ( char *  lname  )  const [static]

void pparam_int ( int where,
int  defValue,
const char *  arg,
const char *  doc 
)

Definition at line 403 of file charmrun.c.

References ppdef::doc, ppdef::i, ppdef::lname, pparam_cell(), ppdef::type, and ppdef::where.

Referenced by arg_init().

void pparam_flag ( int where,
int  defValue,
const char *  arg,
const char *  doc 
)

Definition at line 413 of file charmrun.c.

References ppdef::doc, ppdef::f, ppdef::lname, pparam_cell(), ppdef::type, and ppdef::where.

Referenced by arg_init().

void pparam_real ( double where,
double  defValue,
const char *  arg,
const char *  doc 
)

Definition at line 423 of file charmrun.c.

References ppdef::doc, ppdef::lname, pparam_cell(), ppdef::r, ppdef::type, and ppdef::where.

void pparam_str ( char **  where,
char *  defValue,
const char *  arg,
const char *  doc 
)

Definition at line 432 of file charmrun.c.

References ppdef::doc, ppdef::lname, pparam_cell(), ppdef::s, ppdef::type, and ppdef::where.

Referenced by arg_init().

static int pparam_setdef ( ppdef  def,
char *  value 
) [static]

Definition at line 442 of file charmrun.c.

References p.

Referenced by pparam_parseopt(), and pparam_set().

int pparam_set ( char *  lname,
char *  value 
)

Definition at line 467 of file charmrun.c.

References pparam_cell(), and pparam_setdef().

char* pparam_getdef ( ppdef  def  ) 

Definition at line 474 of file charmrun.c.

Referenced by pparam_printdocs().

void pparam_printdocs (  ) 

Definition at line 488 of file charmrun.c.

References ppdef::doc, ppdef::lname, ppdef::next, pparam_getdef(), and pparam_optc.

Referenced by arg_init().

void pparam_delarg ( int  i  ) 

Definition at line 510 of file charmrun.c.

References pparam_argv.

Referenced by pparam_parseopt().

int pparam_countargs ( char **  argv  ) 

Definition at line 518 of file charmrun.c.

Referenced by arg_init().

int pparam_parseopt (  ) 

int pparam_parsecmd ( char  optchr,
char **  argv 
)

Definition at line 601 of file charmrun.c.

References pparam_argv, pparam_error, pparam_optc, and pparam_parseopt().

Referenced by arg_init().

char** dupargv ( char **  argv  ) 

Definition at line 620 of file charmrun.c.

References copy(), and malloc().

Referenced by arg_init().

void arg_init ( int  argc,
char **  argv 
)

Macro to switch on the case when charmrun stays up even if one of the processor crashes

This is the only place where charmrun talks back to anyone.

Gets the array of node numbers, IPs, and ports. This is used by the node-programs to talk to one another.

Handles an ACK after a crash. Once it has received all the pending acks, it sends the nodetab table to the crashed node.

should also send a message to all the other processors telling them that this guy has crashed

after the crashed processor has been recreated it connects to charmrun. That data must now be filled into the req_nClients array and the nodetab_table

return 1 if connection is openned succesfully with client

++ppn now is supported in both SMP and non SMP version in SMP, ++ppn specifies number of threads on each node; in non-SMP, ++ppn specifies number of processes on each node.

Relaunches a program on the crashed node.

write the startScript file to be sent

add an argument to the argv of the new process so that the restarting processor knows that it is a restarting processor

change the nodetable entry of the crashed processor to connect it to a new one

start the new processor

wait for the reply from the new process

Reconnects a crashed node. It waits for the I-tuple from the just relaunched program. It also: i) Broadcast the nodetabtable to every other node. ii) Announces the crash to every other node.

update the nodetab entry corresponding to this node, skip the restarted one

Sends a message announcing the crash to every other node. This message will be used to trigger fault tolerance methods.

Definition at line 728 of file charmrun.c.

References _Cmi_numnodes, _skt_invalid_ip, abort(), arg_argv, arg_charmrunip, arg_currdir_a, arg_currdir_r, arg_debug_commands, arg_debugger, arg_display, arg_mylogin, arg_nodegroup, arg_nodelist, arg_nodeprog_a, arg_nodeprog_r, arg_runscript, arg_server_auth, arg_shell, arg_vmispecfile, arg_xterm, taskStruct::argLength, CcsImplHeader::attr, CcsSecAttr::auth, c, CcsServer_fd(), CcsServer_new(), CcsServer_recvRequest(), CcsServer_sendReply(), check_stdio_header(), ChMessage_free(), ChMessage_recv(), ChMessageData_recv(), ChMessageHeader_new(), ChMessageHeader_recv(), ChMessageInt(), ChMessageInt_new(), taskStruct::cwd, daemon_status2msg(), ChMessage::data, data, ChNodeinfo::dataport, dataport, dataskt, dest, done, dupargv(), e1, taskStruct::env, envCat(), errno, ppdef::f, free(), GetClock(), getenv_display_no_tamper(), getenv_rsh(), group(), ChMessage::header, ppdef::i, ChSingleNodeinfo::info, ChNodeinfo::IP, ChMessageHeader::len, ChMessage::len, ChInfiAddr::lid, taskStruct::magic, main(), malloc(), msg, mylogin(), ChSingleNodeinfo::nodeNo, ChNodeinfo::nPE, p, pathextfix(), pathfix(), pathfix_append(), CcsImplHeader::pe, taskStruct::pgm, ping_developers(), pparam_argv, pparam_countargs(), pparam_error, pparam_flag(), pparam_int(), pparam_parsecmd(), pparam_printdocs(), pparam_str(), printf(), probefile(), ChInfiAddr::psn, ChNodeinfo::qp, ChNodeinfo::qpList, ChInfiAddr::qpn, realloc(), reply_abortFn(), CcsImplHeader::replyFd, s, skipblanks(), skipstuff(), skt_accept(), skt_close(), skt_connect(), skt_init(), skt_innode_lookup_ip(), skt_innode_my_ip(), skt_ip_match(), skt_lookup_ip(), skt_print_ip(), skt_recvN(), skt_select1(), skt_sendN(), skt_sendV(), skt_server(), skt_set_abort(), skt_set_idle(), skt_tcp_no_nagle(), sleep(), speed(), status(), statusCode, subeqs(), substr(), stats::time(), ChMessageHeader::type, type, warned, write(), write_stdio_duplicate(), and zap_newline().


Variable Documentation

Definition at line 89 of file charmrun.c.

double ftTimer [static]

Definition at line 93 of file charmrun.c.

Definition at line 95 of file charmrun.c.

int* rsh_pids = NULL

Definition at line 97 of file charmrun.c.

ppdef ppdefs [static]

Definition at line 370 of file charmrun.c.

int pparam_pos [static]

Definition at line 372 of file charmrun.c.

char** pparam_argv [static]

Definition at line 373 of file charmrun.c.

Referenced by arg_init(), pparam_delarg(), pparam_parsecmd(), and pparam_parseopt().

char pparam_optc = '-' [static]

Definition at line 374 of file charmrun.c.

Referenced by pparam_parsecmd(), and pparam_printdocs().

char pparam_error[100]

Definition at line 375 of file charmrun.c.

Referenced by arg_init(), pparam_parsecmd(), and pparam_parseopt().

char** arg_argv

Definition at line 662 of file charmrun.c.

Referenced by arg_init().

Definition at line 663 of file charmrun.c.

Definition at line 665 of file charmrun.c.

Definition at line 666 of file charmrun.c.

Definition at line 667 of file charmrun.c.

char* arg_nodelist

Definition at line 668 of file charmrun.c.

Referenced by arg_init().

Definition at line 669 of file charmrun.c.

Referenced by arg_init().

Definition at line 670 of file charmrun.c.

Referenced by arg_init().

Definition at line 671 of file charmrun.c.

Referenced by arg_init().

Definition at line 673 of file charmrun.c.

Referenced by arg_init().

Definition at line 676 of file charmrun.c.

Definition at line 677 of file charmrun.c.

Definition at line 678 of file charmrun.c.

Definition at line 679 of file charmrun.c.

Definition at line 680 of file charmrun.c.

Referenced by arg_init().

Definition at line 682 of file charmrun.c.

Definition at line 683 of file charmrun.c.

Definition at line 684 of file charmrun.c.

Definition at line 687 of file charmrun.c.

Definition at line 688 of file charmrun.c.

Definition at line 690 of file charmrun.c.

Definition at line 691 of file charmrun.c.

Definition at line 692 of file charmrun.c.

Definition at line 695 of file charmrun.c.

Definition at line 699 of file charmrun.c.

char* arg_shell

Definition at line 700 of file charmrun.c.

Referenced by arg_init().

Definition at line 701 of file charmrun.c.

char* arg_debugger

Definition at line 702 of file charmrun.c.

Referenced by arg_init().

char* arg_xterm

Definition at line 703 of file charmrun.c.

Referenced by arg_init().

char* arg_display

Definition at line 704 of file charmrun.c.

Referenced by arg_init().

Definition at line 705 of file charmrun.c.

char* arg_mylogin

Definition at line 706 of file charmrun.c.

Referenced by arg_init().

Definition at line 708 of file charmrun.c.

Definition at line 709 of file charmrun.c.

Definition at line 711 of file charmrun.c.

Referenced by arg_init().

Definition at line 712 of file charmrun.c.

Referenced by arg_init().

Definition at line 713 of file charmrun.c.

Referenced by arg_init().

Definition at line 714 of file charmrun.c.

Referenced by arg_init().

Definition at line 716 of file charmrun.c.

Definition at line 717 of file charmrun.c.

char* arg_server_auth = NULL

Definition at line 718 of file charmrun.c.

Referenced by arg_init().

Definition at line 719 of file charmrun.c.

Definition at line 722 of file charmrun.c.

Definition at line 723 of file charmrun.c.

Definition at line 724 of file charmrun.c.

Definition at line 725 of file charmrun.c.


Generated on Thu May 24 07:56:00 2012 for Charm++ by  doxygen 1.5.5