10
10
* Copyright (c) 2004-2005 The Regents of the University of California.
11
11
* All rights reserved.
12
12
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
13
- * Copyright (c) 2010-2011 IBM Corporation. All rights reserved.
13
+ * Copyright (c) 2010-2016 IBM Corporation. All rights reserved.
14
14
* $COPYRIGHT$
15
15
*
16
16
* Additional copyrights may follow
26
26
27
27
#include "opal/util/argv.h"
28
28
#include "opal/util/output.h"
29
+ #include "opal/util/net.h"
29
30
30
31
#include "orte/mca/errmgr/errmgr.h"
31
32
#include "orte/runtime/orte_globals.h"
@@ -106,6 +107,7 @@ static int orte_ras_loadleveler_discover(opal_list_t* nodelist)
106
107
char * hostname ;
107
108
char * filename ;
108
109
char input [LL_FILE_MAX_LINE_LENGTH ];
110
+ char * ptr ;
109
111
110
112
/* Ignore anything that the user already specified -- we're
111
113
getting nodes only from LoadLeveler. */
@@ -125,6 +127,12 @@ static int orte_ras_loadleveler_discover(opal_list_t* nodelist)
125
127
/* Iterate through all the nodes and make an entry for each */
126
128
while (0 != ll_getline (fp , input )) {
127
129
hostname = strdup (input );
130
+ if ( !orte_keep_fqdn_hostnames && !opal_net_isaddr (hostname ) ) {
131
+ if (NULL != (ptr = strchr (hostname , '.' ))) {
132
+ * ptr = '\0' ;
133
+ }
134
+ }
135
+
128
136
OPAL_OUTPUT_VERBOSE ((1 , orte_ras_base_framework .framework_output ,
129
137
"%s ras:loadleveler:allocate:discover: got hostname %s" ,
130
138
ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ), hostname ));
0 commit comments