2008-05-28 17:29:58 +04:00
/*
* Copyright ( c ) 2004 - 2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation . All rights reserved .
* Copyright ( c ) 2004 - 2008 The University of Tennessee and The University
* of Tennessee Research Foundation . All rights
* reserved .
* Copyright ( c ) 2004 - 2005 High Performance Computing Center Stuttgart ,
* University of Stuttgart . All rights reserved .
* Copyright ( c ) 2004 - 2005 The Regents of the University of California .
* All rights reserved .
2009-01-11 05:30:00 +03:00
* Copyright ( c ) 2007 Cisco Systems , Inc . All rights reserved .
2009-01-30 21:50:10 +03:00
* Copyright ( c ) 2009 Sun Microsystems , Inc . All rights reserved .
2008-05-28 17:29:58 +04:00
* $ COPYRIGHT $
*
* Additional copyrights may follow
*
* $ HEADER $
*/
# include "orte_config.h"
# include "orte/constants.h"
# include "orte/types.h"
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# endif
2009-01-08 17:27:52 +03:00
# include <stdio.h>
2008-05-28 17:29:58 +04:00
# include "opal/mca/base/mca_base_param.h"
2009-08-11 06:51:27 +04:00
# include "opal/mca/paffinity/base/base.h"
2009-01-08 17:27:52 +03:00
# include "opal/util/output.h"
2009-09-18 23:48:42 +04:00
# include "opal/util/argv.h"
2008-05-28 17:29:58 +04:00
# include "orte/util/proc_info.h"
2009-09-22 19:41:03 +04:00
# include "orte/mca/errmgr/errmgr.h"
2008-05-28 17:29:58 +04:00
# include "orte/runtime/runtime.h"
# include "orte/runtime/orte_globals.h"
2009-09-22 06:16:40 +04:00
static bool passed_thru = false ;
2008-05-28 17:29:58 +04:00
int orte_register_params ( void )
{
2009-02-09 23:44:44 +03:00
int value , tmp ;
2009-09-18 23:48:42 +04:00
char * strval , * * params ;
uint16_t binding ;
2008-05-28 17:29:58 +04:00
2009-09-22 06:16:40 +04:00
/* only go thru this once - mpirun calls it twice, which causes
* any error messages to show up twice
*/
if ( passed_thru ) {
return ORTE_SUCCESS ;
}
passed_thru = true ;
2010-04-28 08:06:57 +04:00
# if !ORTE_DISABLE_FULL_SUPPORT
/* get a clean output channel too - need to do this here because
* we use it below , and orterun and some other tools call this
* function prior to calling orte_init
*/
{
opal_output_stream_t lds ;
OBJ_CONSTRUCT ( & lds , opal_output_stream_t ) ;
lds . lds_want_stdout = true ;
orte_clean_output = opal_output_open ( & lds ) ;
OBJ_DESTRUCT ( & lds ) ;
}
# endif /* !ORTE_DISABLE_FULL_SUPPORT */
2008-06-18 07:15:56 +04:00
mca_base_param_reg_int_name ( " orte " , " base_help_aggregate " ,
" If orte_base_help_aggregate is true, duplicate help messages will be aggregated rather than displayed individually. This can be helpful for parallel jobs that experience multiple identical failures; rather than print out the same help/failure message N times, display it once with a count of how many processes sent the same message. " ,
false , false ,
( int ) true , & value ) ;
orte_help_want_aggregate = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_string_name ( " orte " , " tmpdir_base " ,
" Base of the session directory tree " ,
2009-03-06 00:56:03 +03:00
false , false , NULL , & ( orte_process_info . tmpdir_base ) ) ;
2008-06-24 21:50:56 +04:00
mca_base_param_reg_string_name ( " orte " , " no_session_dirs " ,
" Prohibited locations for session directories (multiple locations separated by ',', default=NULL) " ,
false , false , NULL , & orte_prohibited_session_dirs ) ;
2010-03-02 18:18:33 +03:00
mca_base_param_reg_int_name ( " orte " , " create_session_dirs " ,
" Create session directories " ,
false , false , ( int ) true , & value ) ;
orte_create_session_dirs = OPAL_INT_TO_BOOL ( value ) ;
2010-04-02 18:19:38 +04:00
mca_base_param_reg_int_name ( " orte " , " execute_quiet " ,
" Do not output error and help messages " ,
false , false , ( int ) false , & value ) ;
orte_execute_quiet = OPAL_INT_TO_BOOL ( value ) ;
2008-06-18 07:15:56 +04:00
# if !ORTE_DISABLE_FULL_SUPPORT
2009-01-13 01:30:00 +03:00
mca_base_param_reg_int_name ( " orte " , " send_profile " ,
" Send profile info in launch message " ,
false , false ,
( int ) false , & value ) ;
orte_send_profile = OPAL_INT_TO_BOOL ( value ) ;
2008-05-28 17:29:58 +04:00
mca_base_param_reg_int_name ( " orte " , " debug " ,
" Top-level ORTE debug switch (default verbosity: 1) " ,
false , false , ( int ) false , & value ) ;
orte_debug_flag = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_int_name ( " orte " , " debug_verbose " ,
" Verbosity level for ORTE debug messages (default: 1) " ,
false , false , - 1 , & orte_debug_verbosity ) ;
mca_base_param_reg_int_name ( " orte " , " debug_daemons " ,
" Whether to debug the ORTE daemons or not " ,
false , false , ( int ) false , & value ) ;
orte_debug_daemons_flag = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_int_name ( " orte " , " debug_daemons_file " ,
" Whether want stdout/stderr of daemons to go to a file or not " ,
false , false , ( int ) false , & value ) ;
orte_debug_daemons_file_flag = OPAL_INT_TO_BOOL ( value ) ;
/* If --debug-daemons-file was specified, that also implies
- - debug - daemons */
if ( orte_debug_daemons_file_flag ) {
orte_debug_daemons_flag = true ;
}
2008-08-01 02:11:46 +04:00
2009-09-22 06:16:40 +04:00
mca_base_param_reg_int_name ( " orte " , " daemon_bootstrap " ,
" Bootstrap the connection to the HNP " ,
false , false , ( int ) false , & value ) ;
orte_daemon_bootstrap = OPAL_INT_TO_BOOL ( value ) ;
2008-08-14 22:59:01 +04:00
/* do we want session output left open? */
mca_base_param_reg_int_name ( " orte " , " leave_session_attached " ,
" Whether applications and/or daemons should leave their sessions "
" attached so that any output can be received - this allows X forwarding "
" without all the attendant debugging output " ,
false , false , ( int ) false , & value ) ;
orte_leave_session_attached = OPAL_INT_TO_BOOL ( value ) ;
2008-08-01 02:11:46 +04:00
/* See comment in orte/tools/orterun/debuggers.c about this MCA
param ( this param is internal ) */
mca_base_param_reg_int_name ( " orte " ,
" in_parallel_debugger " ,
" Whether the application is being debugged "
" in a parallel debugger (default: false) " ,
true , false , 0 , & value ) ;
orte_in_parallel_debugger = OPAL_INT_TO_BOOL ( value ) ;
2008-08-13 21:47:24 +04:00
mca_base_param_reg_int_name ( " orte " ,
" enable_debug_cospawn_while_running " ,
" Whether a debugger can attach to the job "
" while it is running and request it co-locate debugger daemons (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_enable_debug_cospawn_while_running = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_int_name ( " orte " ,
" debugger_check_rate " ,
" How often (in seconds) to check if a debugger "
" has attached to a running job and requested cospawn support (default: 2 sec) " ,
false , false , 2 , & orte_debugger_check_rate ) ;
2010-02-27 11:32:25 +03:00
mca_base_param_reg_int_name ( " orte " ,
" output_debugger_proctable " ,
" Whether or not to output the debugger proctable after launch (default: false) " ,
true , false , 0 , & value ) ;
orte_output_debugger_proctable = OPAL_INT_TO_BOOL ( value ) ;
2010-05-14 22:44:49 +04:00
mca_base_param_reg_string_name ( " orte " , " debugger_test_daemon " ,
" Name of the executable to be used to simulate a debugger colaunch (relative or absolute path) " ,
false , false , NULL , & orte_debugger_test_daemon ) ;
mca_base_param_reg_int_name ( " orte " ,
" debugger_test_attach " ,
" Test debugger colaunch after debugger attachment " ,
false , false , 0 , & value ) ;
orte_debugger_test_attach = OPAL_INT_TO_BOOL ( value ) ;
2008-05-28 17:29:58 +04:00
mca_base_param_reg_int_name ( " orte " , " do_not_launch " ,
" Perform all necessary operations to prepare to launch the application, but do not actually launch it " ,
false , false , ( int ) false , & value ) ;
orte_do_not_launch = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_int_name ( " orte " , " daemon_spin " ,
" Have any orteds spin until we can connect a debugger to them " ,
false , false , ( int ) false , & value ) ;
orted_spin_flag = OPAL_INT_TO_BOOL ( value ) ;
2008-05-29 17:38:27 +04:00
mca_base_param_reg_int_name ( " orte " , " daemon_fail " ,
" Have the specified orted fail after init for debugging purposes " ,
2008-06-03 01:46:34 +04:00
false , false , ORTE_VPID_INVALID , & orted_debug_failure ) ;
2008-05-29 17:38:27 +04:00
2008-06-03 01:46:34 +04:00
mca_base_param_reg_int_name ( " orte " , " daemon_fail_delay " ,
" Have the specified orted fail after specified number of seconds (default: 0 => no delay) " ,
false , false , 0 , & orted_debug_failure_delay ) ;
mca_base_param_reg_int_name ( " orte " , " startup_timeout " ,
" Milliseconds/daemon to wait for startup before declaring failed_to_start (default: 0 => do not check) " ,
false , false , 0 , & orte_startup_timeout ) ;
2008-05-28 17:29:58 +04:00
/* check for timing requests */
mca_base_param_reg_int_name ( " orte " , " timing " ,
" Request that critical timing loops be measured " ,
false , false , ( int ) false , & value ) ;
orte_timing = OPAL_INT_TO_BOOL ( value ) ;
2009-01-12 22:12:58 +03:00
mca_base_param_reg_int_name ( " orte " , " timing_details " ,
" Request that detailed timing data by reported " ,
false , false , ( int ) false , & value ) ;
orte_timing_details = OPAL_INT_TO_BOOL ( value ) ;
if ( orte_timing_details ) {
/* ensure the timing flag is set too */
orte_timing = true ;
}
2008-05-28 17:29:58 +04:00
2009-05-04 15:07:40 +04:00
if ( ORTE_PROC_IS_HNP ) {
2009-01-08 17:27:52 +03:00
char * tmp ;
mca_base_param_reg_string_name ( " orte " , " timing_file " ,
" Name of the file where timing data is to be written (relative or absolute path) " ,
false , false , NULL , & tmp ) ;
if ( orte_timing & & NULL = = tmp ) {
/* send the timing output to stdout */
orte_timing_output = stdout ;
} else if ( NULL ! = tmp ) {
/* make sure the timing flag is set */
orte_timing = true ;
/* send the output to the indicated file */
orte_timing_output = fopen ( tmp , " w " ) ;
if ( NULL = = orte_timing_output ) {
/* couldn't be opened */
opal_output ( 0 , " File %s could not be opened " , tmp ) ;
orte_timing_output = stderr ;
}
}
}
2008-05-28 17:29:58 +04:00
/* User-level debugger info string */
mca_base_param_reg_string_name ( " orte " , " base_user_debugger " ,
" Sequence of user-level debuggers to search for in orterun " ,
false , false , " totalview @mpirun@ -a @mpirun_args@ : ddt -n @np@ -start @executable@ @executable_argv@ @single_app@ : fxp @mpirun@ -a @mpirun_args@ " , NULL ) ;
mca_base_param_reg_int_name ( " orte " , " abort_timeout " ,
" Max time to wait [in secs] before aborting an ORTE operation (default: 1sec) " ,
false , false , 1 , & value ) ;
orte_max_timeout = 1000000.0 * value ; /* convert to usec */
mca_base_param_reg_int_name ( " orte " , " timeout_step " ,
2008-06-03 01:46:34 +04:00
" Time to wait [in usecs/proc] before aborting an ORTE operation (default: 1000 usec/proc) " ,
false , false , 1000 , & orte_timeout_usec_per_proc ) ;
2008-05-28 17:29:58 +04:00
/* default hostfile */
mca_base_param_reg_string_name ( " orte " , " default_hostfile " ,
" Name of the default hostfile (relative or absolute path) " ,
2008-12-15 20:37:21 +03:00
false , false , NULL , & orte_default_hostfile ) ;
2009-08-13 20:08:43 +04:00
/* rankfile */
tmp = mca_base_param_reg_string_name ( " orte " , " rankfile " ,
" Name of the rankfile to be used for mapping processes (relative or absolute path) " ,
false , false , NULL , NULL ) ;
2009-08-27 14:40:51 +04:00
mca_base_param_reg_syn_name ( tmp , " rmaps " , " rank_file_path " , false ) ;
2009-08-13 20:08:43 +04:00
mca_base_param_lookup_string ( tmp , & orte_rankfile ) ;
2008-05-28 17:29:58 +04:00
2010-02-24 11:50:03 +03:00
# ifdef __WINDOWS__
2010-02-23 22:42:51 +03:00
mca_base_param_reg_string_name ( " orte " , " ccp_headnode " ,
" Name of the cluster head node. (For Windows CCP only.) " ,
false , false ,
NULL , & orte_ccp_headnode ) ;
2010-02-24 11:50:03 +03:00
# endif
2008-05-28 17:29:58 +04:00
/* whether or not to keep FQDN hostnames */
mca_base_param_reg_int_name ( " orte " , " keep_fqdn_hostnames " ,
" Whether or not to keep FQDN hostnames [default: no] " ,
false , false , ( int ) false , & value ) ;
orte_keep_fqdn_hostnames = OPAL_INT_TO_BOOL ( value ) ;
2009-06-24 00:25:38 +04:00
/* whether or not to use regular expressions for launch */
mca_base_param_reg_int_name ( " orte " , " use_regexp " ,
" Whether or not to use regular expressions for launch [default: no] " ,
false , false , ( int ) false , & value ) ;
orte_use_regexp = OPAL_INT_TO_BOOL ( value ) ;
2009-01-31 01:47:30 +03:00
/* whether to tag output */
Roll in the revamped IOF subsystem. Per the devel mailing list email, this is a complete rewrite of the iof framework designed to simplify the code for maintainability, and to support features we had planned to do, but were too difficult to implement in the old code. Specifically, the new code:
1. completely and cleanly separates responsibilities between the HNP, orted, and tool components.
2. removes all wireup messaging during launch and shutdown.
3. maintains flow control for stdin to avoid large-scale consumption of memory by orteds when large input files are forwarded. This is done using an xon/xoff protocol.
4. enables specification of stdin recipients on the mpirun cmd line. Allowed options include rank, "all", or "none". Default is rank 0.
5. creates a new MPI_Info key "ompi_stdin_target" that supports the above options for child jobs. Default is "none".
6. adds a new tool "orte-iof" that can connect to a running mpirun and display the output. Cmd line options allow selection of any combination of stdout, stderr, and stddiag. Default is stdout.
7. adds a new mpirun and orte-iof cmd line option "tag-output" that will tag each line of output with process name and stream ident. For example, "[1,0]<stdout>this is output"
This is not intended for the 1.3 release as it is a major change requiring considerable soak time.
This commit was SVN r19767.
2008-10-18 04:00:49 +04:00
mca_base_param_reg_int_name ( " orte " , " tag_output " ,
" Tag all output with [job,rank] (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_tag_output = OPAL_INT_TO_BOOL ( value ) ;
2009-09-02 22:03:10 +04:00
/* if we requested xml output, be sure to tag the output as well */
if ( orte_xml_output ) {
orte_tag_output = true ;
}
2008-06-05 00:53:12 +04:00
mca_base_param_reg_int_name ( " orte " , " xml_output " ,
" Display all output in XML format (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_xml_output = OPAL_INT_TO_BOOL ( value ) ;
2009-09-02 22:03:10 +04:00
mca_base_param_reg_string_name ( " orte " , " xml_file " ,
" Provide all output in XML format to the specified file " ,
false , false , NULL , & strval ) ;
if ( NULL ! = strval ) {
if ( ORTE_PROC_IS_HNP & & NULL = = orte_xml_fp ) {
/* only the HNP opens this file! Make sure it only happens once */
orte_xml_fp = fopen ( strval , " w " ) ;
if ( NULL = = orte_xml_fp ) {
opal_output ( 0 , " Could not open specified xml output file: %s " , strval ) ;
return ORTE_ERROR ;
}
}
/* ensure we set the flags to tag output */
orte_xml_output = true ;
2009-01-20 19:58:31 +03:00
orte_tag_output = true ;
2009-09-02 22:03:10 +04:00
} else {
/* default to stdout */
orte_xml_fp = stdout ;
2009-01-20 19:58:31 +03:00
}
2009-09-02 22:03:10 +04:00
2009-01-31 01:47:30 +03:00
/* whether to timestamp output */
mca_base_param_reg_int_name ( " orte " , " timestamp_output " ,
" Timestamp all application process output (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_timestamp_output = OPAL_INT_TO_BOOL ( value ) ;
/* redirect output into files */
mca_base_param_reg_string_name ( " orte " , " output_filename " ,
" Redirect output from application processes into filename.rank [default: NULL] " ,
false , false , NULL , & orte_output_filename ) ;
2008-11-24 22:57:08 +03:00
mca_base_param_reg_int_name ( " orte " , " show_resolved_nodenames " ,
" Display any node names that are resolved to a different name (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_show_resolved_nodenames = OPAL_INT_TO_BOOL ( value ) ;
2008-06-24 21:50:56 +04:00
mca_base_param_reg_int_name ( " orte " , " hetero_apps " ,
" Indicates that multiple app_contexts are being provided that are a mix of 32/64 bit binaries (default: false) " ,
false , false , ( int ) false , & value ) ;
orte_hetero_apps = OPAL_INT_TO_BOOL ( value ) ;
Per the July technical meeting:
Standardize the handling of the orte launch agent option across PLMs. This has been a consistent complaint I have received - each PLM would register its own MCA param to get input on the launch agent for remote nodes (in fact, one or two didn't, but most did). This would then get handled in various and contradictory ways.
Some PLMs would accept only a one-word input. Others accepted multi-word args such as "valgrind orted", but then some would error by putting any prefix specified on the cmd line in front of the incorrect argument.
For example, while using the rsh launcher, if you specified "valgrind orted" as your launch agent and had "--prefix foo" on you cmd line, you would attempt to execute "ssh foo/valgrind orted" - which obviously wouldn't work.
This was all -very- confusing to users, who had to know which PLM was being used so they could even set the right mca param in the first place! And since we don't warn about non-recognized or non-used mca params, half of the time they would wind up not doing what they thought they were telling us to do.
To solve this problem, we did the following:
1. removed all mca params from the individual plms for the launch agent
2. added a new mca param "orte_launch_agent" for this purpose. To further simplify for users, this comes with a new cmd line option "--launch-agent" that can take a multi-word string argument. The value of the param defaults to "orted".
3. added a PLM base function that processes the orte_launch_agent value and adds the contents to a provided argv array. This can subsequently be harvested at-will to handle multi-word values
4. modified the PLMs to use this new function. All the PLMs except for the rsh PLM required very minor change - just called the function and moved on. The rsh PLM required much larger changes as - because of the rsh/ssh cmd line limitations - we had to correctly prepend any provided prefix to the correct argv entry.
5. added a new opal_argv_join_range function that allows the caller to "join" argv entries between two specified indices
Please let me know of any problems. I tried to make this as clean as possible, but cannot compile all PLMs to ensure all is correct.
This commit was SVN r19097.
2008-07-30 22:26:24 +04:00
/* allow specification of the launch agent */
mca_base_param_reg_string_name ( " orte " , " launch_agent " ,
" Command used to start processes on remote nodes (default: orted) " ,
false , false , " orted " , & orte_launch_agent ) ;
2008-08-04 18:25:19 +04:00
/* whether or not to require RM allocation */
mca_base_param_reg_int_name ( " orte " , " allocation_required " ,
" Whether or not an allocation by a resource manager is required [default: no] " ,
false , false , ( int ) false , & value ) ;
orte_allocation_required = OPAL_INT_TO_BOOL ( value ) ;
2009-01-30 21:50:10 +03:00
2009-01-31 01:47:30 +03:00
/* generate new terminal windows to display output from specified ranks */
mca_base_param_reg_string_name ( " orte " , " xterm " ,
" Create a new xterm window and display output from the specified ranks there [default: none] " ,
false , false , NULL , & orte_xterm ) ;
2009-01-30 21:50:10 +03:00
/* whether or not to forward SIGTSTP and SIGCONT signals */
mca_base_param_reg_int_name ( " orte " , " forward_job_control " ,
" Forward SIGTSTP (after converting to SIGSTOP) and SIGCONT signals to the application procs [default: no] " ,
false , false ,
( int ) false , & value ) ;
orte_forward_job_control = OPAL_INT_TO_BOOL ( value ) ;
2009-02-09 23:44:44 +03:00
/* local rsh/ssh launch agent */
tmp = mca_base_param_reg_string_name ( " orte " , " rsh_agent " ,
" The command used to launch executables on remote nodes (typically either \" ssh \" or \" rsh \" ) " ,
false , false , " ssh : rsh " , NULL ) ;
mca_base_param_reg_syn_name ( tmp , " pls " , " rsh_agent " , true ) ;
mca_base_param_reg_syn_name ( tmp , " plm " , " rsh_agent " , true ) ;
mca_base_param_lookup_string ( tmp , & orte_rsh_agent ) ;
2009-05-30 05:10:25 +04:00
tmp = mca_base_param_reg_int_name ( " orte " , " assume_same_shell " ,
" If set to 1, assume that the shell on the remote node is the same as the shell on the local node. Otherwise, probe for what the remote shell [default: 1] " ,
false , false , 1 , NULL ) ;
mca_base_param_reg_syn_name ( tmp , " plm " , " rsh_assume_same_shell " , true ) ;
mca_base_param_lookup_int ( tmp , & value ) ;
orte_assume_same_shell = OPAL_INT_TO_BOOL ( value ) ;
2009-02-09 23:44:44 +03:00
2009-06-03 03:52:02 +04:00
/* whether or not to report launch progress */
mca_base_param_reg_int_name ( " orte " , " report_launch_progress " ,
" Output a brief periodic report on launch progress [default: no] " ,
false , false ,
( int ) false , & value ) ;
orte_report_launch_progress = OPAL_INT_TO_BOOL ( value ) ;
if ( orte_report_launch_progress ) {
/* ensure the startup timeout is set to something reasonable */
if ( 0 = = orte_startup_timeout ) {
orte_startup_timeout = 2000 ; /* default to 2 seconds */
}
}
2009-08-11 06:51:27 +04:00
/* cluster hardware info */
mca_base_param_reg_int_name ( " orte " , " num_boards " ,
" Number of processor boards/node (1-256) [default: 1] " ,
false , false , 1 , & value ) ;
orte_default_num_boards = ( uint8_t ) value ;
2009-09-22 19:41:03 +04:00
2009-08-11 06:51:27 +04:00
mca_base_param_reg_int_name ( " orte " , " num_sockets " ,
2009-09-22 19:41:03 +04:00
" Number of sockets/board (1-256) " ,
false , false , 0 , & value ) ;
2009-08-11 06:51:27 +04:00
orte_default_num_sockets_per_board = ( uint8_t ) value ;
2009-09-22 19:41:03 +04:00
2009-08-11 06:51:27 +04:00
mca_base_param_reg_int_name ( " orte " , " num_cores " ,
2009-09-22 19:41:03 +04:00
" Number of cores/socket (1-256) " ,
false , false , 0 , & value ) ;
2009-08-11 06:51:27 +04:00
orte_default_num_cores_per_socket = ( uint8_t ) value ;
/* cpu allocation specification */
mca_base_param_reg_string_name ( " orte " , " cpu_set " ,
" Comma-separated list of ranges specifying logical cpus allocated to this job [default: none] " ,
false , false , NULL , & orte_default_cpu_set ) ;
/* binding specification - this will be overridden by any cmd line directive, and
* ignored unless opal_paffinity_alone is set
*/
2009-09-18 23:48:42 +04:00
mca_base_param_reg_string_name ( " orte " , " process_binding " ,
" Policy for binding processes [none | core | socket | board] (supported qualifier: if-avail) " ,
false , false , NULL , & strval ) ;
if ( NULL ! = strval ) {
if ( 0 = = strcasecmp ( strval , " none " ) ) {
/* no binding */
ORTE_SET_BINDING_POLICY ( ORTE_BIND_TO_NONE ) ;
} else {
binding = 0 ;
params = opal_argv_split ( strval , ' : ' ) ;
2009-09-19 21:43:21 +04:00
if ( 1 < opal_argv_count ( params ) ) {
2009-09-18 23:48:42 +04:00
if ( 0 ! = strcasecmp ( params [ 1 ] , " if-avail " ) ) {
/* unknown option */
opal_output ( 0 , " Unknown qualifier to orte_process_binding: %s " , strval ) ;
return ORTE_ERR_BAD_PARAM ;
}
binding = ORTE_BIND_IF_SUPPORTED ;
}
2009-09-19 21:43:21 +04:00
if ( 0 = = strcasecmp ( params [ 0 ] , " socket " ) ) {
2009-09-18 23:48:42 +04:00
ORTE_SET_BINDING_POLICY ( ORTE_BIND_TO_SOCKET | binding ) ;
2009-09-19 21:43:21 +04:00
} else if ( 0 = = strcasecmp ( params [ 0 ] , " board " ) ) {
2009-09-18 23:48:42 +04:00
ORTE_SET_BINDING_POLICY ( ORTE_BIND_TO_BOARD | binding ) ;
2009-09-19 21:43:21 +04:00
} else if ( 0 = = strcasecmp ( params [ 0 ] , " core " ) ) {
2009-09-18 23:48:42 +04:00
ORTE_SET_BINDING_POLICY ( ORTE_BIND_TO_CORE | binding ) ;
}
2009-08-11 06:51:27 +04:00
}
}
2009-08-26 06:01:49 +04:00
/* if nothing was set, but opal_paffinity_alone is set, then default
* to bind - to - core
*/
if ( opal_paffinity_alone ) {
ORTE_XSET_BINDING_POLICY ( ORTE_BIND_TO_CORE ) ;
}
2009-09-28 07:17:15 +04:00
/* whether or not to report bindings */
mca_base_param_reg_int_name ( " orte " , " report_bindings " ,
" Report bindings " ,
false , false ,
( int ) false , & value ) ;
orte_report_bindings = OPAL_INT_TO_BOOL ( value ) ;
2009-09-09 09:28:45 +04:00
/* tool communication controls */
mca_base_param_reg_string_name ( " orte " , " report_events " ,
" URI to which events are to be reported (default: NULL)] " ,
false , false , NULL , & orte_report_events_uri ) ;
if ( NULL ! = orte_report_events_uri ) {
orte_report_events = true ;
}
2010-01-14 20:59:42 +03:00
/* barrier control */
mca_base_param_reg_int_name ( " orte " , " do_not_barrier " ,
" Do not barrier in orte_init " ,
true , false ,
( int ) false , & value ) ;
orte_do_not_barrier = OPAL_INT_TO_BOOL ( value ) ;
2010-04-28 08:06:57 +04:00
mca_base_param_reg_int_name ( " orte " , " enable_recovery " ,
" Enable recovery from process failure [Default = disabled] " ,
false , false ,
( int ) false , & value ) ;
orte_enable_recovery = OPAL_INT_TO_BOOL ( value ) ;
mca_base_param_reg_int_name ( " orte " , " max_global_restarts " ,
" Max number of times to relocate a failed process to a new node " ,
false , false ,
- 1 , & orte_max_global_restarts ) ;
mca_base_param_reg_int_name ( " orte " , " max_local_restarts " ,
" Max number of times to locally restart a failed process before relocating it to a new node " ,
false , false ,
- 1 , & orte_max_local_restarts ) ;
if ( orte_enable_recovery ) {
if ( orte_max_global_restarts < = 0 & &
orte_max_local_restarts < = 0 ) {
if ( ORTE_PROC_IS_HNP ) {
opal_output ( orte_clean_output ,
" ------------------------------------------------------------ \n "
" Although the MCA param orte_enable_recovery was set to true, \n "
" values for the max number of restarts was not provided: \n \n "
" Max global restarts: %d \n "
" Max local restarts: %d \n \n "
" At least one of these must be a positive value. We are disabling \n "
" process recovery, but continuing execution. \n "
" ------------------------------------------------------------ " ,
orte_max_global_restarts , orte_max_local_restarts ) ;
}
orte_enable_recovery = false ;
}
} else if ( orte_max_global_restarts > 0 | |
orte_max_local_restarts > 0 ) {
if ( ORTE_PROC_IS_HNP ) {
opal_output ( orte_clean_output ,
" ------------------------------------------------------------------ \n "
" The MCA param errmgr_base_enable_recovery was not set to true, but \n "
" positive value(s) were provided for the number of restarts: \n \n "
" Max global restarts: %d \n "
" Max local restarts: %d \n \n "
" We are enabling process recovery and continuing execution. To avoid \n "
" this warning in the future, please set the errmgr_base_enable_recovery \n "
" param to non-zero. \n "
" ------------------------------------------------------------------ " ,
orte_max_global_restarts , orte_max_local_restarts ) ;
}
orte_enable_recovery = true ;
}
2010-05-12 22:11:58 +04:00
mca_base_param_reg_int_name ( " orte " , " report_child_jobs_separately " ,
" Return the exit status of the primary job only " ,
false , false ,
( int ) false , & value ) ;
orte_report_child_jobs_separately = OPAL_INT_TO_BOOL ( value ) ;
2010-04-28 08:06:57 +04:00
2010-05-12 22:11:58 +04:00
mca_base_param_reg_int_name ( " orte " , " child_time_to_exit " ,
" Max time a spawned child job is allowed to run after the primary job has terminated (seconds) " ,
false , false ,
INT_MAX , & value ) ;
orte_child_time_to_exit . tv_sec = value ;
orte_child_time_to_exit . tv_usec = 0 ;
2010-04-28 08:06:57 +04:00
2008-06-18 07:15:56 +04:00
# endif /* ORTE_DISABLE_FULL_SUPPORT */
2008-05-28 17:29:58 +04:00
return ORTE_SUCCESS ;
}