1
1

Merge pull request #6230 from ggouaillardet/topic/pmix_refresh

pmix/pmi4x: refresh to latest PMIx
Этот коммит содержится в:
Gilles Gouaillardet 2018-12-28 15:11:53 +09:00 коммит произвёл GitHub
родитель 80313366fd 0203531695
Коммит 79f02ade22
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
24 изменённых файлов: 47 добавлений и 1094 удалений

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

@ -367,6 +367,8 @@ opal/mca/hwloc/base/static-components.h.new.struct
opal/mca/installdirs/config/install_dirs.h
!opal/mca/pmix/pmix*/pmix/AUTHORS
!opal/mca/pmix/pmix*/pmix/contrib/perf_tools/Makefile
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h.in
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in

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

@ -37,10 +37,6 @@ dist_pmixdata_DATA =
if ! PMIX_EMBEDDED_MODE
dist_pmixdata_DATA += contrib/pmix-valgrind.supp
if PMIX_HAVE_PANDOC
SUBDIRS += man
endif
endif
if PMIX_TESTS_EXAMPLES

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

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

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

@ -679,10 +679,6 @@ AC_DEFUN([PMIX_SETUP_CORE],[
[AC_DEFINE_UNQUOTED([HAVE_UNIX_BYTESWAP], [1],
[whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are available])])
# check pandoc separately so we can setup an AM_CONDITIONAL off it
AC_CHECK_PROG([pmix_have_pandoc], [pandoc], [yes], [no])
AM_CONDITIONAL([PMIX_HAVE_PANDOC], [test "x$pmix_have_pandoc" = "xyes"])
#
# Make sure we can copy va_lists (need check declared, not linkable)
#
@ -1104,20 +1100,6 @@ AC_DEFINE_UNQUOTED([PMIX_ENABLE_TIMING], [$WANT_PMIX_TIMING],
[Whether we want developer-level timing support or not])
#
# Install header files
#
AC_MSG_CHECKING([if want to head developer-level header files])
AC_ARG_WITH(devel-headers,
AC_HELP_STRING([--with-devel-headers],
[also install developer-level header files (only for internal PMIx developers, default: disabled)]))
if test "$with_devel_headers" = "yes"; then
AC_MSG_RESULT([yes])
WANT_INSTALL_HEADERS=1
else
AC_MSG_RESULT([no])
WANT_INSTALL_HEADERS=0
fi
#
# Install backward compatibility support for PMI-1 and PMI-2
#

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

@ -249,7 +249,6 @@ AC_SUBST([libmca_common_dstore_so_version])
AC_CONFIG_FILES(pmix_config_prefix[contrib/Makefile]
pmix_config_prefix[examples/Makefile]
pmix_config_prefix[man/Makefile]
pmix_config_prefix[test/Makefile]
pmix_config_prefix[test/simple/Makefile])

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

@ -25,8 +25,6 @@
EXTRA_DIST = \
make_dist_tarball \
buildrpm.sh \
cron-run-all-md2nroff.pl \
md2nroff.pl \
platform/optimized \
pmix_jenkins.sh \
pmix-release.sh \

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

@ -1,187 +0,0 @@
#!/usr/bin/env perl
# Script to pull down the latest markdown man pages from the PMIx
# git repo. Iterate over them, converting each to an nroff man page
# and also copying+committing them to the gh-pages branch. Finally,
# git push them back upstream (so that Github will render + serve them
# up as web pages).
use strict;
use warnings;
use POSIX;
use File::Basename;
use Getopt::Long;
use File::Temp;
my $repo_arg;
my $source_branch_arg = "master";
my $pages_branch_arg = "gh-pages";
my $logfile_dir_arg = "/tmp";
my $verbose_arg;
my $help_arg;
my $ok = Getopt::Long::GetOptions("repo=s" => \$repo_arg,
"source-branch=s" => \$source_branch_arg,
"pages-branch=s" => \$pages_branch_arg,
"logfile-dir=s" => \$logfile_dir_arg,
"help|h" => \$help_arg,
"verbose" => \$verbose_arg,
);
if (!$ok || $help_arg) {
print "Invalid command line argument.\n\n"
if (!$ok);
print "Options:
--help | -h Print this message
--repo Git repo to be updated
--source-branch Branch containing source files (default: master)
--pages-branch Branch where man pages are to be output (default: gh-pages)
--logfile-dir Directory where execution log is to be written (default: /tmp)
--verbose Print debug info during execution\n";
exit($ok ? 0 : 1);
}
# Sanity checks
die "Must specify a git repo"
if (!defined($repo_arg));
#####################################################################
my $logfile_dir = $logfile_dir_arg;
my $logfile_counter = 1;
sub doit {
my $allowed_to_fail = shift;
my $cmd = shift;
my $stdout_file = shift;
# Put a prefix on the logfiles so that we know that they belong to
# this script, and put a counter so that we know the sequence of
# logfiles
$stdout_file = "runall-md2nroff-$logfile_counter-$stdout_file";
++$logfile_counter;
# Redirect stdout if requested
if (defined $stdout_file) {
$stdout_file = "$logfile_dir/$stdout_file.log";
unlink($stdout_file);
$cmd .= " >$stdout_file";
} elsif (!$verbose_arg && $cmd !~ />/) {
$cmd .= " >/dev/null";
}
$cmd .= " 2>&1";
my $rc = system($cmd);
if (0 != $rc && !$allowed_to_fail) {
# If we die/fail, ensure to change out of the temp tree so
# that it can be removed upon exit.
chdir("/");
die "Command $cmd failed: exit status $rc";
}
system("cat $stdout_file")
if ($verbose_arg && defined($stdout_file) && -f $stdout_file);
}
sub verbose {
print @_
if ($verbose_arg);
}
#####################################################################
# Setup a logfile dir just for this run
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
$logfile_dir =
sprintf("%s/cron-run-all-md2nroff-logs-%04d-%02d-%02d-%02d%02d",
$logfile_dir_arg, $year + 1900, $mon + 1, $mday,
$hour, $min);
my $rc = system("mkdir $logfile_dir");
if ($rc != 0 || ! -d $logfile_dir || ! -w $logfile_dir) {
chdir("/");
die "mkdir of $logfile_dir failed, or can't write to it";
}
# First, git clone the source branch of the repo
verbose("*** Cloning repo: $repo_arg / $source_branch_arg...\n");
my $tmpdir = File::Temp->newdir();
chdir($tmpdir);
doit(0, "git clone --single-branch --branch $source_branch_arg $repo_arg source", "git-clone");
# Next, git clone the pages branch of repo
if (defined($pages_branch_arg)) {
verbose("*** Cloning repo: $repo_arg / $pages_branch_arg...\n");
doit(0, "git clone --single-branch --branch $pages_branch_arg $repo_arg pages", "git-clone2");
}
#####################################################################
# Find all the *.\d.md files in the source repo
verbose("*** Finding markdown man pages...\n");
opendir(DIR, "source/man");
my @markdown_files = grep { /\.\d\.md$/ && -f "source/man/$_" } readdir(DIR);
closedir(DIR);
verbose("Found: @markdown_files\n");
#####################################################################
# Copy each of the markdown files to the pages branch checkout
if (defined($pages_branch_arg)) {
chdir("pages/master");
foreach my $file (@markdown_files) {
doit(0, "cp ../../source/man/$file man/$file", "loop-cp");
# Is there a new man page? If so, we need to "git add" it.
my $out = `git status --porcelain man/$file`;
doit(0, "git add man/$file", "loop-git-add")
if ($out =~ /^\?\?/);
}
# Git commit those files in the pages repo and push them to the
# upstream repo so that they go live. If nothing changed, the commit
# and push will be no-ops.
chdir("..");
doit(1, "git commit --no-verify -a -m \"Updated Markdown man pages from $source_branch_arg\"",
"git-commit-first");
doit(1, "git push", "git-push-first");
}
#####################################################################
# Now process each of the Markdown files in the source repo and
# generate new nroff man pages.
chdir("$tmpdir/source/man");
foreach my $file (@markdown_files) {
doit(0, "../contrib/md2nroff.pl --source $file", "loop2-md2nroff");
# Did we generate a new man page? If so, we need to "git add" it.
my $man_file = basename($file);
$man_file =~ m/\.(\d)\.md$/;
my $section = $1;
$man_file =~ s/\.md$//;
my $full_filename = "man$section/$man_file";
my $out = `git status --porcelain $full_filename`;
doit(0, "git add $full_filename", "loop2-git-add")
if ($out =~ /^\?\?/);
}
# Similar to above: commit the newly-generated nroff pages and push
# them back upstream. If nothing changed, these will be no-ops.
doit(1, "git commit --no-verify -a -m \"Updated nroff-generated man pages\"", "git-commit-final");
doit(1, "git push", "git-push-final");
# chdir out of the tmpdir so that it can be removed
chdir("/");
# If we get here, we finished successfully, so there's no need to keep
# the logfile dir around
system("rm -rf $logfile_dir");
exit(0);

0
opal/mca/pmix/pmix4x/pmix/contrib/make_dist_tarball Обычный файл → Исполняемый файл
Просмотреть файл

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

@ -1,164 +0,0 @@
#!/usr/bin/env perl
# Script to convert markdown to nroff man pages.
#
# The main conversion work is done via pandoc. But pandoc doesn't do
# everything exactly the way we want it, so use some perl regular
# expressions to fix up what pandoc doesn't get right.
#
# Do a "smart" write of the resulting output man page -- only write to
# the output file if the contents have actually changed compared to
# what was already there.
use strict;
use warnings;
use POSIX;
use File::Basename;
use Getopt::Long;
use File::Temp qw/tempfile/;
my $source_arg;
my $target_arg;
my $help_arg;
my $ok = Getopt::Long::GetOptions("source=s" => \$source_arg,
"target=s" => \$target_arg,
"help|h" => \$help_arg,
);
if ($help_arg) {
print "$0 --source input_MD_file --target output_nroff_file\n";
exit(0);
}
# Sanity checks
die "Must specify a source file"
if (!defined($source_arg));
die "Source file does not exist ($source_arg)"
if (! -r $source_arg);
my $pandoc = `which pandoc`;
die "Cannot find pandoc executable"
if ($pandoc eq "");
#####################################################################
my $file = $source_arg;
$file =~ m/(\d+).md/;
my $section = $1;
die "Could not figure out the man page section: $source_arg"
if (!defined($section));
my $shortfile = basename($file);
$shortfile =~ s/\.$section\.md$//;
# If the target file was not specified, derive it from the source file
my $target;
if (!defined($target_arg)) {
$target_arg = $source_arg;
$target_arg =~ m/\.(\d)\.md$/;
my $section = $1;
my $dirname = dirname($target_arg);
my $basename = basename($target_arg);
$basename =~ s/\.md$//;
$target = "$dirname/man$section/$basename";
} else {
$target = $target_arg;
}
print "*** Processing: $file -> $target\n";
# Read in the file
my $pandoc_input;
open(IN, $file)
|| die "Can't open $file";
$pandoc_input .= $_
while (<IN>);
close(IN);
# Remove the Jekyll header
$pandoc_input =~ s/.*---\n.+?---\n//s;
# Remove the {% include ... %} directives
$pandoc_input =~ s/\n{0,1}\s*{%\s+include .+?\s+%}\s*\n/\n/g;
# Change {% highlight c %} to ```c
$pandoc_input =~ s/^\s*{%\s+highlight\s+c\s+%}\s*$/\n```c/gmi;
# Change {% endhighlight %} to ```
$pandoc_input =~ s/^\s*\{\%\s+endhighlight\s+\%\}\s*$/```\n/gmi;
# Pandoc does not handle markdown links in output nroff properly,
# so just remove all links.
while ($pandoc_input =~ m/\[(.+?)\]\(.+?\)/) {
my $text = $1;
$pandoc_input =~ s/\[(.+?)\]\(.+?\)/$text/;
}
# Add the pandoc header
$pandoc_input = "% $shortfile($section) PMIx Programmer's Manual | \@VERSION\@
% PMIx
% \@DATE\@\n\n$pandoc_input";
# Generate the nroff output
my ($fh, $temp_filename) = tempfile();
print $fh $pandoc_input;
close($fh);
open(IN, "pandoc -s --from=markdown --to=man $temp_filename|")
|| die "Can't run pandoc";
my $pandoc_nroff;
$pandoc_nroff .= $_
while (<IN>);
close(IN);
unlink($temp_filename);
# Now that we have the nroff string result, is it different than the
# target file?
my $write_nroff = 1;
if (-r $target) {
# If the target file exists, read it in
open(IN, $target)
|| die "Can't open $target";
my $target_nroff;
$target_nroff .= $_
while (<IN>);
close(IN);
# Remove the date from the target nroff string so that we can
# compare and ignore if the date has changed. Note that some
# versions of pandoc render dates as xxxx\-xx\-xx, and others
# render it as xxxx-xx-xx. Handle both.
$target_nroff =~ s/\"\d\d\d\d\\\-\d\d\\\-\d\d\"/\"\\\@DATE\\\@\"/;
$target_nroff =~ s/\"\d\d\d\d\-\d\d\-\d\d\"/\"\\\@DATE\\\@\"/;
$write_nroff = 0
if ($pandoc_nroff eq $target_nroff);
}
# Do we need to write a new target nroff?
if ($write_nroff) {
# What's the date right now?
my $now_string = strftime "%Y\\-%m\\-%d", localtime;
$pandoc_nroff =~ s/\\\@DATE\\\@/$now_string/g;
# Make sure the target directory exists
my $dirname = dirname($target);
mkdir($dirname)
if (! -d $dirname);
open(OUT, ">$target")
|| die "Can't write to $target";
print OUT $pandoc_nroff;
close(OUT);
print "--> Wrote new $target\n";
} else {
print "--> $target unchanged; not written\n";
}
exit(0);

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

@ -1,60 +0,0 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# 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) 2013-2016 Intel, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
if !PMIX_EMBEDDED_MODE
man_MANS = \
man3/pmix_init.3 \
man3/pmix_finalize.3 \
man3/pmix_initialized.3 \
man3/pmix_abort.3 \
man3/pmix_put.3 \
man3/pmix_commit.3 \
man7/pmix.7 \
man7/pmix_constants.7
EXTRA_DIST = $(man_MANS)
man3/pmix_init.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_init.3.md;
man3/pmix_finalize.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_finalize.3.md;
man3/pmix_initialized.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_initialized.3.md;
man3/pmix_abort.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_abort.3.md;
man3/pmix_put.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_put.3.md;
man3/pmix_commit.3:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_commit.3.md;
man7/pmix.7:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix.7.md;
man7/pmix_constants.7:
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_constants.7.md;
endif # !PMIX_EMBEDDED_MODE

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

@ -1,186 +0,0 @@
This file describes how the developer side of man pages work in PMIx.
The Definitive Source Of Truth man pages are the Markdown man pages in
this directory (i.e., the files ending in .<digit>.md. If you want to
edit man pages, you need to edit the .<digit>.md pages. Do NOT edit
the .<digit> nroff man pages directly; these files are automatically
generated -- you will lose any manual edits the next time those files
are generated.
The Markdown web pages are rendered in two different ways:
1. Nroff man pages. These man pages are put into the `master` branch
and later included in PMIx distribution tarballs.
2. HTML. The http://open-mpi.github.io/pmix/ web site (which is
served by the Github web servers) automatically renders the content
of the `gh-pages` branch of the PMIx repo.
Markdown syntax
===============
The definitive man pages are the Markdown man pages. To edit them,
you need to understand the syntax used in these files.
The canonical reference for Markdown is here:
http://daringfireball.net/projects/markdown/syntax
Note, however, that the PMIx Markdown man pages are served via
the Github Pages web servers, which use a system called Jekyll to
render the Markdown into HTML (https://github.com/jekyll/jekyll).
As such, there are a few Jekyll annotations in the PMIx Markdown
pages (so that they can be served up properly from Github's web
servers).
If you're familiar with Markdown, you should be ok. But there are a
small number differences and quirks with which you should be familiar:
1. The first few lines of each file are a YAML header and include
directive for Jekyll. DO NOT REMOVE THIS HEADER (or the file will
not render to HTML properly when served up from Github's web
servers). Here's a sample YAML header from pmix.7.md:
---
layout: page
title: PMIx(7)
tagline: PMIx Programmer's Manual
---
{% include JB/setup %}
The whole block is needed, and it must be the first input in the
file.
2. In Github-flavored Markdown, you may be used to using "fenced
blocks" for multi-line code blocks, like this:
```c
void my_c_code(void) {
int i;
/* Hello, world */
}
```
Such fenced blocks will not work in Jekyll. Instead, you must
delineate your code blocks with Jekyll delimiters:
{% highlight c %}
void my_c_code(void) {
int i;
/* Hello, world */
}
{% endhighlight %}
This will result in a pretty code box in the rendered HTML output,
and it will be syntax highlighted for the C language. Leave the
"c" out of the first directive if your multi-line block is not C
code, and then it won't do C syntax highlighting.
3. The PMIx man pages are full of 2-level lists of things. E.g.,
lists of functions, and then in some of the functions, there is a
sub-list of flags that can be used with that function.
The convention used in the PMIx man pages is to highlight a
word/phrase representing each list item. Then use a ":" to start
the next line that describes that item. For example:
*PMIX_FLOAT*
: A single-precision floating point value (IEEE 754).
This will make the token "PMIX_FLOAT" be highlighted in both
HTML and nroff output, and then the paragraph that comes after it
will be properly delimited and indented.
To make a sub-list inside an item, use the same format, but prefix
the sub-list items with "-", like this:
*scope*
: Flag that controls the visible scope of the data.
- *PMIX_GLOBAL*
: Indicates that the data is to be visible to all applications executed
by this user.
4. There may be a small number of places in the PMIx man pages where
there are unnumbered lists with deliberate line breaks. For
example:
foo / bar
baz / goo
: Something really intelligent
Note the first line is "foo / bar", and then there is
a deliberate line break, and then the second line is "baz / goo".
To effect the deliberate line break, you have to put two blank
spaces after "bar". To show that graphically (showing "_"
for " "):
foo / bar__
baz / goo
: Something really intelligent
5. The "SEE ALSO" items at the end of each man page are linked to
their corresponding man pages. Note that the links are made to
".html" files -- *not* ".md" files. If you care, the reason is
because the Github web servers statically generate .html files from
the .md files when you git push to the gh-pages branch. Hence, the
man pages are actually served from static .html files on the Github
web servers.
Also, since links are meaningless in nroff, they are effectively
ignored in the resulting nroff output.
Workflow
========
The workflow is like this:
1. Developer edits .<digit>.md files for new changes.
2. In a perfect world, the developer makes perfect edits and pushes
the changes up to `master`. An automated cron job will eventually
notice the new pages, and do two things:
2a. Copy the modified Markdown pages to the `gh-master` branch (so
that they go live on the web site).
2b. Re-generate any relevant nroff man pages in `master`.
The automated cron job actually does exist and does these things,
but it should only be relied upon once a developer is sure that
their changes to the Markdown man pages are correct.
3. To check that the changes will render properly, developers should
do two things:
3a. Run "make nroff". This will convert all the Markdown man pages
into nroff man pages (in the man/ directory). Check to ensure
that your changes look appropriate in the rendered nroff
output.
*CAUTION* The "pandoc" utility is used to generate the nroff
files from the Markdown source. Different versions of pandoc
will generate slightly different nroff output. Meaning: when
you run "make nroff", you might end up changing every nroff man
page, simply because your version of pandoc is different than
the last person who ran it. Please only check in your changes,
if possible.
3b. Check out the `gh-pages` branch from PMIx and copy any
modified Markdown pages into the "master/man" directory (i.e.,
the directory for man pages from the master development
branch).
Then run the "jekyll serve" command from the top-level
directory in `gh-pages`. This runs a local web server on your
computer and renders the Markdown files into HTML such that you
can point a browser to http://127.0.0.1:4000 and see the web
site.
If you make any changes to files in the tree where "jekyll" is
running, Jekyll will notice the changes and automatically
re-generate the relevant HTML. Meaning: you can just refresh
the page from http://127.0.0.1:4000 in your browser and you'll
see your changes -- there's no need to restart Jekyll to force
it to notice new changes.

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

@ -1,62 +0,0 @@
.TH "pmix_abort" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Abort \- Abort the specified processes
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
pmix\\_status\\_t\ PMIx\\_Abort(int\ status,\ const\ char\ msg[],
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pmix\\_proc\\_t\ procs[],\ size_t\ nprocs);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]status\f[] : Status value to be returned.
A value of zero is permitted by PMIx, but may not be returned by some
resource managers.
.PP
\f[I]msg\f[] : A string message to be displayed
.PP
\f[I]procs\f[] : An array of pmix_proc_t structures defining the
processes to be aborted.
A \f[I]NULL\f[] for the proc array indicates that all processes in the
caller\[aq]s nspace are to be aborted.
A wildcard value for the rank in any structure indicates that all
processes in that nspace are to be aborted.
.PP
\f[I]nprocs\f[] : Number of pmix_proc_t structures in the \f[I]procs\f[]
array
.SH DESCRIPTION
.PP
Request that the provided array of procs be aborted, returning the
provided \f[I]status\f[] and printing the provided message.
A \f[I]NULL\f[] for the proc array indicates that all processes in the
caller\[aq]s nspace are to be aborted.
.PP
The response to this request is somewhat dependent on the specific
resource manager and its configuration (e.g., some resource managers
will not abort the application if the provided \f[I]status\f[] is zero
unless specifically configured to do so), and thus lies outside the
control of PMIx itself.
However, the client will inform the RM of the request that the
application be aborted, regardless of the value of the provided
\f[I]status\f[].
.PP
Passing a \f[I]NULL\f[] msg parameter is allowed.
Note that race conditions caused by multiple processes calling
PMIx_Abort are left to the server implementation to resolve with regard
to which status is returned and what messages (if any) are printed.
.SH RETURN VALUE
.PP
Returns PMIX_SUCCESS on success.
On error, a negative value corresponding to a PMIx errno is returned.
.SH ERRORS
.PP
PMIx errno values are defined in \f[C]pmix_common.h\f[].
.SH NOTES
.SH SEE ALSO
.SH AUTHORS
PMIx.

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

@ -1,35 +0,0 @@
.TH "pmix_commit" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Commit \- Push all previously \f[I]PMIx_Put\f[] values to the local
PMIx server.
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
pmix\\_status\\_t\ PMIx_Commit(void);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]none\f[]
.SH DESCRIPTION
.PP
This is an asynchronous operation \- the library will immediately return
to the caller while the data is transmitted to the local server in the
background
.SH RETURN VALUE
.PP
Returns PMIX_SUCCESS on success.
On error, a negative value corresponding to a PMIx errno is returned.
.SH ERRORS
.PP
PMIx errno values are defined in \f[C]pmix_common.h\f[].
.SH NOTES
.SH SEE ALSO
.PP
\f[C]PMIx_Put\f[](3)
.SH AUTHORS
PMIx.

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

@ -1,45 +0,0 @@
.TH "pmix_finalize" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Finalize \- Finalize the PMIx Client
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
pmix\\_status\\_t\ PMIx\\_Finalize(const\ pmix\\_info\\_t\ info[],\ size_t\ ninfo);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]info\f[] : An optional array of pmix_info_t structures
.PP
\f[I]ninfo\f[] : Number of pmix_info_t structures in the pmix_info_t
array
.SH DESCRIPTION
.PP
Finalize the PMIx client, closing the connection with the local PMIx
server and releasing all malloc\[aq]d memory.
.PP
The info array is used to pass user requests regarding the fence
operation.
This can include:
.IP "(a)" 4
PMIX_EMBED_BARRIER \- By default, \f[I]PMIx_Finalize\f[] does not
include an internal barrier operation.
This attribute directs \f[I]PMIx_Finalize\f[] to execute a barrier as
part of the finalize operation.
.SH RETURN VALUE
.PP
Returns PMIX_SUCCESS on success.
On error, a negative value corresponding to a PMIx errno is returned.
.SH ERRORS
.PP
PMIx errno values are defined in \f[C]pmix_common.h\f[].
.SH NOTES
.SH SEE ALSO
.PP
\f[C]PMIx_Init\f[](3)
.SH AUTHORS
PMIx.

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

@ -1,52 +0,0 @@
.TH "pmix_init" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Init \- Initialize the PMIx Client
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
pmix\\_status\\_t\ PMIx_Init(pmix\\_proc\\_t\ *proc);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]proc\f[] : Pointer to a pmix_proc_t object in which the
client\[aq]s namespace and rank are to be returned.
.SH DESCRIPTION
.PP
Initialize the PMIx client, returning the process identifier assigned to
this client\[aq]s application in the provided pmix_proc_t struct.
Passing a value of \f[I]NULL\f[] for this parameter is allowed if the
user wishes solely to initialize the PMIx system and does not require
return of the identifier at that time.
.PP
When called, the PMIx client will check for the required connection
information of the local PMIx server and will establish the connection.
If the information is not found, or the server connection fails, then an
appropriate error constant will be returned.
.PP
If successful, the function will return PMIX_SUCCESS and will fill the
provided structure with the server\-assigned namespace and rank of the
process within the application.
In addition, all startup information provided by the resource manager
will be made available to the client process via subsequent calls to
\f[I]PMIx_Get\f[].
.PP
Note that the PMIx client library is referenced counted, and so multiple
calls to PMIx_Init are allowed.
Thus, one way to obtain the namespace and rank of the process is to
simply call PMIx_Init with a non\-NULL parameter.
.SH RETURN VALUE
.PP
Returns PMIX_SUCCESS on success.
On error, a negative value corresponding to a PMIx errno is returned.
.SH ERRORS
.PP
PMIx errno values are defined in \f[C]pmix_common.h\f[].
.SH NOTES
.SH SEE ALSO
.SH AUTHORS
PMIx.

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

@ -1,30 +0,0 @@
.TH "pmix_initialized" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Initialized \- Check if \f[I]PMIx_Init\f[] has been called
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
int\ PMIx_Initialized(void);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]none\f[]
.SH DESCRIPTION
.PP
Check to see if the PMIx Client library has been intialized
.SH RETURN VALUE
.PP
Returns \f[I]true\f[] if the PMIx Client has been initialized, and
\f[I]false\f[] if not.
.SH ERRORS
.SH NOTES
.SH SEE ALSO
.PP
\f[C]PMIx_Init\f[](3)
.SH AUTHORS
PMIx.

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

@ -1,60 +0,0 @@
.TH "pmix_put" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx_Put \- Push a value into the client\[aq]s namespace
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
pmix\\_status\\_t\ PMIx\\_Init(pmix\\_scope\\_t\ scope,\ const\ char\ key[],\ pmix\\_value\\_t\ *val);
\f[]
.fi
.SH ARGUMENTS
.PP
\f[I]scope\f[] : Defines a scope for data "put" by PMI per the
following:
.IP "(a)" 4
PMI_LOCAL \- the data is intended only for other application processes
on the same node.
Data marked in this way will not be included in data packages sent to
remote requestors
.IP "(b)" 4
PMI_REMOTE \- the data is intended solely for application processes on
remote nodes.
Data marked in this way will not be shared with other processes on the
same node
.IP "(c)" 4
PMI_GLOBAL \- the data is to be shared with all other requesting
processes, regardless of location
.PP
\f[I]key\f[] : String key identifying the information.
This can be either one of the PMIx defined attributes, or a
user\-defined value
.PP
\f[I]val\f[] : Pointer to a pmix_value_t structure containing the data
to be pushed along with the type of the provided data.
.SH DESCRIPTION
.PP
Push a value into the client\[aq]s namespace.
The client library will cache the information locally until
\f[I]PMIx_Commit\f[] is called.
The provided scope value is passed to the local PMIx server, which will
distribute the data as directed.
.SH RETURN VALUE
.PP
Returns PMIX_SUCCESS on success.
On error, a negative value corresponding to a PMIx errno is returned.
.SH ERRORS
.PP
PMIx errno values are defined in \f[C]pmix_common.h\f[].
.SH NOTES
.PP
See \[aq]pmix_common.h\[aq] for definition of the pmix_value_t
structure.
.SH SEE ALSO
.PP
\f[C]PMIx_Constants\f[](7), \f[C]PMIx_Structures\f[](7)
.SH AUTHORS
PMIx.

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

@ -1,35 +0,0 @@
.TH "pmix" "7" "2015\-10\-29" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
Process Management Interface \- Exascale
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix.h>
\f[]
.fi
.SH OVERVIEW
.PP
The Process Management Interface (PMI) has been used for quite some time
as a means of exchanging wireup information needed for interprocess
communication.
Two versions (PMI\-1 and PMI\-2) have been released as part of the MPICH
effort.
While PMI\-2 demonstrates better scaling properties than its PMI\-1
predecessor, attaining rapid launch and wireup of the roughly 1M
processes executing across 100k nodes expected for exascale operations
remains challenging.
.PP
PMI Exascale (PMIx) represents an attempt to resolve these questions by
providing an extended version of the PMI standard specifically designed
to support clusters up to and including exascale sizes.
The overall objective of the project is not to branch the existing
pseudo\-standard definitions \- in fact, PMIx fully supports both of the
existing PMI\-1 and PMI\-2 APIs \- but rather to (a) augment and extend
those APIs to eliminate some current restrictions that impact
scalability, and (b) provide a reference implementation of the
PMI\-server that demonstrates the desired level of scalability.
.SH SEE ALSO
.SH AUTHORS
PMIx.

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

@ -1,79 +0,0 @@
.TH "pmix_constants" "7" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
.SH NAME
.PP
PMIx Constants
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <pmix_common.h>
\f[]
.fi
.SH OVERVIEW
.PP
PMIx relies on the following types of constants:
.PP
\f[I]Maximum Sizes\f[] : In order to minimize malloc performance
penalties, PMIx utilizes constant\-sized arrays wherever possible.
These constants provide the user with the maximum size of the various
array types.
.PP
\f[I]Attributes\f[] : .
.PP
\f[I]Errors\f[] : PMIx uses negative error constants, with 0 indicating
"success".
.SH MAXIMUM SIZES
.PP
The .
.PP
\f[I]PMIX_MAX_NSLEN\f[] : The maximum length of a namespace.
Note that any declaration of an array to hold a key string must include
one extra space for the terminating \f[I]NULL\f[].
.PP
\f[I]PMIX_MAX_KEYLEN\f[] : Maximum length of the key string used in
structures such as the \f[I]pmix\f[]info_t_.
Note that any declaration of an array to hold a key string must include
one extra space for the terminating \f[I]NULL\f[].
.SH ATTRIBUTES
.PP
Define a set of "standard" PMIx attributes that can be queried using the
PMIx_Get function.
Implementations (and users) are free to extend as desired \- thus,
functions calling PMIx_Get must be capable of handling the "not found"
condition.
Note that these are attributes of the system and the job as opposed to
values the application (or underlying programming library) might choose
to expose \- i.e., they are values provided by the resource manager as
opposed to the application.
Thus, these keys are RESERVED for use by PMIx, and users should avoid
defining any attribute starting with the keyword \f[I]PMIX\f[].
.PP
A list of the current PMIx attributes, and the type of their associated
data value, is provided here.
.PP
\f[I]PMIX_ATTR_UNDEF (NULL)\f[] : Used to initialize an attribute field,
indicating that the attribute has not yet been assigned.
.PP
\f[I]PMIX_USERID (uint32_t)\f[] : .
.PP
\f[I]PMIX_GRPID (uint32_t)\f[] : An access domain represents a single
logical connection into a fabric.
It may map to a single physical or virtual NIC or a port.
An access domain defines the boundary across which fabric resources may
be associated.
Each access domain belongs to a single fabric domain.
.PP
\f[I]PMIX_CPUSET (char*)\f[] : .
.SH ERROR CONSTANTS
.PP
\&.
.PP
\f[I]PMIX_SUCCESS\f[] : Indicates that the operation was successful.
.PP
\f[I]PMIX_ERROR\f[] : A general error code \- an error occurred, but no
specific reason can be provided.
.SH SEE ALSO
.PP
\f[C]pmix\f[](7)
.SH AUTHORS
PMIx.

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

@ -1,39 +0,0 @@
/*
* This file is autogenerated by autogen.pl. Do not edit this file by hand.
*/
#ifndef PMIX_FRAMEWORKS_H
#define PMIX_FRAMEWORKS_H
#include <src/mca/base/pmix_mca_base_framework.h>
extern pmix_mca_base_framework_t pmix_bfrops_base_framework;
extern pmix_mca_base_framework_t pmix_gds_base_framework;
extern pmix_mca_base_framework_t pmix_pdl_base_framework;
extern pmix_mca_base_framework_t pmix_pif_base_framework;
extern pmix_mca_base_framework_t pmix_pinstalldirs_base_framework;
extern pmix_mca_base_framework_t pmix_plog_base_framework;
extern pmix_mca_base_framework_t pmix_pnet_base_framework;
extern pmix_mca_base_framework_t pmix_preg_base_framework;
extern pmix_mca_base_framework_t pmix_psec_base_framework;
extern pmix_mca_base_framework_t pmix_psensor_base_framework;
extern pmix_mca_base_framework_t pmix_pshmem_base_framework;
extern pmix_mca_base_framework_t pmix_ptl_base_framework;
static pmix_mca_base_framework_t *pmix_frameworks[] = {
&pmix_bfrops_base_framework,
&pmix_gds_base_framework,
&pmix_pdl_base_framework,
&pmix_pif_base_framework,
&pmix_pinstalldirs_base_framework,
&pmix_plog_base_framework,
&pmix_pnet_base_framework,
&pmix_preg_base_framework,
&pmix_psec_base_framework,
&pmix_psensor_base_framework,
&pmix_pshmem_base_framework,
&pmix_ptl_base_framework,
NULL
};
#endif /* PMIX_FRAMEWORKS_H */

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

@ -2057,10 +2057,10 @@ static pmix_status_t _dstore_fetch(pmix_common_dstore_ctx_t *ds_ctx,
/* all segment data updated, ctx lock may released */
if (lock_is_set) {
lock_is_set = false;
if (0 != (rc = pthread_mutex_unlock(&ds_ctx->lock))) {
goto error;
}
lock_is_set = false;
}
while (nprocs--) {

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

@ -4,6 +4,8 @@
* Copyright (c) 2016 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2018 IBM Corporation. All rights reserved.
* Copyright (c) 2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*
* $COPYRIGHT$
*
@ -106,6 +108,7 @@ pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
PMIX_BFROPS_UNPACK(rc, pmix_globals.mypeer,
buff, &bo, &cnt, PMIX_BYTE_OBJECT);
while (PMIX_SUCCESS == rc) {
PMIX_CONSTRUCT(&bkt, pmix_buffer_t);
PMIX_LOAD_BUFFER(pmix_globals.mypeer, &bkt, bo.bytes, bo.size);
/* unpack the data collection flag */
cnt = 1;
@ -113,10 +116,12 @@ pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
&bkt, &byte, &cnt, PMIX_BYTE);
if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER == rc) {
/* no data was returned, so we are done with this blob */
PMIX_DESTRUCT(&bkt);
break;
}
if (PMIX_SUCCESS != rc) {
/* we have an error */
PMIX_DESTRUCT(&bkt);
goto error;
}
@ -124,6 +129,7 @@ pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
if (have_ctype) {
if (ctype != (pmix_collect_t)byte) {
rc = PMIX_ERR_INVALID_ARG;
PMIX_DESTRUCT(&bkt);
goto error;
}
}
@ -145,6 +151,7 @@ pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
* of its presence. */
rc = cb_fn(cbdata, (struct pmix_namespace_t *)ns, cbs, &bo2);
if (PMIX_SUCCESS != rc) {
PMIX_DESTRUCT(&bkt);
goto error;
}
PMIX_BYTE_OBJECT_DESTRUCT(&bo2);
@ -153,6 +160,7 @@ pmix_status_t pmix_gds_base_store_modex(struct pmix_namespace_t *nspace,
PMIX_BFROPS_UNPACK(rc, pmix_globals.mypeer,
&bkt, &bo2, &cnt, PMIX_BYTE_OBJECT);
}
PMIX_DESTRUCT(&bkt);
if (PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER == rc) {
rc = PMIX_SUCCESS;
} else if (PMIX_SUCCESS != rc) {

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

@ -188,6 +188,7 @@ pmix_status_t lookup_fn(const pmix_proc_t *proc, char **keys,
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
{
size_t i, ndata, ret;
pmix_status_t rc = PMIX_SUCCESS;
pmix_pdata_t *pdata;
pmix_test_info_t *tinfo;
if (NULL == pmix_test_published_list) {
@ -210,13 +211,15 @@ pmix_status_t lookup_fn(const pmix_proc_t *proc, char **keys,
}
}
if (ret != ndata) {
return PMIX_ERR_NOT_FOUND;
rc = PMIX_ERR_NOT_FOUND;
goto error;
}
if (NULL != cbfunc) {
cbfunc(PMIX_SUCCESS, pdata, ndata, cbdata);
}
error:
PMIX_PDATA_FREE(pdata, ndata);
return PMIX_SUCCESS;
return rc;
}
pmix_status_t unpublish_fn(const pmix_proc_t *proc, char **keys,

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

@ -298,12 +298,13 @@ static size_t server_pack_procs(int server_id, char **buf, size_t size)
static void remove_server_item(server_info_t *server)
{
pmix_list_remove_item(server_list, &server->super);
PMIX_DESTRUCT_LOCK(&server->lock);
PMIX_RELEASE(server);
}
static int srv_wait_all(double timeout)
{
server_info_t *server;
server_info_t *server, *next;
pid_t pid;
int status;
struct timeval tv;
@ -314,18 +315,20 @@ static int srv_wait_all(double timeout)
start_time = tv.tv_sec + 1E-6*tv.tv_usec;
cur_time = start_time;
/* Remove this server from the list */
PMIX_LIST_FOREACH_SAFE(server, next, server_list, server_info_t) {
if (server->pid == getpid()) {
/* remove himself */
remove_server_item(server);
break;
}
}
while (!pmix_list_is_empty(server_list) &&
(timeout >= (cur_time - start_time))) {
struct timespec ts;
/* going through the server list first to delete yourself */
pid = waitpid(-1, &status, 0);
if (pid >= 0) {
PMIX_LIST_FOREACH(server, server_list, server_info_t) {
if (server->pid == getpid()) {
/* remove himself */
remove_server_item(server);
continue;
}
PMIX_LIST_FOREACH_SAFE(server, next, server_list, server_info_t) {
if (server->pid == pid) {
TEST_VERBOSE(("server %d finalize PID:%d with status %d", server->idx,
server->pid, WEXITSTATUS(status)));
@ -334,15 +337,9 @@ static int srv_wait_all(double timeout)
}
}
}
ts.tv_sec = 0;
ts.tv_nsec = 100000;
nanosleep(&ts, NULL);
// calculate current timestamp
gettimeofday(&tv, NULL);
cur_time = tv.tv_sec + 1E-6*tv.tv_usec;
pid = waitpid(-1, &status, WNOHANG);
}
return ret;
@ -384,6 +381,9 @@ static int server_send_msg(msg_hdr_t *msg_hdr, char *data, size_t size)
break;
}
}
if (NULL == server) {
abort();
}
} else {
server = (server_info_t *)pmix_list_get_first(server_list);
}
@ -427,10 +427,7 @@ static int server_send_procs(void)
server->modex_cbfunc = _send_procs_cb;
server->cbdata = (void*)server;
PMIX_CONSTRUCT_LOCK(&server->lock);
if (PMIX_SUCCESS != (rc = server_send_msg(&msg_hdr, buf, msg_hdr.size))) {
PMIX_DESTRUCT_LOCK(&server->lock);
if (buf) {
free(buf);
}
@ -441,8 +438,6 @@ static int server_send_procs(void)
}
PMIX_WAIT_THREAD(&server->lock);
PMIX_DESTRUCT_LOCK(&server->lock);
return PMIX_SUCCESS;
}
@ -463,15 +458,11 @@ int server_barrier(double to)
msg_hdr.src_id = my_server_id;
msg_hdr.size = 0;
PMIX_CONSTRUCT_LOCK(&server->lock);
if (PMIX_SUCCESS != (rc = server_send_msg(&msg_hdr, NULL, 0))) {
PMIX_DESTRUCT_LOCK(&server->lock);
return PMIX_ERROR;
}
WAIT_THREAD(&server->lock, to, rc);
PMIX_DESTRUCT_LOCK(&server->lock);
if (rc == ETIMEDOUT) {
TEST_ERROR(("timeout waiting from %d", server->idx));
return PMIX_ERROR;
@ -580,8 +571,12 @@ static void server_read_cb(evutil_socket_t fd, short event, void *arg)
msg_buf = NULL;
break;
case CMD_DMDX_REQUEST: {
int *sender_id = (int*)malloc(sizeof(int));
int *sender_id;
pmix_proc_t proc;
if (NULL == msg_buf) {
abort();
}
sender_id = (int*)malloc(sizeof(int));
server_unpack_dmdx(msg_buf, sender_id, &proc);
TEST_VERBOSE(("%d: CMD_DMDX_REQUEST from %d: %s:%d", my_server_id,
*sender_id, proc.nspace, proc.rank));
@ -692,9 +687,10 @@ int server_dmdx_get(const char *nspace, int rank,
{
server_info_t *server = NULL, *tmp;
msg_hdr_t msg_hdr;
int rc = PMIX_SUCCESS;
pmix_status_t rc = PMIX_SUCCESS;
char *buf = NULL;
if (0 > (msg_hdr.dst_id = server_find_id(nspace, rank))) {
TEST_ERROR(("%d: server cannot found for %s:%d", my_server_id, nspace, rank));
goto error;
@ -722,10 +718,10 @@ int server_dmdx_get(const char *nspace, int rank,
server->cbdata = cbdata;
if (PMIX_SUCCESS != (rc = server_send_msg(&msg_hdr, buf, msg_hdr.size))) {
return PMIX_ERROR;
rc = PMIX_ERROR;
}
return PMIX_SUCCESS;
free(buf);
return rc;
error:
cbfunc(PMIX_ERROR, NULL, 0, cbdata, NULL, 0);
@ -769,6 +765,7 @@ int server_init(test_params *params)
server_info->wr_fd = fd2[1];
close(fd1[1]);
close(fd2[0]);
PMIX_CONSTRUCT_LOCK(&server_info->lock);
pmix_list_append(server_list, &server_info->super);
break;
}
@ -776,6 +773,7 @@ int server_init(test_params *params)
server_info->pid = pid;
server_info->wr_fd = fd1[1];
server_info->rd_fd = fd2[0];
PMIX_CONSTRUCT_LOCK(&server_info->lock);
close(fd1[0]);
close(fd2[1]);
} else {
@ -784,6 +782,7 @@ int server_init(test_params *params)
server_info->idx = 0;
server_info->rd_fd = fd1[0];
server_info->wr_fd = fd1[1];
PMIX_CONSTRUCT_LOCK(&server_info->lock);
close(fd2[0]);
close(fd2[1]);
}