Skip to content

Commit

Permalink
Merge pull request #1180 from rhc54/cmr20/up
Browse files Browse the repository at this point in the history
Update v2.0 release branch
  • Loading branch information
rhc54 authored Jan 24, 2022
2 parents bad730a + 413c681 commit b5bc499
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 105 deletions.
57 changes: 55 additions & 2 deletions config/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2021 Nanook Consulting. All rights reserved.
# Copyright (c) 2021-2022 Nanook Consulting All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -33,4 +33,57 @@ EXTRA_DIST = \
find_common_syms \
getdate.sh \
from-savannah/upstream-config.guess \
from-savannah/upstream-config.sub
from-savannah/upstream-config.sub \
c_weak_symbols.m4 \
pkg.m4 \
prte_case_sensitive_fs_setup.m4 \
prte_check_alps.m4 \
prte_check_attributes.m4 \
prte_check_cflags.m4 \
prte_check_compiler_version.m4 \
prte_check_compiler_works.m4 \
prte_check_ident.m4 \
prte_check_libnl.m4 \
prte_check_lock.m4 \
prte_check_lsf.m4 \
prte_check_moab.m4 \
prte_check_offsetof.m4 \
prte_check_os_flavors.m4 \
prte_check_package.m4 \
prte_check_ps.m4 \
prte_check_pthread_pids.m4 \
prte_check_ptrace.m4 \
prte_check_sge.m4 \
prte_check_singularity.m4 \
prte_check_slurm.m4 \
prte_check_tm.m4 \
prte_check_vendor.m4 \
prte_check_version.m4 \
prte_check_visibility.m4 \
prte_check_withdir.m4 \
prte_config_asm.m4 \
prte_config_files.m4 \
prte_config_pthreads.m4 \
prte_config_subdir.m4 \
prte_config_subdir_args.m4 \
prte_config_threads.m4 \
prte_configure_options.m4 \
prte_ensure_contains_optflags.m4 \
prte_find_type.m4 \
prte_functions.m4 \
prte_get_version.m4 \
prte_load_platform.m4 \
prte_mca.m4 \
prte_save_version.m4 \
prte_search_libs.m4 \
prte_set_mca_prefix.m4 \
prte_setup_cc.m4 \
prte_setup_cli.m4 \
prte_setup_component_package.m4 \
prte_setup_hwloc.m4 \
prte_setup_libev.m4 \
prte_setup_libevent.m4 \
prte_setup_pmix.m4 \
prte_strip_optflags.m4 \
prte_summary.m4 \
prte_try_assemble.m4
66 changes: 0 additions & 66 deletions config/prte_check_icc.m4

This file was deleted.

