1
1

Merge pull request #6608 from ggouaillardet/topic/pmix_refresh

PMIx refresh
Этот коммит содержится в:
Gilles Gouaillardet 2019-04-23 13:04:32 +09:00 коммит произвёл GitHub
родитель 9a9d106296 562809fca1
Коммит f1681ac6f2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
61 изменённых файлов: 1849 добавлений и 416 удалений

19
.gitignore поставляемый
Просмотреть файл

@ -382,6 +382,8 @@ opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h
opal/mca/pmix/pmix*/pmix/src/include/frameworks.h opal/mca/pmix/pmix*/pmix/src/include/frameworks.h
opal/mca/pmix/pmix*/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h opal/mca/pmix/pmix*/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h
opal/mca/pmix/pmix*/pmix/config/autogen_found_items.m4 opal/mca/pmix/pmix*/pmix/config/autogen_found_items.m4
opal/mca/pmix/pmix*/pmix/config/mca_library_paths.txt
opal/mca/pmix/pmix*/pmix/config/test-driver
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h.in opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h.in
opal/mca/pmix/pmix*/pmix/include/pmix_common.h opal/mca/pmix/pmix*/pmix/include/pmix_common.h
@ -400,6 +402,23 @@ opal/mca/pmix/pmix*/pmix/examples/jctrl
opal/mca/pmix/pmix*/pmix/examples/pub opal/mca/pmix/pmix*/pmix/examples/pub
opal/mca/pmix/pmix*/pmix/examples/server opal/mca/pmix/pmix*/pmix/examples/server
opal/mca/pmix/pmix*/pmix/examples/tool opal/mca/pmix/pmix*/pmix/examples/tool
opal/mca/pmix/pmix*/pmix/test/run_tests00.pl
opal/mca/pmix/pmix*/pmix/test/run_tests01.pl
opal/mca/pmix/pmix*/pmix/test/run_tests02.pl
opal/mca/pmix/pmix*/pmix/test/run_tests03.pl
opal/mca/pmix/pmix*/pmix/test/run_tests04.pl
opal/mca/pmix/pmix*/pmix/test/run_tests05.pl
opal/mca/pmix/pmix*/pmix/test/run_tests06.pl
opal/mca/pmix/pmix*/pmix/test/run_tests07.pl
opal/mca/pmix/pmix*/pmix/test/run_tests08.pl
opal/mca/pmix/pmix*/pmix/test/run_tests09.pl
opal/mca/pmix/pmix*/pmix/test/run_tests10.pl
opal/mca/pmix/pmix*/pmix/test/run_tests11.pl
opal/mca/pmix/pmix*/pmix/test/run_tests12.pl
opal/mca/pmix/pmix*/pmix/test/run_tests13.pl
opal/mca/pmix/pmix*/pmix/test/run_tests14.pl
opal/mca/pmix/pmix*/pmix/test/run_tests15.pl
opal/mca/pmix/ext4x/ext4x.c opal/mca/pmix/ext4x/ext4x.c
opal/mca/pmix/ext4x/ext4x.h opal/mca/pmix/ext4x/ext4x.h

Просмотреть файл

@ -47,6 +47,8 @@ Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights
reserved. reserved.
Copyright (c) 2013-2019 Intel, Inc. All rights reserved. Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved.
Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights
reserved.
$COPYRIGHT$ $COPYRIGHT$

Просмотреть файл

@ -12,6 +12,8 @@
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved. # Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights
# reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -25,6 +27,7 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = config contrib include src etc bindings SUBDIRS = config contrib include src etc bindings
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-dlopen
headers = headers =
sources = sources =

Просмотреть файл

@ -30,7 +30,7 @@ greek=a1
# command, or with the date (if "git describe" fails) in the form of # command, or with the date (if "git describe" fails) in the form of
# "date<date>". # "date<date>".
repo_rev=git2531c0c3 repo_rev=gitbde4a8a5
# If tarball_version is not empty, it is used as the version string in # If tarball_version is not empty, it is used as the version string in
# the tarball filename, regardless of all other versions listed in # the tarball filename, regardless of all other versions listed in
@ -44,7 +44,7 @@ tarball_version=
# The date when this release was created # The date when this release was created
date="Apr 09, 2019" date="Apr 23, 2019"
# The shared library version of each of PMIx's public libraries. # The shared library version of each of PMIx's public libraries.
# These versions are maintained in accordance with the "Library # These versions are maintained in accordance with the "Library

Просмотреть файл

@ -4,7 +4,7 @@
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013 Mellanox Technologies, Inc. # Copyright (c) 2013 Mellanox Technologies, Inc.
# All rights reserved. # All rights reserved.
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved. # Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science # Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved. # and Technology (RIST). All rights reserved.
# Copyright (c) 2015 IBM Corporation. All rights reserved. # Copyright (c) 2015 IBM Corporation. All rights reserved.
@ -37,6 +37,9 @@ my $m4;
# Sanity check file # Sanity check file
my $topdir_file = "include/pmix.h"; my $topdir_file = "include/pmix.h";
my $dnl_line = "dnl ---------------------------------------------------------------------------"; my $dnl_line = "dnl ---------------------------------------------------------------------------";
# The text file we'll write at the end that will contain
# all the mca component directory paths
my $mca_library_paths_file = "config/mca_library_paths.txt";
# Data structures to fill up with all the stuff we find # Data structures to fill up with all the stuff we find
my $mca_found; my $mca_found;
@ -137,6 +140,9 @@ sub mca_process_component {
push(@{$mca_found->{$framework}->{"components"}}, push(@{$mca_found->{$framework}->{"components"}},
$found_component); $found_component);
# save the directory for later to create the paths
# to all the component libraries
push(@subdirs, $cdir);
} }
############################################################################## ##############################################################################
@ -723,6 +729,15 @@ open(M4, ">$m4_output_file") ||
print M4 $m4; print M4 $m4;
close(M4); close(M4);
# Remove the old library path file and write the new one
verbose "==> Writing txt file with all the mca component paths\n";
unlink($mca_library_paths_file);
open(M4, ">$mca_library_paths_file") ||
my_die "Cannot open $mca_library_paths_file";
my $paths = join(":", @subdirs);
print M4 $paths;
close(M4);
# Run autoreconf # Run autoreconf
verbose "==> Running autoreconf\n"; verbose "==> Running autoreconf\n";
my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config"; my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config";

Просмотреть файл

@ -43,7 +43,8 @@ EXTRA_DIST = \
pmix_search_libs.m4 \ pmix_search_libs.m4 \
pmix_setup_cc.m4 \ pmix_setup_cc.m4 \
pmix_setup_libevent.m4 \ pmix_setup_libevent.m4 \
pmix_mca_priority_sort.pl pmix_mca_priority_sort.pl \
mca_library_paths.txt
maintainer-clean-local: maintainer-clean-local:

Просмотреть файл

