Skip to content

Commit cb473ee

Browse files
Merge pull request #3691 from ggouaillardet/topic/hostname_or_uname
configury: use 'uname -n' when 'hostname' is not available
2 parents b5b6b22 + 72c7329 commit cb473ee

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

config/opal_functions.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1414
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
1515
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
1616
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
17-
dnl Copyright (c) 2015-2016 Research Organization for Information Science
17+
dnl Copyright (c) 2015-2017 Research Organization for Information Science
1818
dnl and Technology (RIST). All rights reserved.
1919
dnl
2020
dnl $COPYRIGHT$
@@ -95,7 +95,7 @@ EOF
9595
#
9696

9797
OPAL_CONFIGURE_USER="`whoami`"
98-
OPAL_CONFIGURE_HOST="`hostname | head -n 1`"
98+
OPAL_CONFIGURE_HOST="`(hostname || uname -n) 2> /dev/null | sed 1q`"
9999
OPAL_CONFIGURE_DATE="`date`"
100100

101101
OPAL_LIBNL_SANITY_INIT
@@ -117,7 +117,7 @@ AC_DEFUN([OPAL_BASIC_SETUP],[
117117
#
118118

119119
OPAL_CONFIGURE_USER="`whoami`"
120-
OPAL_CONFIGURE_HOST="`hostname | head -n 1`"
120+
OPAL_CONFIGURE_HOST="`(hostname || uname -n) 2> /dev/null | sed 1q`"
121121
OPAL_CONFIGURE_DATE="`date`"
122122

123123
#

ompi/tools/mpisync/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# All rights reserved.
1616
# Copyright (c) 2014 Artem Polyakov <[email protected]>
1717
# Copyright (c) 2016 IBM Corporation. All rights reserved.
18+
# Copyright (c) 2017 Research Organization for Information Science
19+
# and Technology (RIST). All rights reserved.
1820
#
1921
# $COPYRIGHT$
2022
#
@@ -30,7 +32,7 @@ AM_CFLAGS = \
3032
-DOPAL_CONFIGURE_HOST="\"@OPAL_CONFIGURE_HOST@\"" \
3133
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
3234
-DOMPI_BUILD_USER="\"$$USER\"" \
33-
-DOMPI_BUILD_HOST="\"`hostname`\"" \
35+
-DOMPI_BUILD_HOST="\"`(hostname || uname -n) | sed 1q`\"" \
3436
-DOMPI_BUILD_DATE="\"`date`\"" \
3537
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
3638
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \

ompi/tools/ompi_info/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# Copyright (c) 2012 Los Alamos National Security, LLC.
1515
# All rights reserved.
1616
# Copyright (c) 2016 IBM Corporation. All rights reserved.
17+
# Copyright (c) 2017 Research Organization for Information Science
18+
# and Technology (RIST). All rights reserved.
1719
# $COPYRIGHT$
1820
#
1921
# Additional copyrights may follow
@@ -26,7 +28,7 @@ AM_CFLAGS = \
2628
-DOPAL_CONFIGURE_HOST="\"@OPAL_CONFIGURE_HOST@\"" \
2729
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
2830
-DOMPI_BUILD_USER="\"$$USER\"" \
29-
-DOMPI_BUILD_HOST="\"`hostname`\"" \
31+
-DOMPI_BUILD_HOST="\"`(hostname || uname -n) 2> /dev/null | sed 1q`\"" \
3032
-DOMPI_BUILD_DATE="\"`date`\"" \
3133
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
3234
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \

orte/tools/orte-info/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# All rights reserved.
1212
# Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
14+
# Copyright (c) 2017 Research Organization for Information Science
15+
# and Technology (RIST). All rights reserved.
1416
# $COPYRIGHT$
1517
#
1618
# Additional copyrights may follow
@@ -23,7 +25,7 @@ AM_CFLAGS = \
2325
-DOPAL_CONFIGURE_HOST="\"@OPAL_CONFIGURE_HOST@\"" \
2426
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
2527
-DOMPI_BUILD_USER="\"$$USER\"" \
26-
-DOMPI_BUILD_HOST="\"`hostname`\"" \
28+
-DOMPI_BUILD_HOST="\"`(hostname || uname -n) | sed 1q`\"" \
2729
-DOMPI_BUILD_DATE="\"`date`\"" \
2830
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
2931
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \

oshmem/tools/oshmem_info/Makefile.am

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#
22
# Copyright (c) 2014 Mellanox Technologies, Inc.
33
# All rights reserved.
4-
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
4+
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
55
# Copyright (c) 2016 IBM Corporation. All rights reserved.
6+
# Copyright (c) 2017 Research Organization for Information Science
7+
# and Technology (RIST). All rights reserved.
68
# $COPYRIGHT$
79
#
810
# Additional copyrights may follow
@@ -15,7 +17,7 @@ AM_CPPFLAGS = \
1517
-DOPAL_CONFIGURE_HOST="\"@OPAL_CONFIGURE_HOST@\"" \
1618
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
1719
-DOMPI_BUILD_USER="\"$$USER\"" \
18-
-DOMPI_BUILD_HOST="\"`hostname`\"" \
20+
-DOMPI_BUILD_HOST="\"`(hostname || uname -n) 2> /dev/null | sed 1q`\"" \
1921
-DOMPI_BUILD_DATE="\"`date`\"" \
2022
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
2123
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \

0 commit comments

Comments
 (0)