File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1111 * All rights reserved.
1212 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
1313 * Copyright (c) 2014 Intel, Inc. All rights reserved.
14+ * Copyright (c) 2016 IBM Corporation. All rights reserved.
1415 * $COPYRIGHT$
1516 *
1617 * Additional copyrights may follow
2728
2829#include "orte/util/show_help.h"
2930#include "opal/util/os_path.h"
31+ #include "opal/util/net.h"
3032
3133#include "orte/mca/errmgr/errmgr.h"
3234#include "orte/runtime/orte_globals.h"
@@ -127,6 +129,7 @@ static int discover(opal_list_t* nodelist, char *pbs_jobid)
127129 FILE * fp ;
128130 char * hostname , * cppn ;
129131 int ppn ;
132+ char * ptr ;
130133
131134 /* Ignore anything that the user already specified -- we're
132135 getting nodes only from TM. */
@@ -168,6 +171,11 @@ static int discover(opal_list_t* nodelist, char *pbs_jobid)
168171
169172 nodeid = 0 ;
170173 while (NULL != (hostname = tm_getline (fp ))) {
174+ if ( !orte_keep_fqdn_hostnames && !opal_net_isaddr (hostname ) ) {
175+ if (NULL != (ptr = strchr (hostname , '.' ))) {
176+ * ptr = '\0' ;
177+ }
178+ }
171179
172180 OPAL_OUTPUT_VERBOSE ((1 , orte_ras_base_framework .framework_output ,
173181 "%s ras:tm:allocate:discover: got hostname %s" ,
You can’t perform that action at this time.
0 commit comments