@ -859,6 +859,32 @@ AC_DEFUN([PMIX_SETUP_CORE],[
AC_SUBST(pmixlibdir) AC_SUBST(pmixlibdir)
AC_SUBST(pmixincludedir) AC_SUBST(pmixincludedir)
############################################################################
# setup "make check"
############################################################################
PMIX_BUILT_TEST_PREFIX=$PMIX_top_builddir
AC_SUBST(PMIX_BUILT_TEST_PREFIX)
# expose the mca component library paths in the build system
pathfile=$PMIX_top_srcdir/config/mca_library_paths.txt
PMIX_COMPONENT_LIBRARY_PATHS=`cat $pathfile`
AC_SUBST(PMIX_COMPONENT_LIBRARY_PATHS)
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests00.pl], [chmod +x test/run_tests00.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests01.pl], [chmod +x test/run_tests01.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests02.pl], [chmod +x test/run_tests02.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests03.pl], [chmod +x test/run_tests03.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests04.pl], [chmod +x test/run_tests04.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests05.pl], [chmod +x test/run_tests05.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests06.pl], [chmod +x test/run_tests06.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests07.pl], [chmod +x test/run_tests07.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests08.pl], [chmod +x test/run_tests08.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests09.pl], [chmod +x test/run_tests09.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests10.pl], [chmod +x test/run_tests10.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests11.pl], [chmod +x test/run_tests11.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests12.pl], [chmod +x test/run_tests12.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests13.pl], [chmod +x test/run_tests13.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests14.pl], [chmod +x test/run_tests14.pl])
AC_CONFIG_FILES(pmix_config_prefix[test/run_tests15.pl], [chmod +x test/run_tests15.pl])
############################################################################ ############################################################################
# final output # final output
############################################################################ ############################################################################
@ -920,7 +946,7 @@ AC_DEFUN([PMIX_DEFINE_ARGS],[
AC_ARG_ENABLE([embedded-mode], AC_ARG_ENABLE([embedded-mode],
[AC_HELP_STRING([--enable-embedded-mode], [AC_HELP_STRING([--enable-embedded-mode],
[Using --enable-embedded-mode causes PMIx to skip a few configure checks and install nothing. It should only be used when building PMIx within the scope of a larger package.])]) [Using --enable-embedded-mode causes PMIx to skip a few configure checks and install nothing. It should only be used when building PMIx within the scope of a larger package.])])
AS_IF([test ! -z "$enable_embedded_mode" && test "$enable_embedded_mode" = "yes"], AS_IF([test "$enable_embedded_mode" = "yes"],
[pmix_mode=embedded [pmix_mode=embedded
pmix_install_primary_headers=no pmix_install_primary_headers=no
AC_MSG_RESULT([yes])], AC_MSG_RESULT([yes])],
@ -1207,6 +1233,24 @@ if test "$WANT_PYTHON_BINDINGS" = "1"; then
fi fi
fi fi
# see if they want to disable non-RTLD_GLOBAL dlopen
AC_MSG_CHECKING([if want to support dlopen of non-global namespaces])
AC_ARG_ENABLE([nonglobal-dlopen],
AC_HELP_STRING([--enable-nonglobal-dlopen],
[enable non-global dlopen (default: enabled)]))
if test "$enable_nonglobal_dlopen" == "no"; then
AC_MSG_RESULT([no])
pmix_need_libpmix=0
else
AC_MSG_RESULT([yes])
pmix_need_libpmix=1
fi
# if someone enables embedded mode but doesn't want to install the
# devel headers, then default nonglobal-dlopen to false
AS_IF([test -z "$enable_nonglobal_dlopen" && test "x$pmix_mode" = "xembedded" && test $WANT_INSTALL_HEADERS -eq 0 && test $pmix_need_libpmix -eq 1],
[pmix_need_libpmix=0])
])dnl ])dnl
# This must be a standalone routine so that it can be called both by # This must be a standalone routine so that it can be called both by
@ -1222,6 +1266,7 @@ AC_DEFUN([PMIX_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([WANT_PRIMARY_HEADERS], [test "x$pmix_install_primary_headers" = "xyes"]) AM_CONDITIONAL([WANT_PRIMARY_HEADERS], [test "x$pmix_install_primary_headers" = "xyes"])
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1) AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
AM_CONDITIONAL(WANT_PMI_BACKWARD, test "$WANT_PMI_BACKWARD" = 1) AM_CONDITIONAL(WANT_PMI_BACKWARD, test "$WANT_PMI_BACKWARD" = 1)
AM_CONDITIONAL(NEED_LIBPMIX, [test "$pmix_need_libpmix" = "1"])
]) ])
pmix_did_am_conditionals=yes pmix_did_am_conditionals=yes
])dnl ])dnl

Просмотреть файл

@ -11,7 +11,9 @@
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved # Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2015 Intel, Inc. All rights reserved. # Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights
# reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
@ -108,14 +110,6 @@ if test "$LIBEVENT" != ""; then
config_args="--with-libevent=$LIBEVENT $config_args" config_args="--with-libevent=$LIBEVENT $config_args"
fi fi
# if config_args isn't empty, then add that to the distcheck_flags
# (because we'll assumedly need those to run configure under "make
# distcheck").
if test "$config_args" != ""; then
echo "*** Adding to distcheck_flags: $config_args"
distcheck_flags="$distcheck_flags AM_DISTCHECK_CONFIGURE_FLAGS=\"$config_args\""
fi
export DISTCHECK_CONFIGURE_FLAGS=$config_args export DISTCHECK_CONFIGURE_FLAGS=$config_args
# #

Просмотреть файл

@ -121,6 +121,9 @@ typedef uint8_t pmix_cmd_t;
/* provide a "pretty-print" function for cmds */ /* provide a "pretty-print" function for cmds */
const char* pmix_command_string(pmix_cmd_t cmd); const char* pmix_command_string(pmix_cmd_t cmd);
/* provide a hook to init tool data */
PMIX_EXPORT extern pmix_status_t pmix_tool_init_info(void);
/* define a set of flags to direct collection /* define a set of flags to direct collection
* of data during operations */ * of data during operations */
typedef enum { typedef enum {

Просмотреть файл

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved. # University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2008-2019 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2018 Intel, Inc. All rights reserved. # Copyright (c) 2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
@ -60,3 +60,12 @@ all components *except* a and b", while "c,d" specifies the inclusive
behavior and means "use *only* components c and d." behavior and means "use *only* components c and d."
You cannot mix inclusive and exclusive behavior. You cannot mix inclusive and exclusive behavior.
#
[failed to add component dir]
The pmix_mca_base_component_path MCA variable was used to add paths to
search for PMIX components. At least one directory failed to add
properly:
%s
Check to make sure that this directory exists, is readable, etc.

Просмотреть файл

@ -10,12 +10,12 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2019 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights * Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2015 Research Organization for Information Science * Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved. * and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved. * Copyright (c) 2016-2019 Intel, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -43,6 +43,7 @@
#include "pmix_common.h" #include "pmix_common.h"
#include "src/class/pmix_hash_table.h" #include "src/class/pmix_hash_table.h"
#include "src/util/basename.h" #include "src/util/basename.h"
#include "src/util/show_help.h"
#if PMIX_HAVE_PDL_SUPPORT #if PMIX_HAVE_PDL_SUPPORT
@ -220,8 +221,13 @@ int pmix_mca_base_component_repository_add (const char *path)
dir = pmix_mca_base_system_default_path; dir = pmix_mca_base_system_default_path;
} }
if (0 != pmix_pdl_foreachfile(dir, process_repository_item, NULL)) { if (0 != pmix_pdl_foreachfile(dir, process_repository_item, NULL) &&
break; !(0 == strcmp(dir, pmix_mca_base_system_default_path) || 0 == strcmp(dir, pmix_mca_base_user_default_path))) {
// It is not an error if a directory fails to add (e.g.,
// if it doesn't exist). But we should warn about it as
// it is something related to "show_load_errors"
pmix_show_help("help-pmix-mca-base.txt",
"failed to add component dir", true, dir);
} }
} while (NULL != (dir = strtok_r (NULL, sep, &ctx))); } while (NULL != (dir = strtok_r (NULL, sep, &ctx)));

