3131#include <lsf/lsbatch.h>
3232
3333#include "opal/util/argv.h"
34+ #include "opal/util/net.h"
3435#include "opal/mca/hwloc/hwloc.h"
3536
3637#include "orte/mca/rmaps/rmaps_types.h"
@@ -60,31 +61,15 @@ orte_ras_base_module_t orte_ras_lsf_module = {
6061 finalize
6162};
6263
63- static char * orte_getline (FILE * fp )
64- {
65- char * ret , * buff ;
66- char input [1024 ];
67-
68- ret = fgets (input , 1024 , fp );
69- if (NULL != ret ) {
70- input [strlen (input )- 1 ] = '\0' ; /* remove newline */
71- buff = strdup (input );
72- return buff ;
73- }
74-
75- return NULL ;
76- }
77-
7864
7965static int allocate (orte_job_t * jdata , opal_list_t * nodes )
8066{
8167 char * * nodelist ;
8268 orte_node_t * node ;
8369 int i , num_nodes ;
84- char * affinity_file , * hstname ;
85- bool found ;
70+ char * affinity_file ;
8671 struct stat buf ;
87- orte_app_context_t * app ;
72+ char * ptr ;
8873
8974 /* get the list of allocated nodes */
9075 if ((num_nodes = lsb_getalloc (& nodelist )) < 0 ) {
@@ -96,6 +81,12 @@ static int allocate(orte_job_t *jdata, opal_list_t *nodes)
9681
9782 /* step through the list */
9883 for (i = 0 ; i < num_nodes ; i ++ ) {
84+ if ( !orte_keep_fqdn_hostnames && !opal_net_isaddr (nodelist [i ]) ) {
85+ if (NULL != (ptr = strchr (nodelist [i ], '.' ))) {
86+ * ptr = '\0' ;
87+ }
88+ }
89+
9990 /* is this a repeat of the current node? */
10091 if (NULL != node && 0 == strcmp (nodelist [i ], node -> name )) {
10192 /* it is a repeat - just bump the slot count */
0 commit comments