|
10 | 10 | * Copyright (c) 2004-2005 The Regents of the University of California.
|
11 | 11 | * All rights reserved.
|
12 | 12 | * Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved
|
| 13 | + * Copyright (c) 2016 IBM Corporation. All rights reserved. |
13 | 14 | * $COPYRIGHT$
|
14 | 15 | *
|
15 | 16 | * Additional copyrights may follow
|
|
28 | 29 | #include <string.h>
|
29 | 30 |
|
30 | 31 | #include "opal/util/output.h"
|
| 32 | +#include "opal/util/net.h" |
31 | 33 | #include "orte/util/show_help.h"
|
32 | 34 | #include "orte/mca/errmgr/errmgr.h"
|
33 | 35 | #include "orte/runtime/orte_globals.h"
|
@@ -62,7 +64,7 @@ static int orte_ras_gridengine_allocate(orte_job_t *jdata, opal_list_t *nodelist
|
62 | 64 | {
|
63 | 65 | char *pe_hostfile = getenv("PE_HOSTFILE");
|
64 | 66 | char *job_id = getenv("JOB_ID");
|
65 |
| - char buf[1024], *tok, *num, *queue, *arch, *ptr; |
| 67 | + char buf[1024], *tok, *num, *queue, *arch, *ptr, *tmp; |
66 | 68 | int rc;
|
67 | 69 | FILE *fp;
|
68 | 70 | orte_node_t *node;
|
@@ -96,6 +98,12 @@ static int orte_ras_gridengine_allocate(orte_job_t *jdata, opal_list_t *nodelist
|
96 | 98 | queue = strtok_r(NULL, " \n", &tok);
|
97 | 99 | arch = strtok_r(NULL, " \n", &tok);
|
98 | 100 |
|
| 101 | + if( !orte_keep_fqdn_hostnames && !opal_net_isaddr(ptr) ) { |
| 102 | + if (NULL != (tmp = strchr(ptr, '.'))) { |
| 103 | + *tmp = '\0'; |
| 104 | + } |
| 105 | + } |
| 106 | + |
99 | 107 | /* see if we already have this node */
|
100 | 108 | found = false;
|
101 | 109 | for (item = opal_list_get_first(nodelist);
|
|
0 commit comments