Просмотреть файл

@ -51,6 +51,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_bfrops_v12_la_SOURCES = $(component_sources) mca_bfrops_v12_la_SOURCES = $(component_sources)
mca_bfrops_v12_la_LDFLAGS = -module -avoid-version mca_bfrops_v12_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_bfrops_v12_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_bfrops_v12_la_SOURCES = $(lib_sources) libmca_bfrops_v12_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -51,6 +51,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_bfrops_v20_la_SOURCES = $(component_sources) mca_bfrops_v20_la_SOURCES = $(component_sources)
mca_bfrops_v20_la_LDFLAGS = -module -avoid-version mca_bfrops_v20_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_bfrops_v20_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_bfrops_v20_la_SOURCES = $(lib_sources) libmca_bfrops_v20_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_bfrops_v21_la_SOURCES = $(component_sources) mca_bfrops_v21_la_SOURCES = $(component_sources)
mca_bfrops_v21_la_LDFLAGS = -module -avoid-version mca_bfrops_v21_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_bfrops_v21_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_bfrops_v21_la_SOURCES = $(lib_sources) libmca_bfrops_v21_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_bfrops_v3_la_SOURCES = $(component_sources) mca_bfrops_v3_la_SOURCES = $(component_sources)
mca_bfrops_v3_la_LDFLAGS = -module -avoid-version mca_bfrops_v3_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_bfrops_v3_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_bfrops_v3_la_SOURCES = $(lib_sources) libmca_bfrops_v3_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_bfrops_v4_la_SOURCES = $(component_sources) mca_bfrops_v4_la_SOURCES = $(component_sources)
mca_bfrops_v4_la_LDFLAGS = -module -avoid-version mca_bfrops_v4_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_bfrops_v4_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_bfrops_v4_la_SOURCES = $(lib_sources) libmca_bfrops_v4_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -64,6 +64,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_gds_ds12_la_SOURCES = $(component_sources) mca_gds_ds12_la_SOURCES = $(component_sources)
mca_gds_ds12_la_LDFLAGS = -module -avoid-version \ mca_gds_ds12_la_LDFLAGS = -module -avoid-version \
$(PMIX_TOP_BUILDDIR)/src/mca/common/dstore/libmca_common_dstore.la $(PMIX_TOP_BUILDDIR)/src/mca/common/dstore/libmca_common_dstore.la
if NEED_LIBPMIX
mca_gds_ds12_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_gds_ds12_la_SOURCES = $(lib_sources) libmca_gds_ds12_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -56,6 +56,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_gds_ds21_la_SOURCES = $(component_sources) mca_gds_ds21_la_SOURCES = $(component_sources)
mca_gds_ds21_la_LDFLAGS = -module -avoid-version \ mca_gds_ds21_la_LDFLAGS = -module -avoid-version \
$(PMIX_TOP_BUILDDIR)/src/mca/common/dstore/libmca_common_dstore.la $(PMIX_TOP_BUILDDIR)/src/mca/common/dstore/libmca_common_dstore.la
if NEED_LIBPMIX
mca_gds_ds21_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_gds_ds21_la_SOURCES = $(lib_sources) libmca_gds_ds21_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -49,6 +49,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_gds_hash_la_SOURCES = $(component_sources) mca_gds_hash_la_SOURCES = $(component_sources)
mca_gds_hash_la_LIBADD = $(gds_hash_LIBS) mca_gds_hash_la_LIBADD = $(gds_hash_LIBS)
mca_gds_hash_la_LDFLAGS = -module -avoid-version $(gds_hash_LDFLAGS) mca_gds_hash_la_LDFLAGS = -module -avoid-version $(gds_hash_LDFLAGS)
if NEED_LIBPMIX
mca_gds_hash_la_LIBADD += $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_gds_hash_la_SOURCES = $(lib_sources) libmca_gds_hash_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -1301,7 +1301,6 @@ static pmix_status_t hash_fetch(const pmix_proc_t *proc,
val = NULL; val = NULL;
rc = pmix_hash_fetch(ht, PMIX_RANK_WILDCARD, NULL, &val); rc = pmix_hash_fetch(ht, PMIX_RANK_WILDCARD, NULL, &val);
if (PMIX_SUCCESS != rc) { if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
if (NULL != val) { if (NULL != val) {
PMIX_VALUE_RELEASE(val); PMIX_VALUE_RELEASE(val);
} }
@ -1315,7 +1314,6 @@ static pmix_status_t hash_fetch(const pmix_proc_t *proc,
if (PMIX_DATA_ARRAY != val->type || if (PMIX_DATA_ARRAY != val->type ||
NULL == val->data.darray || NULL == val->data.darray ||
PMIX_INFO != val->data.darray->type) { PMIX_INFO != val->data.darray->type) {
PMIX_ERROR_LOG(PMIX_ERR_INVALID_VAL);
PMIX_VALUE_RELEASE(val); PMIX_VALUE_RELEASE(val);
return PMIX_ERR_INVALID_VAL; return PMIX_ERR_INVALID_VAL;
} }

Просмотреть файл

@ -35,6 +35,9 @@ mcacomponent_LTLIBRARIES = $(component_install)
mca_pcompress_zlib_la_SOURCES = $(sources) mca_pcompress_zlib_la_SOURCES = $(sources)
mca_pcompress_zlib_la_LDFLAGS = -module -avoid-version $(pcompress_zlib_LDFLAGS) mca_pcompress_zlib_la_LDFLAGS = -module -avoid-version $(pcompress_zlib_LDFLAGS)
mca_pcompress_zlib_la_LIBADD = $(pcompress_zlib_LIBS) mca_pcompress_zlib_la_LIBADD = $(pcompress_zlib_LIBS)
if NEED_LIBPMIX
mca_pcompress_zlib_la_LIBADD += $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_pcompress_zlib_la_SOURCES = $(sources) libmca_pcompress_zlib_la_SOURCES = $(sources)

Просмотреть файл

@ -40,6 +40,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_plog_default_la_SOURCES = $(sources) mca_plog_default_la_SOURCES = $(sources)
mca_plog_default_la_LDFLAGS = -module -avoid-version mca_plog_default_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_plog_default_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_plog_default_la_SOURCES =$(sources) libmca_plog_default_la_SOURCES =$(sources)

Просмотреть файл

@ -40,6 +40,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_plog_stdfd_la_SOURCES = $(sources) mca_plog_stdfd_la_SOURCES = $(sources)
mca_plog_stdfd_la_LDFLAGS = -module -avoid-version mca_plog_stdfd_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_plog_stdfd_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_plog_stdfd_la_SOURCES =$(sources) libmca_plog_stdfd_la_SOURCES =$(sources)

Просмотреть файл

@ -40,6 +40,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_plog_syslog_la_SOURCES = $(sources) mca_plog_syslog_la_SOURCES = $(sources)
mca_plog_syslog_la_LDFLAGS = -module -avoid-version mca_plog_syslog_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_plog_syslog_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_plog_syslog_la_SOURCES =$(sources) libmca_plog_syslog_la_SOURCES =$(sources)

Просмотреть файл

@ -49,6 +49,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_pnet_opa_la_SOURCES = $(component_sources) mca_pnet_opa_la_SOURCES = $(component_sources)
mca_pnet_opa_la_LIBADD = $(pnet_opa_LIBS) mca_pnet_opa_la_LIBADD = $(pnet_opa_LIBS)
mca_pnet_opa_la_LDFLAGS = -module -avoid-version $(pnet_opa_LDFLAGS) mca_pnet_opa_la_LDFLAGS = -module -avoid-version $(pnet_opa_LDFLAGS)
if NEED_LIBPMIX
mca_pnet_opa_la_LIBADD += $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_pnet_opa_la_SOURCES = $(lib_sources) libmca_pnet_opa_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -49,6 +49,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_pnet_tcp_la_SOURCES = $(component_sources) mca_pnet_tcp_la_SOURCES = $(component_sources)
mca_pnet_tcp_la_LIBADD = $(pnet_tcp_LIBS) mca_pnet_tcp_la_LIBADD = $(pnet_tcp_LIBS)
mca_pnet_tcp_la_LDFLAGS = -module -avoid-version $(pnet_tcp_LDFLAGS) mca_pnet_tcp_la_LDFLAGS = -module -avoid-version $(pnet_tcp_LDFLAGS)
if NEED_LIBPMIX
mca_pnet_tcp_la_LIBADD += $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_pnet_tcp_la_SOURCES = $(lib_sources) libmca_pnet_tcp_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -46,6 +46,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_pnet_test_la_SOURCES = $(component_sources) mca_pnet_test_la_SOURCES = $(component_sources)
mca_pnet_test_la_LDFLAGS = -module -avoid-version mca_pnet_test_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_pnet_test_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_pnet_test_la_SOURCES = $(lib_sources) libmca_pnet_test_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_preg_native_la_SOURCES = $(component_sources) mca_preg_native_la_SOURCES = $(component_sources)
mca_preg_native_la_LDFLAGS = -module -avoid-version mca_preg_native_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_preg_native_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_preg_native_la_SOURCES = $(lib_sources) libmca_preg_native_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -47,6 +47,9 @@ mcacomponent_LTLIBRARIES = $(component)
mca_psec_munge_la_SOURCES = $(component_sources) mca_psec_munge_la_SOURCES = $(component_sources)
mca_psec_munge_la_LDFLAGS = -module -avoid-version $(psec_munge_LDFLAGS) mca_psec_munge_la_LDFLAGS = -module -avoid-version $(psec_munge_LDFLAGS)
mca_psec_munge_la_LIBADD = $(psec_munge_LIBS) mca_psec_munge_la_LIBADD = $(psec_munge_LIBS)
if NEED_LIBPMIX
mca_psec_munge_la_LIBADD += $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_psec_munge_la_SOURCES = $(lib_sources) libmca_psec_munge_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_psec_native_la_SOURCES = $(component_sources) mca_psec_native_la_SOURCES = $(component_sources)
mca_psec_native_la_LDFLAGS = -module -avoid-version mca_psec_native_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psec_native_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_psec_native_la_SOURCES = $(lib_sources) libmca_psec_native_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved. * Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
* Copyright (c) 2016 IBM Corporation. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science * Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved. * and Technology (RIST). All rights reserved.
@ -25,7 +25,7 @@
#include "src/util/error.h" #include "src/util/error.h"
#include "src/util/output.h" #include "src/util/output.h"
#include "src/mca/psec/psec.h" #include "src/mca/psec/base/base.h"
#include "psec_native.h" #include "psec_native.h"
static pmix_status_t native_init(void); static pmix_status_t native_init(void);
@ -49,14 +49,14 @@ pmix_psec_module_t pmix_native_module = {
static pmix_status_t native_init(void) static pmix_status_t native_init(void)
{ {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: native init"); "psec: native init");
return PMIX_SUCCESS; return PMIX_SUCCESS;
} }
static void native_finalize(void) static void native_finalize(void)
{ {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: native finalize"); "psec: native finalize");
} }
@ -167,7 +167,7 @@ static pmix_status_t validate_cred(struct pmix_peer_t *peer,
size_t n, m; size_t n, m;
uint32_t u32; uint32_t u32;
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: native validate_cred %s", "psec: native validate_cred %s",
(NULL == cred) ? "NULL" : "NON-NULL"); (NULL == cred) ? "NULL" : "NON-NULL");
@ -175,10 +175,10 @@ static pmix_status_t validate_cred(struct pmix_peer_t *peer,
/* usock protocol - get the remote side's uid/gid */ /* usock protocol - get the remote side's uid/gid */
#if defined(SO_PEERCRED) && (defined(HAVE_STRUCT_UCRED_UID) || defined(HAVE_STRUCT_UCRED_CR_UID)) #if defined(SO_PEERCRED) && (defined(HAVE_STRUCT_UCRED_UID) || defined(HAVE_STRUCT_UCRED_CR_UID))
/* Ignore received 'cred' and validate ucred for socket instead. */ /* Ignore received 'cred' and validate ucred for socket instead. */
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec:native checking getsockopt on socket %d for peer credentials", pr->sd); "psec:native checking getsockopt on socket %d for peer credentials", pr->sd);
if (getsockopt(pr->sd, SOL_SOCKET, SO_PEERCRED, &ucred, &crlen) < 0) { if (getsockopt(pr->sd, SOL_SOCKET, SO_PEERCRED, &ucred, &crlen) < 0) {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: getsockopt SO_PEERCRED failed: %s", "psec: getsockopt SO_PEERCRED failed: %s",
strerror (pmix_socket_errno)); strerror (pmix_socket_errno));
return PMIX_ERR_INVALID_CRED; return PMIX_ERR_INVALID_CRED;
@ -192,10 +192,10 @@ static pmix_status_t validate_cred(struct pmix_peer_t *peer,
#endif #endif
#elif defined(HAVE_GETPEEREID) #elif defined(HAVE_GETPEEREID)
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec:native checking getpeereid on socket %d for peer credentials", pr->sd); "psec:native checking getpeereid on socket %d for peer credentials", pr->sd);
if (0 != getpeereid(pr->sd, &euid, &egid)) { if (0 != getpeereid(pr->sd, &euid, &egid)) {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: getsockopt getpeereid failed: %s", "psec: getsockopt getpeereid failed: %s",
strerror (pmix_socket_errno)); strerror (pmix_socket_errno));
return PMIX_ERR_INVALID_CRED; return PMIX_ERR_INVALID_CRED;
@ -255,14 +255,14 @@ static pmix_status_t validate_cred(struct pmix_peer_t *peer,
/* check uid */ /* check uid */
if (euid != pr->info->uid) { if (euid != pr->info->uid) {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: socket cred contains invalid uid %u", euid); "psec: socket cred contains invalid uid %u", euid);
return PMIX_ERR_INVALID_CRED; return PMIX_ERR_INVALID_CRED;
} }
/* check gid */ /* check gid */
if (egid != pr->info->gid) { if (egid != pr->info->gid) {
pmix_output_verbose(2, pmix_globals.debug_output, pmix_output_verbose(2, pmix_psec_base_framework.framework_output,
"psec: socket cred contains invalid gid %u", egid); "psec: socket cred contains invalid gid %u", egid);
return PMIX_ERR_INVALID_CRED; return PMIX_ERR_INVALID_CRED;
} }

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_psec_none_la_SOURCES = $(component_sources) mca_psec_none_la_SOURCES = $(component_sources)
mca_psec_none_la_LDFLAGS = -module -avoid-version mca_psec_none_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psec_none_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_psec_none_la_SOURCES = $(lib_sources) libmca_psec_none_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -31,6 +31,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_psensor_file_la_SOURCES = $(sources) mca_psensor_file_la_SOURCES = $(sources)
mca_psensor_file_la_LDFLAGS = -module -avoid-version mca_psensor_file_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psensor_file_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_psensor_file_la_SOURCES =$(sources) libmca_psensor_file_la_SOURCES =$(sources)

Просмотреть файл

@ -32,6 +32,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component_install) mcacomponent_LTLIBRARIES = $(component_install)
mca_psensor_heartbeat_la_SOURCES = $(sources) mca_psensor_heartbeat_la_SOURCES = $(sources)
mca_psensor_heartbeat_la_LDFLAGS = -module -avoid-version mca_psensor_heartbeat_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psensor_heartbeat_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(component_noinst) noinst_LTLIBRARIES = $(component_noinst)
libmca_psensor_heartbeat_la_SOURCES =$(sources) libmca_psensor_heartbeat_la_SOURCES =$(sources)

Просмотреть файл

@ -37,6 +37,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_pshmem_mmap_la_SOURCES = $(component_sources) mca_pshmem_mmap_la_SOURCES = $(component_sources)
mca_pshmem_mmap_la_LDFLAGS = -module -avoid-version mca_pshmem_mmap_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_pshmem_mmap_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_pshmem_mmap_la_SOURCES = $(lib_sources) libmca_pshmem_mmap_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -34,6 +34,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_psquash_flex128_la_SOURCES = $(component_sources) mca_psquash_flex128_la_SOURCES = $(component_sources)
mca_psquash_flex128_la_LDFLAGS = -module -avoid-version mca_psquash_flex128_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psquash_flex128_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_psquash_flex128_la_SOURCES = $(lib_sources) libmca_psquash_flex128_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -37,6 +37,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_psquash_native_la_SOURCES = $(component_sources) mca_psquash_native_la_SOURCES = $(component_sources)
mca_psquash_native_la_LDFLAGS = -module -avoid-version mca_psquash_native_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_psquash_native_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_psquash_native_la_SOURCES = $(lib_sources) libmca_psquash_native_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_ptl_tcp_la_SOURCES = $(component_sources) mca_ptl_tcp_la_SOURCES = $(component_sources)
mca_ptl_tcp_la_LDFLAGS = -module -avoid-version mca_ptl_tcp_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_ptl_tcp_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_ptl_tcp_la_SOURCES = $(lib_sources) libmca_ptl_tcp_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -1351,11 +1351,21 @@ static void connection_handler(int sd, short args, void *cbdata)
} }
} }
if (NULL == nptr) { if (NULL == nptr) {
/* we don't know this namespace, reject it */ /* it is possible that this is a tool inside of
free(msg); * a job-script as part of a multi-spawn operation.
/* send an error reply to the client */ * Since each tool invocation may have finalized and
rc = PMIX_ERR_NOT_FOUND; * terminated, the tool will appear to "terminate", thus
goto error; * causing us to cleanup all references to it, and then
* reappear. So we don't reject this connection request.
* Instead, we create the nspace and rank objects for
* it and let the RM/host decide if this behavior
* is allowed */
nptr = PMIX_NEW(pmix_namespace_t);
if (NULL == nptr) {
rc = PMIX_ERR_NOMEM;
goto error;
}
nptr->nspace = strdup(nspace);
} }
/* now look for the rank */ /* now look for the rank */
info = NULL; info = NULL;
@ -1367,11 +1377,13 @@ static void connection_handler(int sd, short args, void *cbdata)
} }
} }
if (!found) { if (!found) {
/* rank unknown, reject it */ /* see above note about not finding nspace */
free(msg); info = PMIX_NEW(pmix_rank_info_t);
/* send an error reply to the client */ info->pname.nspace = strdup(nspace);
rc = PMIX_ERR_NOT_FOUND; info->pname.rank = rank;
goto error; info->uid = pnd->uid;
info->gid = pnd->gid;
pmix_list_append(&nptr->ranks, &info->super);
} }
PMIX_RETAIN(info); PMIX_RETAIN(info);
peer->info = info; peer->info = info;
@ -1906,8 +1918,8 @@ static void cnct_cbfunc(pmix_status_t status,
pmix_setup_caddy_t *cd; pmix_setup_caddy_t *cd;
pmix_output_verbose(2, pmix_ptl_base_framework.framework_output, pmix_output_verbose(2, pmix_ptl_base_framework.framework_output,
"pmix:tcp:cnct_cbfunc returning %s:%d", "pmix:tcp:cnct_cbfunc returning %s:%d %s",
proc->nspace, proc->rank); proc->nspace, proc->rank, PMIx_Error_string(status));
/* need to thread-shift this into our context */ /* need to thread-shift this into our context */
cd = PMIX_NEW(pmix_setup_caddy_t); cd = PMIX_NEW(pmix_setup_caddy_t);

Просмотреть файл

@ -44,6 +44,9 @@ mcacomponentdir = $(pmixlibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_ptl_usock_la_SOURCES = $(component_sources) mca_ptl_usock_la_SOURCES = $(component_sources)
mca_ptl_usock_la_LDFLAGS = -module -avoid-version mca_ptl_usock_la_LDFLAGS = -module -avoid-version
if NEED_LIBPMIX
mca_ptl_usock_la_LIBADD = $(top_builddir)/src/libpmix.la
endif
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_ptl_usock_la_SOURCES = $(lib_sources) libmca_ptl_usock_la_SOURCES = $(lib_sources)

Просмотреть файл

@ -257,9 +257,7 @@ static void job_data(struct pmix_peer_t *pr,
PMIX_EXPORT int PMIx_tool_init(pmix_proc_t *proc, PMIX_EXPORT int PMIx_tool_init(pmix_proc_t *proc,
pmix_info_t info[], size_t ninfo) pmix_info_t info[], size_t ninfo)
{ {
pmix_kval_t *kptr;
pmix_status_t rc; pmix_status_t rc;
char hostname[PMIX_MAX_NSLEN];
char *evar, *nspace = NULL; char *evar, *nspace = NULL;
pmix_rank_t rank = PMIX_RANK_UNDEF; pmix_rank_t rank = PMIX_RANK_UNDEF;
bool gdsfound, do_not_connect = false; bool gdsfound, do_not_connect = false;
@ -735,318 +733,38 @@ PMIX_EXPORT int PMIx_tool_init(pmix_proc_t *proc,
PMIX_RELEASE_THREAD(&pmix_global_lock); PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc; return rc;
} }
/* quick check to see if we got something back. If this
* is a launcher that is being executed multiple times
* in a job-script, then the original registration data
* will have been deleted after the first invocation. In
* such a case, we simply regenerate it locally as it is
* well-known */
pmix_cb_t cb;
PMIX_CONSTRUCT(&cb, pmix_cb_t);
pmix_strncpy(wildcard.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
wildcard.rank = PMIX_RANK_WILDCARD;
cb.proc = &wildcard;
cb.copy = true;
PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, &cb);
if (PMIX_SUCCESS != rc) {
pmix_output_verbose(5, pmix_client_globals.get_output,
"pmix:tool:client data not found in internal storage");
rc = pmix_tool_init_info();
if (PMIX_SUCCESS != rc) {
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
}
} else { } else {
/* now finish the initialization by filling our local /* now finish the initialization by filling our local
* datastore with typical job-related info. No point * datastore with typical job-related info. No point
* in having the server generate these as we are * in having the server generate these as we are
* obviously a singleton, and so the values are well-known */ * obviously a singleton, and so the values are well-known */
pmix_strncpy(wildcard.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN); rc = pmix_tool_init_info();
wildcard.rank = pmix_globals.myid.rank;
/* the jobid is just our nspace */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_JOBID);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(pmix_globals.myid.nspace);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) { if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock); PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc; return rc;
} }
PMIX_RELEASE(kptr); // maintain accounting
/* our rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_INT;
kptr->value->data.integer = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* nproc offset */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NPROC_OFFSET);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* node size */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NODE_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local peers */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_PEERS);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup("0");
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local leader */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCALLDR);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* universe size */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_UNIV_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* job size - we are our very own job, so we have no peers */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_JOB_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local size - only us in our job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* max procs - since we are a self-started tool, there is no
* allocation within which we can grow ourselves */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_MAX_PROCS);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app number */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APPNUM);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app leader */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APPLDR);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APP_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* global rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_GLOBAL_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local rank - we are alone in our job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT16;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* we cannot know the node rank as we don't know what
* other processes are executing on this node - so
* we'll add that info to the server-tool handshake
* and load it from there */
/* hostname */
if (NULL != pmix_globals.hostname) {
pmix_strncpy(hostname, pmix_globals.hostname, PMIX_MAX_NSLEN);
} else {
gethostname(hostname, PMIX_MAX_NSLEN);
}
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_HOSTNAME);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(hostname);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* we cannot know the RM's nodeid for this host, so
* we'll add that info to the server-tool handshake
* and load it from there */
/* the nodemap is simply our hostname as there is no
* regex to generate */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NODE_MAP);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(hostname);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* likewise, the proc map is just our rank as we are
* the only proc in this job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_PROC_MAP);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup("0");
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
PMIX_RELEASE_THREAD(&pmix_global_lock);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
} }
PMIX_RELEASE_THREAD(&pmix_global_lock); PMIX_RELEASE_THREAD(&pmix_global_lock);
@ -1064,6 +782,307 @@ PMIX_EXPORT int PMIx_tool_init(pmix_proc_t *proc,
return rc; return rc;
} }
pmix_status_t pmix_tool_init_info(void)
{
pmix_kval_t *kptr;
pmix_status_t rc;
pmix_proc_t wildcard;
char hostname[PMIX_MAX_NSLEN];
pmix_strncpy(wildcard.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
wildcard.rank = pmix_globals.myid.rank;
/* the jobid is just our nspace */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_JOBID);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(pmix_globals.myid.nspace);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* our rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_INT;
kptr->value->data.integer = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* nproc offset */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NPROC_OFFSET);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* node size */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NODE_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local peers */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_PEERS);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup("0");
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local leader */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCALLDR);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* universe size */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_UNIV_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* job size - we are our very own job, so we have no peers */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_JOB_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local size - only us in our job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_SIZE);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* max procs - since we are a self-started tool, there is no
* allocation within which we can grow ourselves */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_MAX_PROCS);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 1;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app number */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APPNUM);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app leader */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APPLDR);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* app rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_APP_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* global rank */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_GLOBAL_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT32;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* local rank - we are alone in our job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_LOCAL_RANK);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_UINT16;
kptr->value->data.uint32 = 0;
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* we cannot know the node rank as we don't know what
* other processes are executing on this node - so
* we'll add that info to the server-tool handshake
* and load it from there */
/* hostname */
if (NULL != pmix_globals.hostname) {
pmix_strncpy(hostname, pmix_globals.hostname, PMIX_MAX_NSLEN);
} else {
gethostname(hostname, PMIX_MAX_NSLEN);
}
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_HOSTNAME);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(hostname);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&pmix_globals.myid,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* we cannot know the RM's nodeid for this host, so
* we'll add that info to the server-tool handshake
* and load it from there */
/* the nodemap is simply our hostname as there is no
* regex to generate */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_NODE_MAP);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup(hostname);
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
/* likewise, the proc map is just our rank as we are
* the only proc in this job */
kptr = PMIX_NEW(pmix_kval_t);
kptr->key = strdup(PMIX_PROC_MAP);
PMIX_VALUE_CREATE(kptr->value, 1);
kptr->value->type = PMIX_STRING;
kptr->value->data.string = strdup("0");
PMIX_GDS_STORE_KV(rc, pmix_globals.mypeer,
&wildcard,
PMIX_INTERNAL, kptr);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
return rc;
}
PMIX_RELEASE(kptr); // maintain accounting
return PMIX_SUCCESS;
}
typedef struct { typedef struct {
pmix_lock_t lock; pmix_lock_t lock;
pmix_event_t ev; pmix_event_t ev;

Просмотреть файл

@ -11,7 +11,7 @@
# All rights reserved. # All rights reserved.
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved. # Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2018 Research Organization for Information Science # Copyright (c) 2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved. # and Technology (RIST). All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
@ -33,9 +33,61 @@ headers = test_common.h cli_stages.h server_callbacks.h utils.h test_fence.h \
AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_builddir)/src/include -I$(top_builddir)/src/api AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_builddir)/src/include -I$(top_builddir)/src/api
noinst_SCRIPTS = pmix_client_otheruser.sh noinst_SCRIPTS = pmix_client_otheruser.sh \
run_tests00.pl \
run_tests01.pl \
run_tests02.pl \
run_tests03.pl \
run_tests04.pl \
run_tests05.pl \
run_tests06.pl \
run_tests07.pl \
run_tests08.pl \
run_tests09.pl \
run_tests10.pl \
run_tests11.pl \
run_tests12.pl \
run_tests13.pl \
run_tests14.pl \
run_tests15.pl
noinst_PROGRAMS = noinst_PROGRAMS =
#########################
# Support for "make check"
check_PROGRAMS = \
pmix_test \
pmix_client \
pmix_regex
if WANT_PMI_BACKWARD
check_PROGRAMS += \
pmi_client \
pmi2_client
endif
TESTS = \
run_tests00.pl \
run_tests01.pl \
run_tests02.pl \
run_tests03.pl \
run_tests04.pl \
run_tests05.pl \
run_tests06.pl \
run_tests07.pl \
run_tests08.pl \
run_tests09.pl \
run_tests10.pl \
run_tests11.pl \
run_tests12.pl \
run_tests13.pl \
run_tests14.pl \
run_tests15.pl
##########################
if WANT_PMI_BACKWARD if WANT_PMI_BACKWARD
noinst_PROGRAMS += pmi_client pmi2_client noinst_PROGRAMS += pmi_client pmi2_client
endif endif

