Skip to content

Commit d6f0e75

Browse files
jjhurseygpaulsen
authored andcommitted
orte: Expand application of !orte_keep_fqdn_hostnames
* Related to c0038eded3544db94f68f3d5b58c89739834eb96 * See discussion on Open MPI community PR: - open-mpi#2015 * After broader discussion it was decided to expand the use of the !orte_keep_fqdn_hostnames MCA parameter to shorten all hostnames. This was exactly what the orte_use_mixed_hostnames MCA parameter was doing. - This also means that the LSF folks will get the behavior they want by default in Open MPI. * Upstream will see one commit that combines this commit and c0038eded3544db94f68f3d5b58c89739834eb96 (cherry picked from commit a33a2308ca80766fe6cf1f217b5a467687669603)
1 parent 710912e commit d6f0e75

File tree

8 files changed

+8
-21
lines changed

8 files changed

+8
-21
lines changed

orte/mca/rmaps/rank_file/rmaps_rank_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ static int orte_rmaps_rank_file_parse(const char *rankfile)
505505
opal_argv_free (argv);
506506

507507
// Strip off the FQDN if present
508-
if( orte_use_mixed_hostnames ) {
508+
if( !orte_keep_fqdn_hostnames ) {
509509
char *ptr;
510510
struct in_addr buf;
511511
/* if the nodename is an IP address, do not mess with it! */

orte/mca/rmaps/seq/rmaps_seq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static int orte_rmaps_seq_map(orte_job_t *jdata)
193193
}
194194

195195
// Strip off the FQDN if present
196-
if( orte_use_mixed_hostnames ) {
196+
if( !orte_keep_fqdn_hostnames ) {
197197
char *ptr;
198198
struct in_addr buf;
199199

@@ -307,14 +307,14 @@ static int orte_rmaps_seq_map(orte_job_t *jdata)
307307
}
308308

309309
// Strip off the FQDN if present
310-
if( orte_use_mixed_hostnames ) {
310+
if( !orte_keep_fqdn_hostnames ) {
311311
char *ptr;
312312
struct in_addr buf;
313313
/* if the nodename is an IP address, do not mess with it! */
314314
if (0 == inet_pton(AF_INET, hstname, &buf) &&
315315
0 == inet_pton(AF_INET6, hstname, &buf)) {
316316
if (NULL != (ptr = strchr(hstname, '.'))) {
317-
(*ptr) = '\0'; // JJH RETURN HERE TO DETERMINE WHY SEGV...
317+
(*ptr) = '\0';
318318
}
319319
}
320320
}

orte/runtime/orte_globals.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ char *orte_oob_static_ports = NULL;
8585
bool orte_standalone_operation = false;
8686
bool orte_fwd_mpirun_port = true;
8787

88-
bool orte_use_mixed_hostnames = false;
8988
bool orte_keep_fqdn_hostnames = false;
9089
bool orte_have_fqdn_allocation = false;
9190
bool orte_show_resolved_nodenames = false;

orte/runtime/orte_globals.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ ORTE_DECLSPEC extern bool orte_standalone_operation;
470470
ORTE_DECLSPEC extern bool orte_fwd_mpirun_port;
471471

472472
/* nodename flags */
473-
ORTE_DECLSPEC extern bool orte_use_mixed_hostnames;
474473
ORTE_DECLSPEC extern bool orte_keep_fqdn_hostnames;
475474
ORTE_DECLSPEC extern bool orte_have_fqdn_allocation;
476475
ORTE_DECLSPEC extern bool orte_show_resolved_nodenames;

orte/runtime/orte_mca_params.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,6 @@ int orte_register_params(void)
422422
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,
423423
&orte_keep_fqdn_hostnames);
424424

425-
/* whether or not to match short hostnames to FQDN hostnames */
426-
orte_use_mixed_hostnames = false;
427-
(void) mca_base_var_register ("orte", "orte", NULL, "use_mixed_hostnames",
428-
"Whether or not to use mixed hostnames (short == FQDN) [default: no]",
429-
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
430-
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,
431-
&orte_use_mixed_hostnames);
432-
433425
/* whether or not to retain aliases of hostnames */
434426
orte_retain_aliases = false;
435427
(void) mca_base_var_register ("orte", "orte", NULL, "retain_aliases",

orte/util/dash_host/dash_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ int orte_util_add_dash_host_nodes(opal_list_t *nodes,
217217

218218

219219
// Strip off the FQDN if present
220-
if( orte_use_mixed_hostnames ) {
220+
if( !orte_keep_fqdn_hostnames ) {
221221
char *ptr;
222222
struct in_addr buf;
223223
/* if the nodename is an IP address, do not mess with it! */

orte/util/hostfile/hostfile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
170170
opal_argv_free (argv);
171171

172172
// Strip off the FQDN if present
173-
if( orte_use_mixed_hostnames ) {
173+
if( !orte_keep_fqdn_hostnames ) {
174174
char *ptr;
175175
struct in_addr buf;
176176
/* if the nodename is an IP address, do not mess with it! */
@@ -290,7 +290,7 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
290290
opal_argv_free (argv);
291291

292292
// Strip off the FQDN if present
293-
if( orte_use_mixed_hostnames ) {
293+
if( !orte_keep_fqdn_hostnames ) {
294294
char *ptr;
295295
struct in_addr buf;
296296
/* if the nodename is an IP address, do not mess with it! */

orte/util/proc_info.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949

5050
/* provide a connection to a reqd variable */
5151
extern bool orte_keep_fqdn_hostnames;
52-
extern bool orte_use_mixed_hostnames;
5352

5453
#define ORTE_NAME_INVALID {ORTE_JOBID_INVALID, ORTE_VPID_INVALID}
5554

@@ -170,9 +169,7 @@ int orte_proc_info(void)
170169
/* add this to our list of aliases */
171170
opal_argv_append_nosize(&orte_process_info.aliases, hostname);
172171

173-
// These two options should be mutually exclusive
174-
// Cannot specify orte_use_mixed_hostnames=true and orte_keep_fqdn_hostnames=true
175-
if (!orte_keep_fqdn_hostnames || orte_use_mixed_hostnames) {
172+
if (!orte_keep_fqdn_hostnames) {
176173
/* if the nodename is an IP address, do not mess with it! */
177174
if (0 == inet_pton(AF_INET, hostname, &buf) &&
178175
0 == inet_pton(AF_INET6, hostname, &buf)) {

0 commit comments

Comments
 (0)