14 changes: 8 additions & 6 deletions config/prte_check_lsf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2017-2021 IBM Corporation. All rights reserved.
dnl Copyright (c) 2017-2020 Intel, Inc. All rights reserved.
dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
dnl Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -79,10 +79,12 @@ AC_DEFUN([PRTE_CHECK_LSF],[
# on AIX it should be in libbsd
# on HP-UX it should be in libBSD
# on IRIX < 6 it should be in libsun (IRIX 6 and later it is in libc)
# on RHEL: libnsl, libnsl2 AND libnsl2-devel are required to link libnsl to get yp_all.
AS_IF([test "$prte_check_lsf_happy" = "yes"],
[PRTE_SEARCH_LIBS_COMPONENT([yp_all_nsl], [yp_all], [nsl bsd BSD sun],
[prte_check_lsf_happy="yes"],
[prte_check_lsf_happy="no"])])
[AC_MSG_WARN([[Could not find yp_all. Please see https://github.com/openpmix/prrte/wiki/Building-LSF-support for more details.]])
prte_check_lsf_happy="no"])])

# liblsf requires shm_open, shm_unlink, which are in librt
AS_IF([test "$prte_check_lsf_happy" = "yes"],
Expand Down Expand Up @@ -154,18 +156,18 @@ AC_DEFUN([PRTE_CHECK_LSF],[
# (3) Check to see if the -levent is from Libevent (check for a symbol it has)
AC_CHECK_LIB([event], [evthread_set_condition_callbacks],
[AC_MSG_CHECKING([for libevent conflict])
AC_MSG_RESULT([No. The correct libevent.so was linked.])
AC_MSG_RESULT([No conflict found. The correct libevent.so was linked.])
prte_check_lsf_event_conflict=no],
[# (4) The libevent.so is not from Libevent. Warn the user.
AC_MSG_CHECKING([for libevent conflict])
AC_MSG_RESULT([Yes. Detected a libevent.so that is not from Libevent.])
AC_MSG_RESULT([Conflict found. Detected a libevent.so that is not from Libevent.])
prte_check_lsf_event_conflict=yes])
],
[AC_MSG_CHECKING([for libevent conflict])
AC_MSG_RESULT([No. -levent is not being explicitly used.])
AC_MSG_RESULT([No conflict found. -levent is not being explicitly used.])
prte_check_lsf_event_conflict=na])],
[AC_MSG_CHECKING([for libevent conflict])
AC_MSG_RESULT([No. LSF checks passed.])
AC_MSG_RESULT([No conflict found. LSF checks passed.])
prte_check_lsf_event_conflict=na])

AS_IF([test "$prte_check_lsf_event_conflict" = "yes"],
Expand Down
13 changes: 9 additions & 4 deletions config/prte_check_ptrace.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2020 Intel, Inc. All rights reserved.
dnl Copyright (c) 2020 Cisco Systems, Inc. All rights reserved
dnl Copyright (c) 2022 Nanook Consulting. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand All @@ -14,18 +15,18 @@ dnl

AC_DEFUN([PRTE_CHECK_PTRACE],[

PRTE_VAR_SCOPE_PUSH(prte_have_ptrace_traceme prte_have_ptrace_detach prte_have_ptrace_header prte_have_ptrace prte_want_stop_on_exec prte_traceme_cmd prte_detach_cmd prte_ptrace_linux_sig)
PRTE_VAR_SCOPE_PUSH(prte_have_ptrace_traceme prte_have_ptrace_detach prte_have_ptrace_header prte_have_ptrace prte_want_stop_on_exec prte_traceme_cmd prte_detach_cmd prte_ptrace_linux_sig prte_ptrace_CFLAGS_save)

prte_have_ptrace_traceme=no
prte_have_ptrace_detach=no
prte_traceme_cmd=
prte_detach_cmd=

AC_CHECK_HEADER([sys/ptrace.h],
[prte_have_ptrace_header=1],
[prte_have_ptrace_header=1
# must manually define the header protection since check_header doesn't do it
AC_DEFINE_UNQUOTED([HAVE_SYS_PTRACE_H], [1], [Whether or not we have the ptrace header])],
[prte_have_ptrace_header=0])
# must manually define the header protection since check_header doesn't know it
AC_DEFINE_UNQUOTED([HAVE_SYS_PTRACE_H], [$prte_have_ptrace_header], [Whether or not we have the ptrace header])

AC_CHECK_FUNC([ptrace],
[prte_have_ptrace=yes],
Expand Down Expand Up @@ -84,6 +85,9 @@ AC_DEFUN([PRTE_CHECK_PTRACE],[

AC_MSG_CHECKING([Linux ptrace function signature])
AC_LANG_PUSH(C)
# must have -Werror set here
prte_ptrace_CFLAGS_save=$CFLAGS
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include "sys/ptrace.h"]],
Expand All @@ -97,6 +101,7 @@ AC_DEFUN([PRTE_CHECK_PTRACE],[
prte_ptrace_linux_sig=0
])
AC_LANG_POP(C)
CFLAGS=$prte_ptrace_CFLAGS_save

fi

Expand Down
4 changes: 2 additions & 2 deletions config/prte_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl
dnl Copyright (c) 2016-2020 Intel, Inc. All rights reserved.
dnl Copyright (c) 2021 Nanook Consulting All rights reserved.
dnl Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -284,7 +284,7 @@ if test -n "$with_proxy_bugreport"; then
PRTE_PROXY_BUGREPORT=$with_proxy_bugreport
else
AC_MSG_RESULT([no])
PRTE_PROXY_BUGREPORT=https://github.com/openpmix/prte/
PRTE_PROXY_BUGREPORT=https://github.com/openpmix/prrte/
fi
AC_DEFINE_UNQUOTED(PRTE_PROXY_BUGREPORT, "$PRTE_PROXY_BUGREPORT",
[Bugreport string to be returned by prte when in proxy mode])
Expand Down
11 changes: 5 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
# Copyright (c) 2018-2021 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# Copyright (c) 2021 Nanook Consulting All rights reserved.
# Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
# Copyright (c) 2021 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
Expand All @@ -49,7 +49,7 @@ m4_include([config/autogen_found_items.m4])

AC_INIT([prte],
[m4_normalize(esyscmd([config/prte_get_version.sh VERSION --tarball]))],
[https://github.com/openpmix/prte/], [prte])
[https://github.com/openpmix/prrte/], [prrte])

AC_PREREQ(2.69)
AC_CONFIG_AUX_DIR(config)
Expand Down Expand Up @@ -458,10 +458,6 @@ PRTE_C_WEAK_SYMBOLS
PRTE_C_MACRO_WEAK_SYMBOLS


if test "x$CC" = "xicc"; then
PRTE_CHECK_ICC_VARARGS
fi

# Check if we support the offsetof compiler directive
PRTE_CHECK_OFFSETOF

Expand Down Expand Up @@ -923,6 +919,9 @@ AC_PROG_LN_S
AC_PROG_GREP
AC_PROG_EGREP

# This check must come after PRTE_CONFIG_THREADS
AC_CHECK_FUNCS([pthread_setaffinity_np])

#
# We need as and lex
#
Expand Down
14 changes: 12 additions & 2 deletions src/hwloc/hwloc-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -31,10 +31,20 @@
# include <hwloc/shmem.h>
#endif

#if HWLOC_API_VERSION < 0x00010b00
#if HWLOC_API_VERSION < 0x10b00
#define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE
#define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET
#endif
#if HWLOC_API_VERSION < 0x10a00
static inline hwloc_obj_t hwloc_get_numanode_obj_by_os_index(hwloc_topology_t topology, unsigned os_index)
{
hwloc_obj_t obj = NULL;
while ((obj = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NUMANODE, obj)) != NULL)
if (obj->os_index == os_index)
return obj;
return NULL;
}
#endif

#include "src/class/prte_list.h"
#include "src/class/prte_value_array.h"
Expand Down
22 changes: 11 additions & 11 deletions src/mca/oob/tcp/oob_tcp_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -160,7 +160,7 @@ void prte_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
prte_oob_tcp_peer_t *peer;
prte_oob_tcp_addr_t *addr;
bool connected = false;
prte_if_t *interface;
prte_if_t *intf;
char *host;

remote_list = PRTE_NEW(prte_list_t);
Expand All @@ -177,21 +177,21 @@ void prte_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
/* Construct a list of remote prte_if_t from peer */
PRTE_LIST_FOREACH(addr, &peer->addrs, prte_oob_tcp_addr_t)
{
interface = PRTE_NEW(prte_if_t);
if (NULL == interface) {
intf = PRTE_NEW(prte_if_t);
if (NULL == intf) {
prte_output(0, "%s CANNOT CREATE SOCKET, OUT OF MEMORY",
PRTE_NAME_PRINT(PRTE_PROC_MY_NAME));
PRTE_ACTIVATE_JOB_STATE(NULL, PRTE_JOB_STATE_COMM_FAILED);
goto cleanup;
}
interface->af_family = addr->addr.ss_family;
memcpy(&interface->if_addr, &addr->addr, sizeof(struct sockaddr_storage));
interface->if_mask = addr->if_mask;
intf->af_family = addr->addr.ss_family;
memcpy(&intf->if_addr, &addr->addr, sizeof(struct sockaddr_storage));
intf->if_mask = addr->if_mask;
/* We do not pass along bandwidth information, setting as arbitrary non
* zero value
*/
interface->if_bandwidth = 1;
prte_list_append(remote_list, &(interface->super));
intf->if_bandwidth = 1;
prte_list_append(remote_list, &(intf->super));
}
local_if_count = prte_list_get_size(local_list);
remote_if_count = prte_list_get_size(remote_list);
Expand Down Expand Up @@ -251,7 +251,7 @@ void prte_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
for (i = 0; i < best_i; i++) {
ptr = ptr->prte_list_next;
}
interface = (prte_if_t *) ptr;
intf = (prte_if_t *) ptr;
prte_output_verbose(OOB_TCP_DEBUG_CONNECT, prte_oob_base_framework.framework_output,
"%s prte_tcp_peer_try_connect: "
"attempting to connect to proc %s on %s:%d - %d retries",
Expand Down Expand Up @@ -303,7 +303,7 @@ void prte_oob_tcp_peer_try_connect(int fd, short args, void *cbdata)
}

/* Bind the socket manually to selected address */
if (bind(peer->sd, (struct sockaddr *) &interface->if_addr, addrlen) < 0) {
if (bind(peer->sd, (struct sockaddr *) &intf->if_addr, addrlen) < 0) {
/* If we cannot bind to this address, set remaining entries
* for this address from the reachable table to no connection
* and try a new connection.
Expand Down
Loading

0 comments on commit b5bc499

Please sign in to comment.