73
opal/mca/pmix/pmix4x/pmix/test/run_tests00.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests01.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests02.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests03.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests04.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests05.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests06.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests07.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests08.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests09.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests10.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests11.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests12.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests13.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests14.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

73
opal/mca/pmix/pmix4x/pmix/test/run_tests15.pl.in Исполняемый файл
Просмотреть файл

@ -0,0 +1,73 @@
#!/usr/bin/env perl
#
# Copyright (c) 2019 Intel, Inc.
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
use strict;
my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
"-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
"-n 4 --ns-dist 3:1 --fence \"[0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
"-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
"-n 4 --job-fence -c",
"-n 4 --job-fence",
"-n 2 --test-publish",
"-n 2 --test-spawn",
"-n 2 --test-connect",
"-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
"-n 5 --test-replace 100:0,1,10,50,99",
"-n 5 --test-internal 10",
"-s 2 -n 2 --job-fence",
"-s 2 -n 2 --job-fence -c");
my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
# We are running tests against the build tree (vs. the installation
# tree). Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS. Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name. Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "@PMIX_BUILT_TEST_PREFIX@";
my $mypathstr = "@PMIX_COMPONENT_LIBRARY_PATHS@";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
# Note that the component is actually built in the ".libs"
# subdirectory. If the component wasn't built, that subdirectory
# will not exist, so don't save it.
my $fullpath = $mybuilddir . "/" . $path . "/.libs";
push(@myfullpaths, $fullpath)
if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;
my $wdir = $mybuilddir . "/test";
chdir $wdir;
$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];
$cmd = "./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";
exit($status >> 8);

