Refs trac:976
Collect the base 'orted' command line into a base function since most of the PLS components were duplicating this code. Add AMCA parameter command line component to the base set. Add Aggregate MCA parameter support to the following PLS components: - gridengine - process - slurm - poe - tm Improve support for 'rsh' component. Did/could not support the following components: - bproc - proxy - xcpu - cnos - xgrid The above components had peculiar needs that made it non-trivial to add an option. The authors of these components need to help in supporting this new option. I was only able to test the SLURM and RSH components due to system availability. The others should work without problem. This commit was SVN r14284. The following Trac tickets were found above: Ticket 976 --> https://svn.open-mpi.org/trac/ompi/ticket/976
Этот коммит содержится в:
родитель
16d5fe9e8c
Коммит
cd5047a9bf
@ -24,6 +24,9 @@
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
|
||||
#include "orte/util/univ_info.h"
|
||||
#include "orte/mca/rml/rml.h"
|
||||
|
||||
#include "orte/mca/pls/base/pls_private.h"
|
||||
|
||||
|
||||
@ -77,3 +80,120 @@ void orte_pls_base_purge_mca_params(char ***env)
|
||||
free(var);
|
||||
}
|
||||
|
||||
int orte_pls_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
int *proc_name_index,
|
||||
int *node_name_index,
|
||||
char *jobid_string,
|
||||
orte_std_cntr_t num_procs)
|
||||
{
|
||||
char *param = NULL, *uri = NULL;
|
||||
int loc_id;
|
||||
char * amca_param_path = NULL;
|
||||
char * amca_param_prefix = NULL;
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(argc, argv);
|
||||
|
||||
/* Bootproxy */
|
||||
opal_argv_append(argc, argv, "--bootproxy");
|
||||
opal_argv_append(argc, argv, jobid_string);
|
||||
|
||||
/* Name */
|
||||
if( NULL != proc_name_index ) {
|
||||
opal_argv_append(argc, argv, "--name");
|
||||
*proc_name_index = *argc;
|
||||
opal_argv_append(argc, argv, "<template>");
|
||||
}
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(argc, argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long)(num_procs));
|
||||
opal_argv_append(argc, argv, param);
|
||||
free(param);
|
||||
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(argc, argv, "--vpid_start");
|
||||
opal_argv_append(argc, argv, "0");
|
||||
|
||||
/* Node Name */
|
||||
if(NULL != node_name_index) {
|
||||
opal_argv_append(argc, argv, "--nodename");
|
||||
*node_name_index = *argc;
|
||||
opal_argv_append(argc, argv, "<template>");
|
||||
}
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(argc, argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(argc, argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(argc, argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(argc, argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(argc, argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(argc, argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/*
|
||||
* Pass along the Aggregate MCA Parameter Sets
|
||||
*/
|
||||
/* Add the 'prefix' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_prefix");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_prefix);
|
||||
if( NULL != amca_param_prefix ) {
|
||||
/* Could also use the short version '-am'
|
||||
* but being verbose has some value
|
||||
*/
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_prefix");
|
||||
opal_argv_append(argc, argv, amca_param_prefix);
|
||||
}
|
||||
|
||||
/* Add the 'path' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_path");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_path);
|
||||
if( NULL != amca_param_path ) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_path");
|
||||
opal_argv_append(argc, argv, amca_param_path);
|
||||
}
|
||||
|
||||
/* Add the ORTED hint 'path' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_path_orted");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_path);
|
||||
if( NULL != amca_param_path ) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_path_orted");
|
||||
opal_argv_append(argc, argv, amca_param_path);
|
||||
}
|
||||
|
||||
if( NULL != amca_param_path ) {
|
||||
free(amca_param_path);
|
||||
amca_param_path = NULL;
|
||||
}
|
||||
if( NULL != amca_param_prefix ) {
|
||||
free(amca_param_prefix);
|
||||
amca_param_prefix = NULL;
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -108,6 +108,17 @@ typedef uint8_t orte_pls_cmd_flag_t;
|
||||
ORTE_DECLSPEC int orte_pls_base_mca_argv(int *argc, char ***argv);
|
||||
void orte_pls_base_purge_mca_params(char ***env);
|
||||
|
||||
/**
|
||||
* Construct basic ORTE Daemon command line arguments
|
||||
*/
|
||||
ORTE_DECLSPEC int orte_pls_base_orted_append_basic_args(
|
||||
int *argc,
|
||||
char ***argv,
|
||||
int *proc_name_index,
|
||||
int *node_name_index,
|
||||
char *jobid_string,
|
||||
orte_std_cntr_t num_procs);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
@ -203,7 +203,7 @@ int orte_pls_gridengine_launch_job(orte_jobid_t jobid)
|
||||
int orted_index;
|
||||
char *jobid_string;
|
||||
char *prefix_dir;
|
||||
char *uri, *param;
|
||||
char *param;
|
||||
char **argv;
|
||||
char **env;
|
||||
int argc;
|
||||
@ -296,59 +296,13 @@ int orte_pls_gridengine_launch_job(orte_jobid_t jobid)
|
||||
opal_argv_append(&argc, &argv, mca_pls_gridengine_component.orted);
|
||||
opal_argv_append(&argc, &argv, "--no-daemonize");
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(&argc, &argv);
|
||||
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
opal_argv_append(&argc, &argv, jobid_string);
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
proc_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long)(vpid + num_nodes));
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--vpid_start");
|
||||
opal_argv_append(&argc, &argv, "0");
|
||||
|
||||
opal_argv_append(&argc, &argv, "--nodename");
|
||||
node_name_index2 = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
/* Add basic orted command line options */
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
&node_name_index2,
|
||||
jobid_string,
|
||||
(vpid + num_nodes)
|
||||
);
|
||||
|
||||
/* setup environment. The environment is common to all the daemons
|
||||
* so we only need to do this once
|
||||
|
@ -185,47 +185,18 @@ int pls_poe_launch_interactive_orted(orte_jobid_t jobid)
|
||||
opal_argv_append(&argc, &argv, "--debug-daemons");
|
||||
|
||||
opal_argv_append(&argc, &argv, "--no-daemonize");
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
|
||||
/* need integer value for command line parameter - NOT hex */
|
||||
asprintf(&tmp_string, "%lu", (unsigned long)jobid);
|
||||
opal_argv_append(&argc, &argv, tmp_string);
|
||||
|
||||
/* Add basic orted command line options */
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
&node_name_index2,
|
||||
tmp_string,
|
||||
num_nodes
|
||||
);
|
||||
free(tmp_string);
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
proc_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "");
|
||||
opal_argv_append(&argc, &argv, "--nodename");
|
||||
node_name_index2 = argc;
|
||||
opal_argv_append(&argc, &argv, "");
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(&tmp_string, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, tmp_string);
|
||||
free(tmp_string);
|
||||
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if(NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if(NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
|
||||
/*
|
||||
* Iterate through each of the nodes and spin
|
||||
|
@ -638,58 +638,13 @@ int orte_pls_process_launch(orte_jobid_t jobid)
|
||||
local_exec_index = argc;
|
||||
opal_argv_append(&argc, &argv, mca_pls_process_component.orted);
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(&argc, &argv);
|
||||
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
opal_argv_append(&argc, &argv, jobid_string);
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
proc_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long)(vpid + num_nodes));
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--vpid_start");
|
||||
opal_argv_append(&argc, &argv, "0");
|
||||
|
||||
opal_argv_append(&argc, &argv, "--nodename");
|
||||
node_name_index2 = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
/* Add basic orted command line options */
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
&node_name_index2,
|
||||
jobid_string,
|
||||
(vpid + num_nodes)
|
||||
);
|
||||
|
||||
if (mca_pls_process_component.debug) {
|
||||
param = opal_argv_join(argv, ' ');
|
||||
|
@ -631,105 +631,15 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
local_exec_index = argc;
|
||||
opal_argv_append(&argc, &argv, mca_pls_rsh_component.orted);
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(&argc, &argv);
|
||||
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
opal_argv_append(&argc, &argv, jobid_string);
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
proc_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long)(vpid + num_nodes));
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--vpid_start");
|
||||
opal_argv_append(&argc, &argv, "0");
|
||||
|
||||
opal_argv_append(&argc, &argv, "--nodename");
|
||||
node_name_index2 = argc;
|
||||
opal_argv_append(&argc, &argv, "<template>");
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* pass along the Aggregate MCA Parameter Sets */
|
||||
{
|
||||
int loc_id;
|
||||
char * amca_param_path = NULL;
|
||||
char * amca_param_prefix = NULL;
|
||||
|
||||
/* Add the 'prefix' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_prefix");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_prefix);
|
||||
if( NULL != amca_param_prefix ) {
|
||||
/* Could also use the short version '-am'
|
||||
* but being verbose has some value
|
||||
*/
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "mca_base_param_file_prefix");
|
||||
opal_argv_append(&argc, &argv, amca_param_prefix);
|
||||
}
|
||||
|
||||
/* Add the 'path' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_path");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_path);
|
||||
if( NULL != amca_param_path ) {
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "mca_base_param_file_path");
|
||||
opal_argv_append(&argc, &argv, amca_param_path);
|
||||
}
|
||||
|
||||
/* Add the ORTED hint 'path' param */
|
||||
loc_id = mca_base_param_find("mca", NULL, "base_param_file_path_orted");
|
||||
mca_base_param_lookup_string(loc_id, &amca_param_path);
|
||||
if( NULL != amca_param_path ) {
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "mca_base_param_file_path_orted");
|
||||
opal_argv_append(&argc, &argv, amca_param_path);
|
||||
}
|
||||
|
||||
if( NULL != amca_param_path ) {
|
||||
free(amca_param_path);
|
||||
amca_param_path = NULL;
|
||||
}
|
||||
if( NULL != amca_param_prefix ) {
|
||||
free(amca_param_prefix);
|
||||
amca_param_prefix = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the basic arguments to the orted command line
|
||||
*/
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
&node_name_index2,
|
||||
jobid_string,
|
||||
(vpid + num_nodes));
|
||||
|
||||
local_exec_index_end = argc;
|
||||
if (mca_pls_rsh_component.debug) {
|
||||
param = opal_argv_join(argv, ' ');
|
||||
|
@ -121,7 +121,7 @@ static int pls_slurm_launch_job(orte_jobid_t jobid)
|
||||
orte_vpid_t vpid;
|
||||
orte_vpid_t start_vpid;
|
||||
char *jobid_string = NULL;
|
||||
char *uri, *param;
|
||||
char *param;
|
||||
char **argv;
|
||||
int argc;
|
||||
int rc;
|
||||
@ -139,6 +139,7 @@ static int pls_slurm_launch_job(orte_jobid_t jobid)
|
||||
opal_list_t daemons;
|
||||
orte_pls_daemon_info_t *dmn;
|
||||
struct timeval joblaunchstart, launchstart, launchstop;
|
||||
int proc_name_index = 0;
|
||||
|
||||
if (mca_pls_slurm_component.timing) {
|
||||
if (0 != gettimeofday(&joblaunchstart, NULL)) {
|
||||
@ -260,12 +261,13 @@ static int pls_slurm_launch_job(orte_jobid_t jobid)
|
||||
opal_argv_append(&argc, &argv, mca_pls_slurm_component.orted);
|
||||
opal_argv_append(&argc, &argv, "--no-daemonize");
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(&argc, &argv);
|
||||
|
||||
/* proxy information */
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
opal_argv_append(&argc, &argv, jobid_string);
|
||||
/* Add basic orted command line options */
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
NULL,
|
||||
jobid_string,
|
||||
num_nodes
|
||||
);
|
||||
|
||||
/* force orted to use the slurm sds */
|
||||
opal_argv_append(&argc, &argv, "--ns-nds");
|
||||
@ -286,53 +288,10 @@ static int pls_slurm_launch_job(orte_jobid_t jobid)
|
||||
}
|
||||
free(name);
|
||||
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
opal_argv_append(&argc, &argv, name_string);
|
||||
free(argv[proc_name_index]);
|
||||
argv[proc_name_index] = strdup(name_string);
|
||||
free(name_string);
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long) num_nodes);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--vpid_start");
|
||||
asprintf(¶m, "%lu", (unsigned long) 0);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
if (mca_pls_slurm_component.debug) {
|
||||
param = opal_argv_join(argv, ' ');
|
||||
if (NULL != param) {
|
||||
|
@ -219,60 +219,13 @@ static int pls_tm_launch_job(orte_jobid_t jobid)
|
||||
|
||||
opal_argv_append(&argc, &argv, "--no-daemonize");
|
||||
|
||||
/* check for debug flags */
|
||||
orte_pls_base_mca_argv(&argc, &argv);
|
||||
|
||||
/* proxy information */
|
||||
opal_argv_append(&argc, &argv, "--bootproxy");
|
||||
opal_argv_append(&argc, &argv, jobid_string);
|
||||
opal_argv_append(&argc, &argv, "--name");
|
||||
proc_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "");
|
||||
|
||||
/* tell the daemon how many procs are in the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--num_procs");
|
||||
asprintf(¶m, "%lu", (unsigned long)(vpid + num_nodes));
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* tell the daemon the starting vpid of the daemon's job */
|
||||
opal_argv_append(&argc, &argv, "--vpid_start");
|
||||
opal_argv_append(&argc, &argv, "0");
|
||||
|
||||
opal_argv_append(&argc, &argv, "--nodename");
|
||||
node_name_index = argc;
|
||||
opal_argv_append(&argc, &argv, "");
|
||||
|
||||
/* pass along the universe name and location info */
|
||||
opal_argv_append(&argc, &argv, "--universe");
|
||||
asprintf(¶m, "%s@%s:%s", orte_universe_info.uid,
|
||||
orte_universe_info.host, orte_universe_info.name);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(param);
|
||||
|
||||
/* setup ns contact info */
|
||||
opal_argv_append(&argc, &argv, "--nsreplica");
|
||||
if (NULL != orte_process_info.ns_replica_uri) {
|
||||
uri = strdup(orte_process_info.ns_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
|
||||
/* setup gpr contact info */
|
||||
opal_argv_append(&argc, &argv, "--gprreplica");
|
||||
if (NULL != orte_process_info.gpr_replica_uri) {
|
||||
uri = strdup(orte_process_info.gpr_replica_uri);
|
||||
} else {
|
||||
uri = orte_rml.get_uri();
|
||||
}
|
||||
asprintf(¶m, "\"%s\"", uri);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
free(uri);
|
||||
free(param);
|
||||
/* Add basic orted command line options */
|
||||
orte_pls_base_orted_append_basic_args(&argc, &argv,
|
||||
&proc_name_index,
|
||||
&node_name_index,
|
||||
jobid_string,
|
||||
(vpid + num_nodes)
|
||||
);
|
||||
|
||||
if (mca_pls_tm_component.debug) {
|
||||
param = opal_argv_join(argv, ' ');
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user