Просмотреть файл

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved. * Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Artem Y. Polyakov <artpol84@gmail.com>. * Copyright (c) 2015 Artem Y. Polyakov <artpol84@gmail.com>.
* All rights reserved. * All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science * Copyright (c) 2015 Research Organization for Information Science
@ -262,7 +262,7 @@ typedef struct {
TEST_VERBOSE(("%s:%d want to get from %s:%d key %s", my_nspace, my_rank, ns, r, key)); \ TEST_VERBOSE(("%s:%d want to get from %s:%d key %s", my_nspace, my_rank, ns, r, key)); \
if (blocking) { \ if (blocking) { \
if (PMIX_SUCCESS != (rc = PMIx_Get(&foobar, key, NULL, 0, &val))) { \ if (PMIX_SUCCESS != (rc = PMIx_Get(&foobar, key, NULL, 0, &val))) { \
if( !( rc == PMIX_ERR_NOT_FOUND && ok_notfnd ) ){ \ if( !( (rc == PMIX_ERR_NOT_FOUND || rc == PMIX_ERR_PROC_ENTRY_NOT_FOUND) && ok_notfnd ) ){ \
TEST_ERROR(("%s:%d: PMIx_Get failed: %d from %s:%d, key %s", my_nspace, my_rank, rc, ns, r, key)); \ TEST_ERROR(("%s:%d: PMIx_Get failed: %d from %s:%d, key %s", my_nspace, my_rank, rc, ns, r, key)); \
} \ } \
rc = PMIX_ERROR; \ rc = PMIX_ERROR; \
@ -289,7 +289,7 @@ typedef struct {
} \ } \
if (PMIX_SUCCESS == rc) { \ if (PMIX_SUCCESS == rc) { \
if( PMIX_SUCCESS != cbdata.status ){ \ if( PMIX_SUCCESS != cbdata.status ){ \
if( !( cbdata.status == PMIX_ERR_NOT_FOUND && ok_notfnd ) ){ \ if( !( (cbdata.status == PMIX_ERR_NOT_FOUND || cbdata.status == PMIX_ERR_PROC_ENTRY_NOT_FOUND) && ok_notfnd ) ){ \
TEST_ERROR(("%s:%d: PMIx_Get_nb failed: %d from %s:%d, key=%s", \ TEST_ERROR(("%s:%d: PMIx_Get_nb failed: %d from %s:%d, key=%s", \
my_nspace, my_rank, rc, my_nspace, r)); \ my_nspace, my_rank, rc, my_nspace, r)); \
} \ } \

Просмотреть файл

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved. * Copyright (c) 2016-2019 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2017 Mellanox Technologies, Inc. * Copyright (c) 2015-2017 Mellanox Technologies, Inc.
* All rights reserved. * All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
@ -384,7 +384,7 @@ int test_job_fence(test_params params, char *my_nspace, pmix_rank_t my_rank)
if( local ){ if( local ){
GET(int, (12340+j), my_nspace, i+params.base_rank, 100, j, 0, 0, 0); GET(int, (12340+j), my_nspace, i+params.base_rank, 100, j, 0, 0, 0);
if (PMIX_SUCCESS != rc) { if (PMIX_SUCCESS != rc) {
TEST_ERROR(("%s:%d: PMIx_Get failed: %d", my_nspace, my_rank, rc)); TEST_ERROR(("%s:%d: PMIx_Get failed: %s", my_nspace, my_rank, PMIx_Error_string(rc)));
return PMIX_ERROR; return PMIX_ERROR;
} }
@ -423,9 +423,10 @@ int test_job_fence(test_params params, char *my_nspace, pmix_rank_t my_rank)
my_nspace, my_rank)); my_nspace, my_rank));
return PMIX_ERROR; return PMIX_ERROR;
} }
if (PMIX_ERR_NOT_FOUND != rc) { if (PMIX_ERR_NOT_FOUND != rc && PMIX_ERR_PROC_ENTRY_NOT_FOUND != rc) {
TEST_ERROR(("%s:%d [ERROR]: PMIx_Get returned %d instead of not_found", TEST_ERROR(("%s:%d [ERROR]: PMIx_Get returned %s instead of not_found",
my_nspace, my_rank, rc)); my_nspace, my_rank, PMIx_Error_string(rc)));
return PMIX_ERROR;
} }
if (NULL != val) { if (NULL != val) {
TEST_ERROR(("%s:%d [ERROR]: PMIx_Get did not return NULL value", my_nspace, my_rank)); TEST_ERROR(("%s:%d [ERROR]: PMIx_Get did not return NULL value", my_nspace, my_rank));

Просмотреть файл

@ -93,56 +93,6 @@ static void release_cb(pmix_status_t status, void *cbdata)
*ptr = 0; *ptr = 0;
} }
static void set_namespace(int local_size, int univ_size, char *ranks, char *name)
{
size_t ninfo;
pmix_info_t *info;
ninfo = 8;
char *regex, *ppn;
PMIX_INFO_CREATE(info, ninfo);
pmix_strncpy(info[0].key, PMIX_UNIV_SIZE, PMIX_MAX_KEYLEN);
info[0].value.type = PMIX_UINT32;
info[0].value.data.uint32 = univ_size;
pmix_strncpy(info[1].key, PMIX_SPAWNED, PMIX_MAX_KEYLEN);
info[1].value.type = PMIX_UINT32;
info[1].value.data.uint32 = 0;
pmix_strncpy(info[2].key, PMIX_LOCAL_SIZE, PMIX_MAX_KEYLEN);
info[2].value.type = PMIX_UINT32;
info[2].value.data.uint32 = local_size;
pmix_strncpy(info[3].key, PMIX_LOCAL_PEERS, PMIX_MAX_KEYLEN);
info[3].value.type = PMIX_STRING;
info[3].value.data.string = strdup(ranks);
PMIx_generate_regex(NODE_NAME, &regex);
pmix_strncpy(info[4].key, PMIX_NODE_MAP, PMIX_MAX_KEYLEN);
info[4].value.type = PMIX_STRING;
info[4].value.data.string = regex;
PMIx_generate_ppn(ranks, &ppn);
pmix_strncpy(info[5].key, PMIX_PROC_MAP, PMIX_MAX_KEYLEN);
info[5].value.type = PMIX_STRING;
info[5].value.data.string = ppn;
pmix_strncpy(info[6].key, PMIX_JOB_SIZE, PMIX_MAX_KEYLEN);
info[6].value.type = PMIX_UINT32;
info[6].value.data.uint32 = univ_size;
pmix_strncpy(info[7].key, PMIX_APPNUM, PMIX_MAX_KEYLEN);
info[7].value.type = PMIX_UINT32;
info[7].value.data.uint32 = getpid ();
int in_progress = 1, rc;
if (PMIX_SUCCESS == (rc = PMIx_server_register_nspace(name, local_size,
info, ninfo, release_cb, &in_progress))) {
PMIX_WAIT_FOR_COMPLETION(in_progress);
}
PMIX_INFO_FREE(info, ninfo);
}
static void fill_seq_ranks_array(size_t nprocs, int base_rank, char **ranks) static void fill_seq_ranks_array(size_t nprocs, int base_rank, char **ranks)
{ {
uint32_t i; uint32_t i;
@ -165,6 +115,70 @@ static void fill_seq_ranks_array(size_t nprocs, int base_rank, char **ranks)
} }
} }
static void set_namespace(int local_size, int univ_size,
int base_rank, char *name)
{
size_t ninfo;
pmix_info_t *info;
ninfo = 8;
char *regex, *ppn;
char *ranks = NULL;
PMIX_INFO_CREATE(info, ninfo);
pmix_strncpy(info[0].key, PMIX_UNIV_SIZE, PMIX_MAX_KEYLEN);
info[0].value.type = PMIX_UINT32;
info[0].value.data.uint32 = univ_size;
pmix_strncpy(info[1].key, PMIX_SPAWNED, PMIX_MAX_KEYLEN);
info[1].value.type = PMIX_UINT32;
info[1].value.data.uint32 = 0;
pmix_strncpy(info[2].key, PMIX_LOCAL_SIZE, PMIX_MAX_KEYLEN);
info[2].value.type = PMIX_UINT32;
info[2].value.data.uint32 = local_size;
/* generate the array of local peers */
fill_seq_ranks_array(local_size, base_rank, &ranks);
if (NULL == ranks) {
return;
}
pmix_strncpy(info[3].key, PMIX_LOCAL_PEERS, PMIX_MAX_KEYLEN);
info[3].value.type = PMIX_STRING;
info[3].value.data.string = strdup(ranks);
free(ranks);
PMIx_generate_regex(NODE_NAME, &regex);
pmix_strncpy(info[4].key, PMIX_NODE_MAP, PMIX_MAX_KEYLEN);
info[4].value.type = PMIX_STRING;
info[4].value.data.string = regex;
/* generate the global proc map */
fill_seq_ranks_array(univ_size, 0, &ranks);
if (NULL == ranks) {
return;
}
PMIx_generate_ppn(ranks, &ppn);
free(ranks);
pmix_strncpy(info[5].key, PMIX_PROC_MAP, PMIX_MAX_KEYLEN);
info[5].value.type = PMIX_STRING;
info[5].value.data.string = ppn;
pmix_strncpy(info[6].key, PMIX_JOB_SIZE, PMIX_MAX_KEYLEN);
info[6].value.type = PMIX_UINT32;
info[6].value.data.uint32 = univ_size;
pmix_strncpy(info[7].key, PMIX_APPNUM, PMIX_MAX_KEYLEN);
info[7].value.type = PMIX_UINT32;
info[7].value.data.uint32 = getpid ();
int in_progress = 1, rc;
if (PMIX_SUCCESS == (rc = PMIx_server_register_nspace(name, local_size,
info, ninfo, release_cb, &in_progress))) {
PMIX_WAIT_FOR_COMPLETION(in_progress);
}
PMIX_INFO_FREE(info, ninfo);
}
static void server_unpack_procs(char *buf, size_t size) static void server_unpack_procs(char *buf, size_t size)
{ {
char *ptr = buf; char *ptr = buf;
@ -878,14 +892,8 @@ int server_launch_clients(int local_size, int univ_size, int base_rank,
univ_size)); univ_size));
TEST_VERBOSE(("Setting job info")); TEST_VERBOSE(("Setting job info"));
fill_seq_ranks_array(local_size, base_rank, &ranks);
if (NULL == ranks) {
PMIx_server_finalize();
TEST_ERROR(("fill_seq_ranks_array failed"));
return PMIX_ERROR;
}
(void)snprintf(proc.nspace, PMIX_MAX_NSLEN, "%s-%d", TEST_NAMESPACE, num_ns); (void)snprintf(proc.nspace, PMIX_MAX_NSLEN, "%s-%d", TEST_NAMESPACE, num_ns);
set_namespace(local_size, univ_size, ranks, proc.nspace); set_namespace(local_size, univ_size, base_rank, proc.nspace);
if (NULL != ranks) { if (NULL != ranks) {
free(ranks); free(ranks);
} }