Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 09:21:25

0001 /* include/pmix_common.h.  Generated from pmix_common.h.in by configure.  */
0002 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0003 /*
0004  * Copyright (c) 2013-2020 Intel, Inc.  All rights reserved.
0005  * Copyright (c) 2016-2019 Research Organization for Information Science
0006  *                         and Technology (RIST).  All rights reserved.
0007  * Copyright (c) 2016-2022 IBM Corporation.  All rights reserved.
0008  * Copyright (c) 2016-2019 Mellanox Technologies, Inc.
0009  *                         All rights reserved.
0010  * Copyright (c) 2021      Triad National Security, LLC. All rights
0011  *                         reserved.
0012  *
0013  *
0014  * Redistribution and use in source and binary forms, with or without
0015  * modification, are permitted provided that the following conditions are
0016  * met:
0017  *
0018  * - Redistributions of source code must retain the above copyright
0019  *   notice, this list of conditions and the following disclaimer.
0020  *
0021  * - Redistributions in binary form must reproduce the above copyright
0022  *   notice, this list of conditions and the following disclaimer listed
0023  *   in this license in the documentation and/or other materials
0024  *   provided with the distribution.
0025  *
0026  * - Neither the name of the copyright holders nor the names of its
0027  *   contributors may be used to endorse or promote products derived from
0028  *   this software without specific prior written permission.
0029  *
0030  * The copyright holders provide no reassurances that the source code
0031  * provided does not infringe any patent, copyright, or any other
0032  * intellectual property rights of third parties.  The copyright holders
0033  * disclaim any liability to any recipient for claims brought against
0034  * recipient by any third party for infringement of that parties
0035  * intellectual property rights.
0036  *
0037  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0038  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0039  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0040  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0041  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0042  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0043  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0044  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0045  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0046  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0047  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0048  *
0049  * Copyright (c) 2020      Cisco Systems, Inc.  All rights reserved
0050  * Copyright (c) 2021-2024 Nanook Consulting  All rights reserved.
0051  * $COPYRIGHT$
0052  *
0053  * Additional copyrights may follow
0054  *
0055  * $HEADER$
0056  */
0057 
0058 #ifndef PMIx_COMMON_H
0059 #define PMIx_COMMON_H
0060 
0061 #include <stdbool.h>
0062 #include <stdlib.h>
0063 #include <stdint.h>
0064 #include <stdio.h>
0065 #include <string.h>
0066 #include <time.h>
0067 #include <ctype.h>
0068 #include <sys/time.h> /* for struct timeval */
0069 #include <unistd.h> /* for uid_t and gid_t */
0070 #include <sys/types.h> /* for uid_t and gid_t */
0071 
0072 /* Whether C compiler supports -fvisibility */
0073 #define PMIX_HAVE_VISIBILITY 1
0074 
0075 #if PMIX_HAVE_VISIBILITY == 1
0076 #define PMIX_EXPORT __attribute__((__visibility__("default")))
0077 #else
0078 #define PMIX_EXPORT
0079 #endif
0080 
0081 
0082 #include <pmix_version.h>
0083 
0084 #if defined(c_plusplus) || defined(__cplusplus)
0085 extern "C" {
0086 #endif
0087 
0088 /****  PMIX CONSTANTS    ****/
0089 
0090 /* define maximum value and key sizes */
0091 #define PMIX_MAX_NSLEN     255
0092 #define PMIX_MAX_KEYLEN    511
0093 
0094 /* define abstract types for namespaces and keys */
0095 typedef char pmix_nspace_t[PMIX_MAX_NSLEN+1];
0096 typedef char pmix_key_t[PMIX_MAX_KEYLEN+1];
0097 
0098 /* define a type for rank values */
0099 typedef uint32_t pmix_rank_t;
0100 
0101 /* define a value for requests for job-level data
0102  * where the info itself isn't associated with any
0103  * specific rank, or when a request involves
0104  * a rank that isn't known - e.g., when someone requests
0105  * info thru one of the legacy interfaces where the rank
0106  * is typically encoded into the key itself since there is
0107  * no rank parameter in the API itself */
0108 #define PMIX_RANK_UNDEF     UINT32_MAX
0109 /* define a value to indicate that the user wants the
0110  * data for the given key from every rank that posted
0111  * that key */
0112 #define PMIX_RANK_WILDCARD  UINT32_MAX-1
0113 /* other special rank values will be used to define
0114  * groups of ranks for use in collectives */
0115 #define PMIX_RANK_LOCAL_NODE    UINT32_MAX-2        // all ranks on local node
0116 #define PMIX_RANK_LOCAL_PEERS   UINT32_MAX-4        // all peers (i.e., all procs within the same nspace) on local node
0117 /* define an invalid value */
0118 #define PMIX_RANK_INVALID   UINT32_MAX-3
0119 /* define a boundary for valid ranks */
0120 #define PMIX_RANK_VALID         UINT32_MAX-50
0121 /* define a macro for testing for valid ranks */
0122 #define PMIX_RANK_IS_VALID(r)   \
0123     ((r) < PMIX_RANK_VALID)
0124 
0125 /* define a value to indicate that data applies
0126  * to all apps in a job */
0127 #define PMIX_APP_WILDCARD  UINT32_MAX
0128 
0129 /****  PMIX ENVIRONMENTAL PARAMETERS  ****/
0130 /* URI of tool waiting for launcher to rendezvous back to it */
0131 #define PMIX_LAUNCHER_RNDZ_URI "PMIX_LAUNCHER_RNDZ_URI"
0132 
0133 /* PMIX_LAUNCHER_RNDZ_FILE - if set, contains the full pathname
0134  * of a file the launcher is to write that contains its connection info.
0135  * Works in addition to anything else the launcher may output.
0136  */
0137 #define PMIX_LAUNCHER_RNDZ_FILE "PMIX_LAUNCHER_RNDZ_FILE"
0138 
0139 /* pipe to be monitored that indicates when the parent process
0140  * terminates - used by fork'd tools to identify when the tool
0141  * that started them has died */
0142 #define PMIX_KEEPALIVE_PIPE "PMIX_KEEPALIVE_PIPE"
0143 
0144 
0145 /* define a set of "standard" PMIx attributes that can
0146  * be queried. Implementations (and users) are free to extend as
0147  * desired, so the get functions need to be capable
0148  * of handling the "not found" condition. Note that these
0149  * are attributes of the system and the job as opposed to
0150  * values the application (or underlying MPI library)
0151  * might choose to expose - i.e., they are values provided
0152  * by the resource manager as opposed to the application. Thus,
0153  * these keys are RESERVED */
0154 #define PMIX_ATTR_UNDEF      "pmix.undef"
0155 
0156 /* initialization attributes */
0157 #define PMIX_EXTERNAL_PROGRESS              "pmix.evext"            // (bool) The host shall progress the PMIx library via
0158                                                                     //        calls to PMIx_Progress
0159 #define PMIX_EXTERNAL_AUX_EVENT_BASE        "pmix.evaux"            // (void*) event base to be used for auxiliary
0160                                                                     //        functions (e.g., capturing signals) that would
0161                                                                     //        otherwise interfere with the host
0162 #define PMIX_SERVER_TOOL_SUPPORT            "pmix.srvr.tool"        // (bool) The host RM wants to declare itself as willing
0163                                                                     //        to accept tool connection requests
0164 #define PMIX_SERVER_REMOTE_CONNECTIONS      "pmix.srvr.remote"      // (bool) Allow connections from remote tools (do not use
0165                                                                     //        loopback device)
0166 #define PMIX_SERVER_SYSTEM_SUPPORT          "pmix.srvr.sys"         // (bool) The host RM wants to declare itself as being
0167                                                                     //        the local system server for PMIx connection
0168                                                                     //        requests
0169 #define PMIX_SERVER_SESSION_SUPPORT         "pmix.srvr.sess"        // (bool) The host RM wants to declare itself as being
0170                                                                     //        the local session server for PMIx connection
0171                                                                     //        requests
0172 #define PMIX_SERVER_TMPDIR                  "pmix.srvr.tmpdir"      // (char*) temp directory where PMIx server will place
0173                                                                     //        client rendezvous points and contact info
0174 #define PMIX_SYSTEM_TMPDIR                  "pmix.sys.tmpdir"       // (char*) temp directory for this system, where PMIx
0175                                                                     //        server will place tool rendezvous points and
0176                                                                     //        contact info
0177 #define PMIX_SERVER_SHARE_TOPOLOGY          "pmix.srvr.share"       // (bool) server is to share its copy of the local node
0178                                                                     // topology (whether given to it or self-discovered) with any clients.
0179 #define PMIX_SERVER_ENABLE_MONITORING       "pmix.srv.monitor"      // (bool) Enable PMIx internal monitoring by server
0180 #define PMIX_SERVER_NSPACE                  "pmix.srv.nspace"       // (char*) Name of the nspace to use for this server
0181 #define PMIX_SERVER_RANK                    "pmix.srv.rank"         // (pmix_rank_t) Rank of this server
0182 #define PMIX_SERVER_GATEWAY                 "pmix.srv.gway"         // (bool) Server is acting as a gateway for PMIx requests
0183                                                                     //        that cannot be serviced on backend nodes
0184                                                                     //        (e.g., logging to email)
0185 #define PMIX_SERVER_SYS_CONTROLLER          "pmix.srv.ctrlr"        // (bool) Server is hosted by the system controller for
0186                                                                     //        the cluster
0187 #define PMIX_SERVER_SCHEDULER               "pmix.srv.sched"        // (bool) Server is hosted by the system scheduler
0188 #define PMIX_SERVER_START_TIME              "pmix.srv.strtime"      // (char*) Time when the server started - i.e., when the server created
0189                                                                     //         it's rendezvous file (given in ctime string format)
0190 #define PMIX_HOMOGENEOUS_SYSTEM             "pmix.homo"             // (bool) The nodes comprising the session are homogeneous - i.e., they
0191                                                                     //        each contain the same number of identical packages, fabric interfaces,
0192                                                                     //        GPU, and other devices
0193 #define PMIX_SINGLETON                      "pmix.singleton"        // (char*) String representation (nspace.rank) of proc ID for the singleton
0194                                                                     //         the server was started to support
0195 #define PMIX_BIND_PROGRESS_THREAD           "pmix.bind.pt"          // (char*) Comma-delimited ranges of CPUs that the internal PMIx progress
0196                                                                     //         thread shall be bound to
0197 #define PMIX_BIND_REQUIRED                  "pmix.bind.reqd"        // (bool) Return error if the internal PMIx progress thread cannot be bound
0198 
0199 
0200 /* tool-related attributes */
0201 #define PMIX_TOOL_NSPACE                    "pmix.tool.nspace"      // (char*) Name of the nspace to use for this tool
0202 #define PMIX_TOOL_RANK                      "pmix.tool.rank"        // (uint32_t) Rank of this tool
0203 #define PMIX_SERVER_PIDINFO                 "pmix.srvr.pidinfo"     // (pid_t) pid of the target server for a tool
0204 #define PMIX_CONNECT_TO_SYSTEM              "pmix.cnct.sys"         // (bool) The requestor requires that a connection be made only to
0205                                                                     //        a local system-level PMIx server
0206 #define PMIX_CONNECT_SYSTEM_FIRST           "pmix.cnct.sys.first"   // (bool) Preferentially look for a system-level PMIx server first
0207 #define PMIX_CONNECT_TO_SCHEDULER           "pmix.cnct.sched"       // (bool) Connect to the system scheduler
0208 #define PMIX_CONNECT_TO_SYS_CONTROLLER      "pmix.cnct.ctrlr"       // (bool) Connect to the system controller
0209 #define PMIX_CONNECTION_ORDER               "pmix.cnct.ord"         // (char*) Comma-delimited list of attributes defining the order in which
0210                                                                     //        connections should be attempted, from first to last. If the
0211                                                                     //        final entry is not an "only" flag (e.g., PMIX_CONNECT_TO_SYSTEM),
0212                                                                     //        then connection will default to the local server if no preceding
0213                                                                     //        option succeeds. Thus, the following list:
0214                                                                     //              PMIX_CONNECT_TO_SCHEDULER
0215                                                                     //              PMIX_CONNECT_TO_SYS_CONTROLLER
0216                                                                     //              PMIX_CONNECT_TO_SYSTEM
0217                                                                     //        would first attempt to connect to the scheduler, then the system
0218                                                                     //        controller, and then the local system-level server. If none of those
0219                                                                     //        succeed, then the connection attempt will error out.
0220                                                                     //        However, if the last entry were PMIX_CONNECT_SYSTEM_FIRST, then the
0221                                                                     //        connection procedure would (after failing to connect to a local
0222                                                                     //        system-level server) continue to include an attempt to connect
0223                                                                     //        to any local server that accepted the connection request.
0224 #define PMIX_SERVER_URI                     "pmix.srvr.uri"         // (char*) URI of server to be contacted
0225 #define PMIX_MYSERVER_URI                   "pmix.mysrvr.uri"       // (char*) URI of this proc's listener socket
0226 #define PMIX_SERVER_HOSTNAME                "pmix.srvr.host"        // (char*) node where target server is located
0227 #define PMIX_CONNECT_MAX_RETRIES            "pmix.tool.mretries"    // (uint32_t) maximum number of times to try to connect to server
0228 #define PMIX_CONNECT_RETRY_DELAY            "pmix.tool.retry"       // (uint32_t) time in seconds between connection attempts
0229 #define PMIX_TOOL_DO_NOT_CONNECT            "pmix.tool.nocon"       // (bool) the tool wants to use internal PMIx support, but does
0230                                                                     //        not want to connect to a PMIx server
0231                                                                     //        from the specified processes to this tool
0232 #define PMIX_TOOL_CONNECT_OPTIONAL          "pmix.tool.conopt"      // (bool) tool shall connect to a server if available, but otherwise
0233                                                                     //        continue to operate unconnected
0234 #define PMIX_LAUNCHER                       "pmix.tool.launcher"    // (bool) tool is a launcher and needs rendezvous files created
0235 #define PMIX_LAUNCHER_RENDEZVOUS_FILE       "pmix.tool.lncrnd"      // (char*) Pathname of file where connection info is to be stored
0236 #define PMIX_TOOL_ATTACHMENT_FILE           "pmix.tool.attach"      // (char*) File containing connection info to be used for attaching to server
0237 #define PMIX_PRIMARY_SERVER                 "pmix.pri.srvr"         // (bool) The server to which the tool is connecting shall be designated
0238                                                                     //        the primary server once connection has been accomplished.
0239 #define PMIX_NOHUP                          "pmix.nohup"            // (bool) Any processes started on behalf of the calling tool (or the
0240                                                                     //        specified namespace, if such specification is included in the
0241                                                                     //        list of attributes) should continue after the tool disconnects
0242                                                                     //        from its server
0243 #define PMIX_LAUNCHER_DAEMON                "pmix.lnch.dmn"         // (char*) Path to executable that is to be used as the backend daemon
0244                                                                     //        for the launcher. This replaces the launcher's own daemon with
0245                                                                     //        the specified executable. Note that the user is therefore
0246                                                                     //        responsible for ensuring compatibility of the specified
0247                                                                     //        executable and the host launcher.
0248 #define PMIX_EXEC_AGENT                     "pmix.exec.agnt"        // (char*) Path to executable that the launcher's backend daemons are to
0249                                                                     //        fork/exec in place of the actual application processes. The
0250                                                                     //        launcher's daemon shall pass the full command line of the
0251                                                                     //        application on the command line of the exec agent, which shall
0252                                                                     //        not connect back to the launcher's daemon. The exec agent is
0253                                                                     //        responsible for exec'ing the specified application process in
0254                                                                     //        its own place.
0255 #define PMIX_LAUNCH_DIRECTIVES              "pmix.lnch.dirs"        // (pmix_data_array_t*) Array of pmix_info_t containing directives for
0256                                                                     //        the launcher - a convenience attribute for retrieving all
0257                                                                     //        directives with a single call to PMIx_Get
0258 
0259 /* identification attributes */
0260 #define PMIX_USERID                         "pmix.euid"             // (uint32_t) effective user id
0261 #define PMIX_GRPID                          "pmix.egid"             // (uint32_t) effective group id
0262 #define PMIX_VERSION_INFO                   "pmix.version"          // (char*) PMIx version of contactor
0263 #define PMIX_REQUESTOR_IS_TOOL              "pmix.req.tool"         // (bool) requesting process is a tool
0264 #define PMIX_REQUESTOR_IS_CLIENT            "pmix.req.client"       // (bool) requesting process is a client process
0265 #define PMIX_PSET_NAME                      "pmix.pset.nm"          // (char*) The name of the newly defined process set.
0266 #define PMIX_PSET_NAMES                     "pmix.pset.nms"         // (pmix_data_array_t*) Returns an array of string names of the
0267                                                                     //          process sets in which the given process is a member.
0268 #define PMIX_PSET_MEMBERS                   "pmix.pset.mems"        // (pmix_data_array_t*) An array of pmix_proc_t containing
0269                                                                     //          the members of the newly defined process set.
0270 #define PMIX_REINCARNATION                  "pmix.reinc"            // (uint32_t) number of times this process has been instantiated - i.e.,
0271                                                                     //            tracks the number of times it has been restarted
0272 
0273 /* model attributes */
0274 #define PMIX_PROGRAMMING_MODEL              "pmix.pgm.model"        // (char*) programming model being initialized (e.g., "MPI" or "OpenMP")
0275 #define PMIX_MODEL_LIBRARY_NAME             "pmix.mdl.name"         // (char*) programming model implementation ID (e.g., "OpenMPI" or "MPICH")
0276 #define PMIX_MODEL_LIBRARY_VERSION          "pmix.mld.vrs"          // (char*) programming model version string (e.g., "2.1.1")
0277 #define PMIX_THREADING_MODEL                "pmix.threads"          // (char*) threading model used (e.g., "pthreads")
0278 #define PMIX_MODEL_NUM_THREADS              "pmix.mdl.nthrds"       // (uint64_t) number of active threads being used by the model
0279 #define PMIX_MODEL_NUM_CPUS                 "pmix.mdl.ncpu"         // (uint64_t) number of cpus being used by the model
0280 #define PMIX_MODEL_CPU_TYPE                 "pmix.mdl.cputype"      // (char*) granularity - "hwthread", "core", etc.
0281 #define PMIX_MODEL_PHASE_NAME               "pmix.mdl.phase"        // (char*) user-assigned name for a phase in the application execution - e.g.,
0282                                                                     //         "cfd reduction"
0283 #define PMIX_MODEL_PHASE_TYPE               "pmix.mdl.ptype"        // (char*) type of phase being executed - e.g., "matrix multiply"
0284 #define PMIX_MODEL_AFFINITY_POLICY          "pmix.mdl.tap"          // (char*) thread affinity policy - e.g.:
0285                                                                     //           "master" (thread co-located with master thread),
0286                                                                     //           "close" (thread located on cpu close to master thread)
0287                                                                     //           "spread" (threads load-balanced across available cpus)
0288 
0289 /* attributes for TCP connections */
0290 #define PMIX_TCP_REPORT_URI                 "pmix.tcp.repuri"       // (char*) output URI - '-' => stdout, '+' => stderr, or filename
0291 #define PMIX_TCP_URI                        "pmix.tcp.uri"          // (char*) URI of server to connect to, or file:<name of file containing it>
0292 #define PMIX_TCP_IF_INCLUDE                 "pmix.tcp.ifinclude"    // (char*) comma-delimited list of devices and/or CIDR notation
0293 #define PMIX_TCP_IF_EXCLUDE                 "pmix.tcp.ifexclude"    // (char*) comma-delimited list of devices and/or CIDR notation
0294 #define PMIX_TCP_IPV4_PORT                  "pmix.tcp.ipv4"         // (int) IPv4 port to be used
0295 #define PMIX_TCP_IPV6_PORT                  "pmix.tcp.ipv6"         // (int) IPv6 port to be used
0296 #define PMIX_TCP_DISABLE_IPV4               "pmix.tcp.disipv4"      // (bool) true to disable IPv4 family
0297 #define PMIX_TCP_DISABLE_IPV6               "pmix.tcp.disipv6"      // (bool) true to disable IPv6 family
0298 
0299 
0300 /* general proc-level attributes */
0301 #define PMIX_CPUSET                         "pmix.cpuset"           // (char*) String representation of bitmap applied to process upon launch
0302 #define PMIX_CPUSET_BITMAP                  "pmix.bitmap"           // (pmix_cpuset_t*) Bitmap applied to process at launch
0303 #define PMIX_CREDENTIAL                     "pmix.cred"             // (char*) security credential assigned to proc
0304 #define PMIX_SPAWNED                        "pmix.spawned"          // (bool) true if this proc resulted from a call to PMIx_Spawn
0305 #define PMIX_NODE_OVERSUBSCRIBED            "pmix.ndosub"           // (bool) true if number of procs from this job on this node
0306                                                                     //        exceeds the number of slots allocated to it
0307 
0308 /* scratch directory locations for use by applications */
0309 #define PMIX_TMPDIR                         "pmix.tmpdir"           // (char*) top-level tmp dir assigned to session
0310 #define PMIX_NSDIR                          "pmix.nsdir"            // (char*) sub-tmpdir assigned to namespace
0311 #define PMIX_PROCDIR                        "pmix.pdir"             // (char*) sub-nsdir assigned to proc
0312 #define PMIX_TDIR_RMCLEAN                   "pmix.tdir.rmclean"     // (bool)  Resource Manager will clean session directories
0313 
0314 
0315 /* information about relative ranks as assigned by the RM */
0316 #define PMIX_CLUSTER_ID                     "pmix.clid"             // (char*) a string name for the cluster this proc is executing on
0317 #define PMIX_PROCID                         "pmix.procid"           // (pmix_proc_t*) process identifier
0318 #define PMIX_NSPACE                         "pmix.nspace"           // (char*) nspace of a job
0319 #define PMIX_JOBID                          "pmix.jobid"            // (char*) jobid assigned by scheduler
0320 #define PMIX_APPNUM                         "pmix.appnum"           // (uint32_t) app number within the job
0321 #define PMIX_RANK                           "pmix.rank"             // (pmix_rank_t) process rank within the job
0322 #define PMIX_GLOBAL_RANK                    "pmix.grank"            // (pmix_rank_t) rank spanning across all jobs in this session
0323 #define PMIX_APP_RANK                       "pmix.apprank"          // (pmix_rank_t) rank within this app
0324 #define PMIX_NPROC_OFFSET                   "pmix.offset"           // (pmix_rank_t) starting global rank of this job
0325 #define PMIX_LOCAL_RANK                     "pmix.lrank"            // (uint16_t) rank on this node within this job
0326 #define PMIX_NODE_RANK                      "pmix.nrank"            // (uint16_t) rank on this node spanning all jobs
0327 #define PMIX_PACKAGE_RANK                   "pmix.pkgrank"          // (uint16_t) rank within this job on the package where this proc resides
0328 #define PMIX_LOCALLDR                       "pmix.lldr"             // (pmix_rank_t) lowest rank on this node within this job
0329 #define PMIX_APPLDR                         "pmix.aldr"             // (pmix_rank_t) lowest rank in this app within this job
0330 #define PMIX_PROC_PID                       "pmix.ppid"             // (pid_t) pid of specified proc
0331 #define PMIX_SESSION_ID                     "pmix.session.id"       // (uint32_t) session identifier
0332 #define PMIX_NODE_LIST                      "pmix.nlist"            // (char*) comma-delimited list of nodes running procs for the specified nspace
0333 #define PMIX_ALLOCATED_NODELIST             "pmix.alist"            // (char*) comma-delimited list of all nodes in this allocation regardless of
0334                                                                     //         whether or not they currently host procs.
0335 #define PMIX_HOSTNAME                       "pmix.hname"            // (char*) name of the host the specified proc is on
0336 #define PMIX_HOSTNAME_ALIASES               "pmix.alias"            // (char*) comma-delimited list of names by which this node is known
0337 #define PMIX_HOSTNAME_KEEP_FQDN             "pmix.fqdn"             // (bool) FQDN hostnames are being retained
0338 #define PMIX_NODEID                         "pmix.nodeid"           // (uint32_t) node identifier where the specified proc is located
0339 #define PMIX_LOCAL_PEERS                    "pmix.lpeers"           // (char*) comma-delimited string of ranks on this node within the specified nspace
0340 #define PMIX_LOCAL_PROCS                    "pmix.lprocs"           // (pmix_data_array_t*) array of pmix_proc_t of procs on the specified node
0341 #define PMIX_LOCAL_CPUSETS                  "pmix.lcpus"            // (char*) colon-delimited cpusets of local peers within the specified nspace
0342 #define PMIX_PARENT_ID                      "pmix.parent"           // (pmix_proc_t*) identifier of the process that called PMIx_Spawn
0343                                                                     //                to launch this proc's application
0344 #define PMIX_EXIT_CODE                      "pmix.exit.code"        // (int) exit code returned when proc terminated
0345 
0346 /* size info */
0347 #define PMIX_UNIV_SIZE                      "pmix.univ.size"        // (uint32_t) #slots in this session
0348 #define PMIX_JOB_SIZE                       "pmix.job.size"         // (uint32_t) #procs in this job
0349 #define PMIX_JOB_NUM_APPS                   "pmix.job.napps"        // (uint32_t) #apps in this job
0350 #define PMIX_APP_SIZE                       "pmix.app.size"         // (uint32_t) #procs in this application
0351 #define PMIX_LOCAL_SIZE                     "pmix.local.size"       // (uint32_t) #procs in this job on this node
0352 #define PMIX_NODE_SIZE                      "pmix.node.size"        // (uint32_t) #procs across all jobs on this node
0353 #define PMIX_MAX_PROCS                      "pmix.max.size"         // (uint32_t) max #procs for this job
0354 #define PMIX_NUM_SLOTS                      "pmix.num.slots"        // (uint32_t) #slots allocated
0355 #define PMIX_NUM_NODES                      "pmix.num.nodes"        // (uint32_t) #nodes currently hosting processes in the specified realm.
0356 #define PMIX_NUM_ALLOCATED_NODES            "pmix.num.anodes"       // (uint32_t) #nodes in the specified realm regardless of whether or
0357                                                                     //            not they currently host processes.
0358 
0359 /* Memory info */
0360 #define PMIX_AVAIL_PHYS_MEMORY              "pmix.pmem"             // (uint64_t) total available physical memory on this node
0361 #define PMIX_DAEMON_MEMORY                  "pmix.dmn.mem"          // (float) Mbytes of memory currently used by daemon
0362 #define PMIX_CLIENT_AVG_MEMORY              "pmix.cl.mem.avg"       // (float) Average Mbytes of memory used by client processes
0363 
0364 
0365 /* topology info */
0366 #define PMIX_TOPOLOGY2                      "pmix.topo2"            // (pmix_topology_t*) pointer to a PMIx topology object
0367 #define PMIX_LOCALITY_STRING                "pmix.locstr"           // (char*) string describing a proc's location
0368 #define PMIX_TOPOLOGY_INDEX                 "pmix.topo.index"       // (int)  index of a topology in a storage array
0369 
0370 
0371 /* request-related info */
0372 #define PMIX_COLLECT_DATA                   "pmix.collect"          // (bool) collect data and return it at the end of the operation
0373 #define PMIX_ALL_CLONES_PARTICIPATE         "pmix.clone.part"       // (bool) All clones of the calling process must participate in the collective operation.
0374 #define PMIX_COLLECT_GENERATED_JOB_INFO     "pmix.collect.gen"      // (bool) Collect all job-level information (i.e., reserved keys) that was locally
0375                                                                     //        generated by PMIx servers. Some job-level information (e.g., distance between
0376                                                                     //        processes and fabric devices) is best determined on a distributed basis as it
0377                                                                     //        primarily pertains to local processes. Should remote processes need to access
0378                                                                     //        the information, it can either be obtained collectively using the PMIx_Fence
0379                                                                     //        operation with this directive, or can be retrieved one peer at a time using
0380                                                                     //        PMIx_Get without first having performed the job-wide collection.
0381 #define PMIX_TIMEOUT                        "pmix.timeout"          // (int) time in sec before specified operation should time out (0 => infinite)
0382 #define PMIX_IMMEDIATE                      "pmix.immediate"        // (bool) specified operation should immediately return an error from the PMIx
0383                                                                     //        server if requested data cannot be found - do not request it from
0384                                                                     //        the host RM
0385 #define PMIX_WAIT                           "pmix.wait"             // (int) caller requests that the server wait until at least the specified
0386                                                                     //       #values are found (0 => all and is the default)
0387 #define PMIX_NOTIFY_COMPLETION              "pmix.notecomp"         // (bool) notify parent process upon termination of child job
0388 #define PMIX_RANGE                          "pmix.range"            // (pmix_data_range_t) value for calls to publish/lookup/unpublish or for
0389                                                                     //        monitoring event notifications
0390 #define PMIX_PERSISTENCE                    "pmix.persist"          // (pmix_persistence_t) value for calls to publish
0391 #define PMIX_DATA_SCOPE                     "pmix.scope"            // (pmix_scope_t) scope of the data to be found in a PMIx_Get call
0392 #define PMIX_OPTIONAL                       "pmix.optional"         // (bool) look only in the client's local data store for the requested value - do
0393                                                                     //        not request data from the server if not found
0394 #define PMIX_GET_STATIC_VALUES              "pmix.get.static"       // (bool) Request that the data be returned in the provided storage location
0395 #define PMIX_GET_POINTER_VALUES             "pmix.get.pntrs"        // (bool) Request that any pointers in the returned value point directly
0396                                                                     //       to values in the key-value store
0397 #define PMIX_EMBED_BARRIER                  "pmix.embed.barrier"    // (bool) execute a blocking fence operation before executing the
0398                                                                     //        specified operation
0399 #define PMIX_JOB_TERM_STATUS                "pmix.job.term.status"  // (pmix_status_t) status returned upon job termination
0400 #define PMIX_PROC_TERM_STATUS               "pmix.proc.term.status" // (pmix_status_t) status returned upon process termination
0401 #define PMIX_PROC_STATE_STATUS              "pmix.proc.state"       // (pmix_proc_state_t) process state
0402 #define PMIX_GET_REFRESH_CACHE              "pmix.get.refresh"      // (bool) when retrieving data for a remote process, refresh the existing
0403                                                                     //        local data cache for the process in case new values have been
0404                                                                     //        put and committed by it since the last refresh
0405 #define PMIX_ACCESS_PERMISSIONS             "pmix.aperms"           // (pmix_data_array_t*) Define access permissions for the published
0406                                                                     //        data. The value shall contain an array of pmix_info_t structs
0407                                                                     //        containing the specified permissions.
0408 #define PMIX_ACCESS_USERIDS                 "pmix.auids"            // (pmix_data_array_t*) Array of effective UIDs that are allowed to
0409                                                                     //        access the published data
0410 #define PMIX_ACCESS_GRPIDS                  "pmix.agids"            // (pmix_data_array_t*) Array of effective GIDs that are allowed to
0411                                                                     //        access the published data
0412 #define PMIX_WAIT_FOR_CONNECTION            "pmix.wait.conn"        // (bool) wait until the specified connection has been made
0413 #define PMIX_QUALIFIED_VALUE                "pmix.qual.val"         // (pmix_data_array_t*) Value being provided consists of the primary
0414                                                                     //        key-value pair in first position, followed by one or more
0415                                                                     //        key-value qualifiers to be used when subsequently retrieving
0416                                                                     //        the primary value
0417 
0418 
0419 /* attributes used by host server to pass data to/from the server convenience library - the
0420  * data will then be parsed and provided to the local clients. Not generally accessible by users */
0421 #define PMIX_REGISTER_NODATA                "pmix.reg.nodata"       // (bool) Registration is for nspace only, do not copy job data
0422 #define PMIX_NODE_MAP                       "pmix.nmap"             // (char*) regex of nodes containing procs for this job
0423 #define PMIX_NODE_MAP_RAW                   "pmix.nmap.raw"         // (char*) comma-delimited list of nodes containing procs for this job
0424 #define PMIX_PROC_MAP                       "pmix.pmap"             // (char*) regex describing procs on each node within this job
0425 #define PMIX_PROC_MAP_RAW                   "pmix.pmap.raw"         // (char*) semi-colon delimited list of strings, each string containing
0426                                                                     //         a comma-delimited list of ranks on the corresponding node
0427 #define PMIX_ANL_MAP                        "pmix.anlmap"           // (char*) process mapping in ANL notation (used in PMI-1/PMI-2)
0428 #define PMIX_APP_MAP_TYPE                   "pmix.apmap.type"       // (char*) type of mapping used to layout the application (e.g., cyclic)
0429 #define PMIX_APP_MAP_REGEX                  "pmix.apmap.regex"      // (char*) regex describing the result of the mapping
0430 #define PMIX_REQUIRED_KEY                   "pmix.req.key"          // (char*) key the user needs prior to responding from a dmodex request
0431 #define PMIX_LOCAL_COLLECTIVE_STATUS        "pmix.loc.col.st"       // (pmix_status_t) status code for local collective operation being
0432                                                                     //         reported to host by server library
0433 #define PMIX_SORTED_PROC_ARRAY              "pmix.sorted.parr"      // (bool) Proc array being passed has been sorted
0434 
0435 
0436 /* event handler registration and notification info keys */
0437 #define PMIX_EVENT_HDLR_NAME                "pmix.evname"           // (char*) string name identifying this handler
0438 #define PMIX_EVENT_HDLR_FIRST               "pmix.evfirst"          // (bool) invoke this event handler before any other handlers
0439 #define PMIX_EVENT_HDLR_LAST                "pmix.evlast"           // (bool) invoke this event handler after all other handlers have been called
0440 #define PMIX_EVENT_HDLR_FIRST_IN_CATEGORY   "pmix.evfirstcat"       // (bool) invoke this event handler before any other handlers in this category
0441 #define PMIX_EVENT_HDLR_LAST_IN_CATEGORY    "pmix.evlastcat"        // (bool) invoke this event handler after all other handlers in this category have been called
0442 #define PMIX_EVENT_HDLR_BEFORE              "pmix.evbefore"         // (char*) put this event handler immediately before the one specified in the (char*) value
0443 #define PMIX_EVENT_HDLR_AFTER               "pmix.evafter"          // (char*) put this event handler immediately after the one specified in the (char*) value
0444 #define PMIX_EVENT_HDLR_PREPEND             "pmix.evprepend"        // (bool) prepend this handler to the precedence list within its category
0445 #define PMIX_EVENT_HDLR_APPEND              "pmix.evappend"         // (bool) append this handler to the precedence list within its category
0446 #define PMIX_EVENT_CUSTOM_RANGE             "pmix.evrange"          // (pmix_data_array_t*) array of pmix_proc_t defining range of event notification
0447 #define PMIX_EVENT_AFFECTED_PROC            "pmix.evproc"           // (pmix_proc_t*) single proc that was affected
0448 #define PMIX_EVENT_AFFECTED_PROCS           "pmix.evaffected"       // (pmix_data_array_t*) array of pmix_proc_t defining affected procs
0449 #define PMIX_EVENT_NON_DEFAULT              "pmix.evnondef"         // (bool) event is not to be delivered to default event handlers
0450 #define PMIX_EVENT_RETURN_OBJECT            "pmix.evobject"         // (void*) object to be returned whenever the registered cbfunc is invoked
0451                                                                     //     NOTE: the object will _only_ be returned to the process that
0452                                                                     //           registered it
0453 #define PMIX_EVENT_DO_NOT_CACHE             "pmix.evnocache"        // (bool) instruct the PMIx server not to cache the event
0454 #define PMIX_EVENT_SILENT_TERMINATION       "pmix.evsilentterm"     // (bool) do not generate an event when this job normally terminates
0455 #define PMIX_EVENT_PROXY                    "pmix.evproxy"          // (pmix_proc_t*) PMIx server that sourced the event
0456 #define PMIX_EVENT_TEXT_MESSAGE             "pmix.evtext"           // (char*) text message suitable for output by recipient - e.g., describing
0457                                                                     //         the cause of the event
0458 #define PMIX_EVENT_TIMESTAMP                "pmix.evtstamp"         // (time_t) System time when the associated event occurred.
0459 #define PMIX_EVENT_ONESHOT                  "pmix.evone"            // (bool) when registering, indicate that this event handler is to be deleted
0460                                                                     //        after being invoked
0461 
0462 /* fault tolerance-related events */
0463 #define PMIX_EVENT_TERMINATE_SESSION        "pmix.evterm.sess"      // (bool) RM intends to terminate session
0464 #define PMIX_EVENT_TERMINATE_JOB            "pmix.evterm.job"       // (bool) RM intends to terminate this job
0465 #define PMIX_EVENT_TERMINATE_NODE           "pmix.evterm.node"      // (bool) RM intends to terminate all procs on this node
0466 #define PMIX_EVENT_TERMINATE_PROC           "pmix.evterm.proc"      // (bool) RM intends to terminate just this process
0467 #define PMIX_EVENT_ACTION_TIMEOUT           "pmix.evtimeout"        // (int) time in sec before RM will execute error response
0468 
0469 /* attributes used to describe "spawn" directives */
0470 #define PMIX_PERSONALITY                    "pmix.pers"             // (char*) name of personality to use
0471 #define PMIX_HOST                           "pmix.host"             // (char*) comma-delimited list of hosts to use for spawned procs
0472 #define PMIX_HOSTFILE                       "pmix.hostfile"         // (char*) hostfile to use for spawned procs
0473 #define PMIX_ADD_HOST                       "pmix.addhost"          // (char*) comma-delimited list of hosts to add to allocation
0474 #define PMIX_ADD_HOSTFILE                   "pmix.addhostfile"      // (char*) hostfile to add to existing allocation
0475 #define PMIX_PREFIX                         "pmix.prefix"           // (char*) prefix to use for starting spawned procs
0476 #define PMIX_WDIR                           "pmix.wdir"             // (char*) working directory for spawned procs
0477 #define PMIX_WDIR_USER_SPECIFIED            "pmix.wdir.user"        // (bool) User specified the working directory
0478 #define PMIX_DISPLAY_MAP                    "pmix.dispmap"          // (bool) display placement map upon spawn
0479 #define PMIX_DISPLAY_MAP_DETAILED           "pmix.dispmapdet"       // (bool) display a highly detailed placement map upon spawn
0480 #define PMIX_DISPLAY_ALLOCATION             "pmix.dispalloc"        // (bool) display the resource allocation
0481 #define PMIX_DISPLAY_TOPOLOGY               "pmix.disptopo"         // (char*) comma-delimited list of hosts whose topology is
0482                                                                     //         to be displayed
0483 #define PMIX_DISPLAY_PROCESSORS             "pmix.dispcpus"         // (char*) comma-delimited list of hosts whose available
0484                                                                     //         CPUs are to be displayed
0485 #define PMIX_DISPLAY_PARSEABLE_OUTPUT       "pmix.dispparse"        // (bool) display requested info in a format more amenable
0486                                                                     //        to machine parsing
0487 #define PMIX_PPR                            "pmix.ppr"              // (char*) #procs to spawn on each identified resource
0488 #define PMIX_MAPBY                          "pmix.mapby"            // (char*) mapping policy
0489 #define PMIX_RANKBY                         "pmix.rankby"           // (char*) ranking policy
0490 #define PMIX_BINDTO                         "pmix.bindto"           // (char*) binding policy
0491 #define PMIX_PRELOAD_BIN                    "pmix.preloadbin"       // (bool) preload binaries
0492 #define PMIX_PRELOAD_FILES                  "pmix.preloadfiles"     // (char*) comma-delimited list of files to pre-position
0493 #define PMIX_STDIN_TGT                      "pmix.stdin"            // (pmix_proc_t*) proc that is to receive stdin
0494                                                                     //                (PMIX_RANK_WILDCARD = all in given nspace)
0495 #define PMIX_DEBUGGER_DAEMONS               "pmix.debugger"         // (bool) spawned app consists of debugger daemons
0496 #define PMIX_COSPAWN_APP                    "pmix.cospawn"          // (bool) designated app is to be spawned as a disconnected
0497                                                                     //        job - i.e., not part of the "comm_world" of the job
0498 #define PMIX_COLOCATE_PROCS                 "pmix.colproc"          // (pmix_data_array_t*) Array of pmix_proc_t identifying the procs
0499                                                                     //        with which the new job's procs are to be colocated
0500 #define PMIX_COLOCATE_NPERPROC              "pmix.colnum.proc"      // (uint16_t) Number of procs to colocate with each identified proc
0501 #define PMIX_COLOCATE_NPERNODE              "pmix.colnum.node"      // (uint16_t) Number of procs to colocate on the node of each identified proc
0502 #define PMIX_SET_SESSION_CWD                "pmix.ssncwd"           // (bool) set the application's current working directory to
0503                                                                     //        the session working directory assigned by the RM
0504 #define PMIX_INDEX_ARGV                     "pmix.indxargv"         // (bool) mark the argv with the rank of the proc
0505 #define PMIX_CPUS_PER_PROC                  "pmix.cpuperproc"       // (uint32_t) #cpus to assign to each rank
0506 #define PMIX_NO_PROCS_ON_HEAD               "pmix.nolocal"          // (bool) do not place procs on the head node
0507 #define PMIX_NO_OVERSUBSCRIBE               "pmix.noover"           // (bool) do not oversubscribe the cpus
0508 #define PMIX_REPORT_BINDINGS                "pmix.repbind"          // (bool) report bindings of the individual procs
0509 #define PMIX_CPU_LIST                       "pmix.cpulist"          // (char*) list of cpus to use for this job
0510 #define PMIX_JOB_RECOVERABLE                "pmix.recover"          // (bool) application supports recoverable operations
0511 #define PMIX_JOB_CONTINUOUS                 "pmix.continuous"       // (bool) application is continuous, all failed procs should
0512                                                                         //        be immediately restarted
0513 #define PMIX_MAX_RESTARTS                   "pmix.maxrestarts"      // (uint32_t) max number of times to restart a job
0514 #define PMIX_FWD_STDIN                      "pmix.fwd.stdin"        // (bool) forward the stdin from this process to the target processes
0515 #define PMIX_FWD_STDOUT                     "pmix.fwd.stdout"       // (bool) forward stdout from the spawned processes to this process (typically used by a tool)
0516 #define PMIX_FWD_STDERR                     "pmix.fwd.stderr"       // (bool) forward stderr from the spawned processes to this process (typically used by a tool)
0517 #define PMIX_FWD_STDDIAG                    "pmix.fwd.stddiag"      // (bool) if a diagnostic channel exists, forward any output on it
0518                                                                     //        from the spawned processes to this process (typically used by a tool)
0519 #define PMIX_SPAWN_TOOL                     "pmix.spwn.tool"        // (bool) job being spawned is a tool
0520 #define PMIX_CMD_LINE                       "pmix.cmd.line"         // (char*) command line executing in the specified nspace
0521 #define PMIX_FORKEXEC_AGENT                 "pmix.fe.agnt"          // (char*) command line of fork/exec agent to be used for starting
0522                                                                     //         local processes
0523 #define PMIX_JOB_TIMEOUT                    "pmix.job.time"         // (int) time in sec before job should time out (0 => infinite)
0524 #define PMIX_SPAWN_TIMEOUT                  "pmix.sp.time"          // (int) time in sec before spawn operation should time out (0 => infinite)
0525                                                                     //       Logically equivalent to passing the PMIX_TIMEOUT attribute to the
0526                                                                     //       PMIx_Spawn API, it is provided as a separate attribute to distinguish
0527                                                                     //       it from the PMIX_JOB_TIMEOUT attribute
0528 #define PMIX_TIMEOUT_STACKTRACES            "pmix.tim.stack"        // (bool) include process stacktraces in timeout report from a job
0529 #define PMIX_TIMEOUT_REPORT_STATE           "pmix.tim.state"        // (bool) report process states in timeout report from a job
0530 #define PMIX_APP_ARGV                       "pmix.app.argv"         // (char*) consolidated argv passed to the spawn command for the given app
0531 #define PMIX_NOTIFY_JOB_EVENTS              "pmix.note.jev"         // (bool) Requests that the launcher generate the PMIX_EVENT_JOB_START,
0532                                                                     //        PMIX_LAUNCH_COMPLETE, and PMIX_EVENT_JOB_END events. Each event is to
0533                                                                     //        include at least the namespace of the corresponding job and a
0534                                                                     //        PMIX_EVENT_TIMESTAMP indicating the time the event occurred.
0535 #define PMIX_NOTIFY_PROC_TERMINATION        "pmix.noteproc"         // (bool) Requests that the launcher generate the PMIX_EVENT_PROC_TERMINATED
0536                                                                     //        event whenever a process either normally or abnormally terminates.
0537 #define PMIX_NOTIFY_PROC_ABNORMAL_TERMINATION   "pmix.noteabproc"   // (bool) Requests that the launcher generate the PMIX_EVENT_PROC_TERMINATED
0538                                                                     //        event only when a process abnormally terminates.
0539 #define PMIX_ENVARS_HARVESTED               "pmix.evar.hvstd"       // (bool) Envars have been harvested by the spawn requestor
0540 #define PMIX_RUNTIME_OPTIONS                "pmix.runopt"           // (char*) Environment-specific runtime directives that control job behavior
0541 #define PMIX_ABORT_NON_ZERO_TERM            "pmix.abnz"             // (bool) Abort the spawned job if any process terminates with non-zero status
0542 #define PMIX_DO_NOT_LAUNCH                  "pmix.dnl"              // (bool) Execute all procedures to prepare the requested job for launch,
0543                                                                     //        but do not launch it. Typically combined with the PMIX_DISPLAY_MAP
0544                                                                     //        or PMIX_DISPLAY_MAP_DETAILED for debugging purposes.
0545 #define PMIX_SHOW_LAUNCH_PROGRESS           "pmix.showprog"         // (bool) Provide periodic progress reports on job launch procedure (e.g., after
0546                                                                     //        every 100 processes have been spawned)
0547 #define PMIX_AGGREGATE_HELP                 "pmix.agg.help"         // (bool) Aggregate help messages, reporting each unique help message once
0548                                                                     //        accompanied by the number of processes that reported it
0549 #define PMIX_REPORT_CHILD_SEP               "pmix.rptchildsep"      // (bool) Report the exit status of any child jobs spawned by the primary job
0550                                                                     //        separately. If false, then the final exit status reported will be
0551                                                                     //        zero if the primary job and all spawned jobs exit normally, or the
0552                                                                     //        first non-zero status returned by either primary or child jobs.
0553 #define PMIX_SPAWN_CHILD_SEP                "pmix.spchildsep"       // (bool) Treat the spawned job as independent from the parent - i.e, do not
0554                                                                     //        terminate the spawned job if the parent terminates.
0555 
0556 /* query keys - value type shown is the type of the value that will be RETURNED by that key  */
0557 #define PMIX_QUERY_SUPPORTED_KEYS           "pmix.qry.keys"         // (char*) returns comma-delimited list of keys supported by the query
0558                                                                     //         function. NO QUALIFIERS
0559 #define PMIX_QUERY_NAMESPACES               "pmix.qry.ns"           // (char*) returns a comma-delimited list of active namespaces. NO QUALIFIERS
0560 #define PMIX_QUERY_NAMESPACE_INFO           "pmix.qry.nsinfo"       // (pmix_data_array_t*) returns an array of active nspace information - each
0561                                                                     //        element will contain an array including the namespace plus the
0562                                                                     //        command line of the application executing within it
0563                                                                     //        SUPPORTED QUALIFIERS: PMIX_NSPACE of specific nspace whose info
0564                                                                     //        is being requested
0565 #define PMIX_QUERY_JOB_STATUS               "pmix.qry.jst"          // (pmix_status_t) returns status of a specified currently executing job
0566                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0567 #define PMIX_QUERY_QUEUE_LIST               "pmix.qry.qlst"         // (char*) request a comma-delimited list of scheduler queues. NO QUALIFIERS
0568 #define PMIX_QUERY_QUEUE_STATUS             "pmix.qry.qst"          // (pmix_data_array_t*) returns array where each element contains the name and
0569                                                                     //         status of a scheduler queue
0570                                                                     //        SUPPORTED QUALIFIERS: PMIX_ALLOC_QUEUE naming specific queue whose status
0571                                                                     //        is being requested
0572 #define PMIX_QUERY_PROC_TABLE               "pmix.qry.ptable"       // (pmix_data_array_t*) returns (pmix_data_array_t*) an array of pmix_proc_info_t
0573                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0574 #define PMIX_QUERY_LOCAL_PROC_TABLE         "pmix.qry.lptable"      // (pmix_data_array_t*) returns (pmix_data_array_t*) an array of pmix_proc_info_t
0575                                                                     //         for procs in job on same node
0576                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0577 #define PMIX_QUERY_AUTHORIZATIONS           "pmix.qry.auths"        // (pmix_data_array_t*) return operations tool is authorized to perform. The contents
0578                                                                     //         of the array elements have not yet been standardized. NO QUALIFIERS
0579 #define PMIX_QUERY_SPAWN_SUPPORT            "pmix.qry.spawn"        // (char*) return a comma-delimited list of supported spawn attributes. NO QUALIFIERS
0580 #define PMIX_QUERY_DEBUG_SUPPORT            "pmix.qry.debug"        // (char*) return a comma-delimited list of supported debug attributes. NO QUALIFIERS
0581 #define PMIX_QUERY_MEMORY_USAGE             "pmix.qry.mem"          // (pmix_data_array_t*) return info on memory usage for the procs indicated in the qualifiers
0582                                                                     //        SUPPORTED QUALIFIERS: PMIX_NSPACE/PMIX_RANK, or PMIX_PROCID of specific proc(s)
0583                                                                     //        whose info is being requested
0584 #define PMIX_QUERY_ALLOC_STATUS             "pmix.query.alloc"      // (char*) return a string reporting status of an allocation request
0585                                                                     //         REQUIRES a PMIX_ALLOC_REQUEST_ID qualifier indicating the allocation request
0586                                                                     //         being queried
0587 #define PMIX_QUERY_ALLOCATION               "pmix.query.allc"       // (pmix_data_array_t*) returns an array of pmix_info_t describing the nodes known to the
0588                                                                     //         server. Each array element will consist of the PMIX_NODE_INFO key containing
0589                                                                     //         a pmix_data_array_t of pmix_info_t - the first element of the array must be
0590                                                                     //         the hostname of that node, with additional info on the node in subsequent entries.
0591                                                                     //         SUPPORTED_QUALIFIER: a PMIX_ALLOC_ID qualifier indicating the specific
0592                                                                     //         allocation of interest
0593 #define PMIX_TIME_REMAINING                 "pmix.time.remaining"   // (uint32_t) returns number of seconds remaining in allocation
0594                                                                     //         for the specified nspace (defaults to allocation containing the caller)
0595                                                                     //         SUPPORTED QUALIFIERS: PMIX_NSPACE of the nspace whose info is being requested
0596 #define PMIX_QUERY_NUM_PSETS                "pmix.qry.psetnum"      // (size_t) returns the number of psets defined
0597                                                                     //          in the specified range (defaults to session)
0598                                                                     //         SUPPORTED QUALIFIERS: PMIX_RANGE whose info is being requested
0599 #define PMIX_QUERY_PSET_NAMES               "pmix.qry.psets"        // (char*) returns a comma-delimited list of the names of the
0600                                                                     //         psets defined in the specified range (defaults to session)
0601                                                                     //         SUPPORTED QUALIFIERS: PMIX_RANGE whose info is being requested
0602 #define PMIX_QUERY_PSET_MEMBERSHIP          "pmix.qry.pmems"        // (pmix_data_array_t*) Return an array of pmix_proc_t containing the members of
0603                                                                     //         the specified process set.
0604 #define PMIX_QUERY_NUM_GROUPS               "pmix.qry.pgrpnum"      // (size_t) Return the number of process groups defined in the specified range
0605                                                                     //         (defaults to session). OPTIONAL QUALIFERS: PMIX_RANGE.
0606 #define PMIX_QUERY_GROUP_NAMES              "pmix.qry.pgrp"         // (pmix_data_array_t*) Return a pmix_data_array_t containing an array of string
0607                                                                     //         names of the process groups defined in the specified range (defaults
0608                                                                     //         to session). OPTIONAL QUALIFERS: PMIX_RANGE
0609 #define PMIX_QUERY_GROUP_MEMBERSHIP         "pmix.qry.pgrpmems"     // (pmix_data_array_t*) Return a pmix_data_array_t of pmix_proc_t containing
0610                                                                     //         the members of the specified process group. REQUIRED QUALIFIERS:
0611                                                                     //         PMIX_GROUP_ID.
0612 #define PMIX_QUERY_ATTRIBUTE_SUPPORT        "pmix.qry.attrs"        // (pmix_data_array_t*) returns array of pmix_info_t where each element consists
0613                                                                     //         of a key containing the name of the function, and an array of pmix_regattr_t
0614                                                                     //         detailing the attribute support for that function
0615                                                                     //         SUPPORTED QUALIFIERS: PMIX_CLIENT_FUNCTIONS, PMIX_SERVER_FUNCTIONS,
0616                                                                     //         PMIX_TOOL_FUNCTIONS, and/or PMIX_HOST_FUNCTIONS
0617 #define PMIX_CLIENT_FUNCTIONS               "pmix.client.fns"       // (char*) returns a comma-delimited list of supported PMIx client functions. NO QUALIFIERS
0618 #define PMIX_SERVER_FUNCTIONS               "pmix.srvr.fns"         // (char*) returns a comma-delimited list of supported PMIx server functions. NO QUALIFIERS
0619 #define PMIX_TOOL_FUNCTIONS                 "pmix.tool.fns"         // (char*) returns a comma-delimited list of supported PMIx tool functions. NO QUALIFIERS
0620 #define PMIX_HOST_FUNCTIONS                 "pmix.host.fns"         // (char*) returns a comma-delimited list of PMIx functions supported by the host environment
0621 #define PMIX_QUERY_AVAIL_SERVERS            "pmix.qry.asrvrs"       // (pmix_data_array_t*) array of pmix_info_t, each element containing an array of
0622                                                                     //         pmix_info_t of available data for servers on this node
0623                                                                     //         to which the caller might be able to connect. NO QUALIFIERS
0624 #define PMIX_QUERY_QUALIFIERS               "pmix.qry.quals"        // (pmix_data_array_t*) Contains an array of qualifiers that were included in the
0625                                                                     //         query that produced the provided results. This attribute is solely for
0626                                                                     //         reporting purposes and cannot be used in PMIx_Get or other query
0627                                                                     //         operations
0628 #define PMIX_QUERY_RESULTS                  "pmix.qry.res"          // (pmix_data_array_t*) Contains an array of query results for a given pmix_query_t passed to the
0629                                                                     //         PMIx_Query_info APIs. If qualifiers were included in the query, then the first element
0630                                                                     //         of the array shall be the PMIX_QUERY_QUALIFIERS attribute containing those qualifiers.
0631                                                                     //         Each of the remaining elements of the array is a pmix_info_t containing the query key
0632                                                                     //         and the corresponding value returned by the query. This attribute is solely for
0633                                                                     //         reporting purposes and cannot be used in PMIx_Get or other query operations
0634 #define PMIX_QUERY_AVAILABLE_SLOTS          "pmix.qry.aslots"       // (uint32_t) Number of slots currently available
0635                                                                     //         in the session. This is a snapshot in
0636                                                                     //         time as the number may have changed
0637                                                                     //         (e.g., if another job was submitted after
0638                                                                     //         the host generated its response). Request
0639                                                                     //         may optionally specify the session using
0640                                                                     //         the PMIX_SESSION_ID attribute - default
0641                                                                     //         is the session of the requestor
0642 
0643 
0644 /* query qualifiers - these are used to provide information to narrow/modify the query. Value type shown is the type of data expected
0645  * to be provided with the key */
0646 #define PMIX_QUERY_REFRESH_CACHE            "pmix.qry.rfsh"         // (bool) retrieve updated information from server
0647                                                                     //        to update local cache
0648 #define PMIX_QUERY_LOCAL_ONLY               "pmix.qry.local"        // (bool) constrain the query to local information only
0649 #define PMIX_QUERY_REPORT_AVG               "pmix.qry.avg"          // (bool) report average values
0650 #define PMIX_QUERY_REPORT_MINMAX            "pmix.qry.minmax"       // (bool) report minimum and maximum value
0651 #define PMIX_CLIENT_ATTRIBUTES              "pmix.client.attrs"     // (char*) comma-delimited list of functions, including "all"
0652                                                                     //        when used in a query, indicates whether or not to include
0653                                                                     //        attributes supported by the PMIx client library
0654 #define PMIX_SERVER_ATTRIBUTES              "pmix.srvr.attrs"       // (char*) comma-delimited list of functions, including "all"
0655                                                                     //        when used in a query, indicates whether or not to include
0656                                                                     //        attributes supported by the PMIx server library
0657 #define PMIX_HOST_ATTRIBUTES                "pmix.host.attrs"       // (char*) comma-delimited list of functions, including "all"
0658                                                                     //        when used in a query, indicates whether or not to include
0659                                                                     //        attributes supported by the host environment
0660 #define PMIX_TOOL_ATTRIBUTES                "pmix.tool.attrs"       // (char*) comma-delimited list of functions, including "all"
0661                                                                     //        when used in a query, indicates whether or not to include
0662                                                                     //        attributes supported by the PMIx tool library
0663 #define PMIX_QUERY_SUPPORTED_QUALIFIERS     "pmix.qry.quals"        // (bool) return comma-delimited list of qualifiers supported by
0664                                                                     //        a query on the provided key, instead of actually performing
0665                                                                     //        the query on the key.
0666 
0667 
0668 /* PMIx_Get information retrieval qualifiers */
0669 #define PMIX_SESSION_INFO                   "pmix.ssn.info"         // (bool) Return information about the specified session. If information
0670                                                                     //        about a session other than the one containing the requesting
0671                                                                     //        process is desired, then the attribute array must contain a
0672                                                                     //        PMIX_SESSION_ID attribute identifying the desired target.
0673 #define PMIX_JOB_INFO                       "pmix.job.info"         // (bool) Return information about the specified job or namespace. If
0674                                                                     //        information about a job or namespace other than the one containing
0675                                                                     //        the requesting process is desired, then the attribute array must
0676                                                                     //        contain a PMIX_JOBID or PMIX_NSPACE attribute identifying the
0677                                                                     //        desired target. Similarly, if information is requested about a
0678                                                                     //        job or namespace in a session other than the one containing the
0679                                                                     //        requesting process, then an attribute identifying the target
0680                                                                     //        session must be provided.
0681 #define PMIX_APP_INFO                       "pmix.app.info"         // (bool) Return information about the specified application. If information
0682                                                                     //        about an application other than the one containing the requesting
0683                                                                     //        process is desired, then the attribute array must contain a
0684                                                                     //        PMIX_APPNUM attribute identifying the desired target. Similarly,
0685                                                                     //        if information is requested about an application in a job or session
0686                                                                     //        other than the one containing the requesting process, then attributes
0687                                                                     //        identifying the target job and/or session must be provided.
0688 #define PMIX_NODE_INFO                      "pmix.node.info"        // (bool) Return information about the specified node. If information about a
0689                                                                     //        node other than the one containing the requesting process is desired,
0690                                                                     //        then the attribute array must contain either the PMIX_NODEID or
0691                                                                     //        PMIX_HOSTNAME attribute identifying the desired target.
0692 
0693 
0694 /* information storage attributes */
0695 #define PMIX_SESSION_INFO_ARRAY             "pmix.ssn.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing
0696                                                                     //        session-level information. The PMIX_SESSION_ID attribute is required
0697                                                                     //        to be included in the array.
0698 #define PMIX_JOB_INFO_ARRAY                 "pmix.job.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing job-level
0699                                                                     //        information. Information is registered one job (aka namespace) at a time
0700                                                                     //        via the PMIx_server_register_nspace API. Thus, there is no requirement that
0701                                                                     //        the array contain either the PMIX_NSPACE or PMIX_JOBID attributes, though
0702                                                                     //        either or both of them may be included.
0703 #define PMIX_APP_INFO_ARRAY                 "pmix.app.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing app-level
0704                                                                     //        information. The PMIX_NSPACE or PMIX_JOBID attributes of the job containing
0705                                                                     //        the application, plus its PMIX_APPNUM attribute, are required to be
0706                                                                     //        included in the array.
0707 #define PMIX_PROC_INFO_ARRAY                "pmix.pdata"            // (pmix_data_array_t*) Provide an array of pmix_info_t containing process-realm
0708                                                                     //        information. The PMIX_RANK and PMIX_NSPACE attributes, or the
0709                                                                     //        PMIX_PROCID attribute, are required to be included in the array when
0710                                                                     //        the array is not included as part of a call to
0711                                                                     //        PMIx_server_register_nspace - i.e., when the job containing the process
0712                                                                     //        is ambiguous. All three may be included if desired. When the array is
0713                                                                     //        included in some broader structure that identifies the job, then only
0714                                                                     //        the PMIX_RANK or the PMIX_PROCID attribute must be included (the others
0715                                                                     //        are optional).
0716 #define PMIX_NODE_INFO_ARRAY                "pmix.node.arr"         // (pmix_data_array_t*) Provide an array of pmix_info_t containing node-level
0717                                                                     //        information. At a minimum, either the PMIX_NODEID or PMIX_HOSTNAME
0718                                                                     //        attribute is required to be included in the array, though both may be
0719                                                                     //        included.
0720 #define PMIX_SERVER_INFO_ARRAY              "pmix.srv.arr"          // (pmix_data_array_t*) array of data on a given server, starting with its nspace
0721 
0722 
0723 /* log attributes */
0724 #define PMIX_LOG_SOURCE                     "pmix.log.source"       // (pmix_proc_t*) ID of source of the log request
0725 #define PMIX_LOG_STDERR                     "pmix.log.stderr"       // (char*) log string to stderr
0726 #define PMIX_LOG_STDOUT                     "pmix.log.stdout"       // (char*) log string to stdout
0727 #define PMIX_LOG_SYSLOG                     "pmix.log.syslog"       // (char*) log message to syslog - defaults to ERROR priority. Will log
0728                                                                     //         to global syslog if available, otherwise to local syslog
0729 #define PMIX_LOG_LOCAL_SYSLOG               "pmix.log.lsys"         // (char*) log msg to local syslog - defaults to ERROR priority
0730 #define PMIX_LOG_GLOBAL_SYSLOG              "pmix.log.gsys"         // (char*) forward data to system "master" and log msg to that syslog
0731 #define PMIX_LOG_SYSLOG_PRI                 "pmix.log.syspri"       // (int) syslog priority level
0732 
0733 #define PMIX_LOG_TIMESTAMP                  "pmix.log.tstmp"        // (time_t) timestamp for log report
0734 #define PMIX_LOG_GENERATE_TIMESTAMP         "pmix.log.gtstmp"       // (bool) generate timestamp for log
0735 #define PMIX_LOG_TAG_OUTPUT                 "pmix.log.tag"          // (bool) label the output stream with the channel name (e.g., "stdout")
0736 #define PMIX_LOG_TIMESTAMP_OUTPUT           "pmix.log.tsout"        // (bool) print timestamp in output string
0737 #define PMIX_LOG_XML_OUTPUT                 "pmix.log.xml"          // (bool) print the output stream in xml format
0738 #define PMIX_LOG_ONCE                       "pmix.log.once"         // (bool) only log this once with whichever channel can first support it
0739 #define PMIX_LOG_MSG                        "pmix.log.msg"          // (pmix_byte_object_t) message blob to be sent somewhere
0740 #define PMIX_LOG_KEY                        "pmix.log.key"          // (char*) key to a logging message
0741 #define PMIX_LOG_VAL                        "pmix.log.val"          // (char*) value to a logging message
0742 #define PMIX_LOG_AGG                        "pmix.log.agg"          // (bool) Whether to aggregate and prevent duplicate logging messages
0743                                                                     //        based on key value pairs.
0744 
0745 #define PMIX_LOG_EMAIL                      "pmix.log.email"        // (pmix_data_array_t*) log via email based on array of pmix_info_t
0746                                                                     //         containing directives
0747 #define PMIX_LOG_EMAIL_ADDR                 "pmix.log.emaddr"       // (char*) comma-delimited list of email addresses that are to recv msg
0748 #define PMIX_LOG_EMAIL_SENDER_ADDR          "pmix.log.emfaddr"      // (char*) return email address of sender
0749 #define PMIX_LOG_EMAIL_SUBJECT              "pmix.log.emsub"        // (char*) subject line for email
0750 #define PMIX_LOG_EMAIL_MSG                  "pmix.log.emmsg"        // (char*) msg to be included in email
0751 #define PMIX_LOG_EMAIL_SERVER               "pmix.log.esrvr"        // (char*) hostname (or IP addr) of estmp server
0752 #define PMIX_LOG_EMAIL_SRVR_PORT            "pmix.log.esrvrprt"     // (int32_t) port the email server is listening to
0753 
0754 #define PMIX_LOG_GLOBAL_DATASTORE           "pmix.log.gstore"       // (bool) log the provided data to a global datastore
0755 #define PMIX_LOG_JOB_RECORD                 "pmix.log.jrec"         // (bool) log the provided information to the RM's job record
0756 #define PMIX_LOG_PROC_TERMINATION           "pmix.logproc"          // (bool) Requests that the launcher log the PMIX_EVENT_PROC_TERMINATED event
0757                                                                     //        whenever a process either normally or abnormally terminates.
0758 #define PMIX_LOG_PROC_ABNORMAL_TERMINATION  "pmix.logabproc"        // (bool) Requests that the launcher log the PMIX_EVENT_PROC_TERMINATED event
0759                                                                     //        only when a process abnormally terminates.
0760 #define PMIX_LOG_JOB_EVENTS                 "pmix.log.jev"          // (bool) Requests that the launcher log the PMIX_EVENT_JOB_START,
0761                                                                     //        PMIX_LAUNCH_COMPLETE, and PMIX_EVENT_JOB_END events using PMIx_Log
0762 #define PMIX_LOG_COMPLETION                 "pmix.logcomp"          // (bool) Requests that the launcher log the PMIX_EVENT_JOB_END event
0763                                                                     //        for normal or abnormal termination of the spawned job using
0764                                                                     //        PMIx_Log. The event shall include the returned status code
0765                                                                     //        (PMIX_JOB_TERM_STATUS) for the corresponding job; the identity
0766                                                                     //        (PMIX_PROCID) and exit status (PMIX_EXIT_CODE) of the first failed
0767                                                                     //        process, if applicable; and a PMIX_EVENT_TIMESTAMP indicating the time
0768                                                                     //        the termination occurred.
0769 
0770 
0771 /* debugger attributes */
0772 #define PMIX_DEBUG_STOP_ON_EXEC             "pmix.dbg.exec"         // (varies) stop specified rank(s) on exec and notify ready-to-debug
0773                                                                     //        Can be any of three data types:
0774                                                                     //           (a) bool - true indicating all ranks, false indicating none
0775                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0776                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0777                                                                     //               are specified
0778 #define PMIX_DEBUG_STOP_IN_INIT             "pmix.dbg.init"         // (varies) stop specified rank(s) in PMIx_Init and notify ready-to-debug
0779                                                                     //        Can be any of three data types:
0780                                                                     //           (a) bool - true indicating all ranks, false indicating none
0781                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0782                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0783                                                                     //               are specified
0784 #define PMIX_DEBUG_STOP_IN_APP              "pmix.dbg.notify"       // (varies) direct specified ranks to stop at application-specific point and
0785                                                                     //        notify ready-to-debug. Can be any of three data types:
0786                                                                     //           (a) bool - true indicating all ranks, false indicating none
0787                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0788                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0789                                                                     //               are specified
0790 #define PMIX_BREAKPOINT                     "pmix.brkpnt"           // (char*) string ID of the breakpoint where the process(es) is(are) waiting
0791 #define PMIX_DEBUG_TARGET                   "pmix.dbg.tgt"          // (pmix_proc_t*) Identifier of proc(s) to be debugged
0792 #define PMIX_DEBUG_DAEMONS_PER_PROC         "pmix.dbg.dpproc"       // (uint16_t) Number of debugger daemons to be spawned per application
0793                                                                     //        process. The launcher is to pass the identifier of the namespace to
0794                                                                     //        be debugged by including the PMIX_DEBUG_TARGET attribute in the
0795                                                                     //        daemon's job-level information. The debugger daemons spawned on a
0796                                                                     //        given node are responsible for self-determining their specific
0797                                                                     //        target process(es) - e.g., by referencing their own PMIX_LOCAL_RANK
0798                                                                     //        in the daemon debugger job versus the corresponding PMIX_LOCAL_RANK
0799                                                                     //        of the target processes on the node.
0800 #define PMIX_DEBUG_DAEMONS_PER_NODE         "pmix.dbg.dpnd"         // (uint16_t) Number of debugger daemons to be spawned on each node where the
0801                                                                     //        target job is executing. The launcher is to pass the identifier of
0802                                                                     //        the namespace to be debugged by including the PMIX_DEBUG_TARGET
0803                                                                     //        attribute in the daemon's job-level information. The debugger
0804                                                                     //        daemons spawned on a given node are responsible for
0805                                                                     //        self-determining their specific target process(es) - e.g., by
0806                                                                     //        referencing their own PMIX_LOCAL_RANK in the daemon debugger job
0807                                                                     //        versus the corresponding PMIX_LOCAL_RANK of the target processes on
0808                                                                     //        the node.
0809 
0810 
0811 /* Resource Manager identification */
0812 #define PMIX_RM_NAME                        "pmix.rm.name"          // (char*) string name of the resource manager
0813 #define PMIX_RM_VERSION                     "pmix.rm.version"       // (char*) RM version string
0814 
0815 /* environmental variable operation attributes */
0816 #define PMIX_SET_ENVAR                      "pmix.envar.set"          // (pmix_envar_t*) set the envar to the given value,
0817                                                                       //                 overwriting any pre-existing one
0818 #define PMIX_ADD_ENVAR                      "pmix.envar.add"          // (pmix_envar_t*) add envar, but do not overwrite any existing one
0819 #define PMIX_UNSET_ENVAR                    "pmix.envar.unset"        // (char*) unset the envar, if present
0820 #define PMIX_PREPEND_ENVAR                  "pmix.envar.prepnd"       // (pmix_envar_t*) prepend the given value to the
0821                                                                       //                 specified envar using the separator
0822                                                                       //                 character, creating the envar if it doesn't already exist
0823 #define PMIX_APPEND_ENVAR                   "pmix.envar.appnd"        // (pmix_envar_t*) append the given value to the specified
0824                                                                       //                 envar using the separator character,
0825                                                                       //                 creating the envar if it doesn't already exist
0826 #define PMIX_FIRST_ENVAR                    "pmix.envar.first"        // (pmix_envar_t*) ensure the given value appears first in the
0827                                                                       //                 specified envar using the separator
0828                                                                       //                 character, creating the envar if it doesn't already exist
0829 
0830 /* attributes relating to allocations */
0831 #define PMIX_ALLOC_REQ_ID                   "pmix.alloc.reqid"      // (char*) User-provided string identifier for this allocation request
0832                                                                     //         which can later be used to query status of the request.
0833 #define PMIX_ALLOC_ID                       "pmix.alloc.id"         // (char*) A string identifier (provided by the host environment) for
0834                                                                     //         the resulting allocation which can later be used to reference
0835                                                                     //         the allocated resources in, for example, a call to PMIx_Spawn
0836 #define PMIX_ALLOC_NUM_NODES                "pmix.alloc.nnodes"     // (uint64_t) number of nodes
0837 #define PMIX_ALLOC_NODE_LIST                "pmix.alloc.nlist"      // (char*) regex of specific nodes
0838 #define PMIX_ALLOC_EXCLUDE                  "pmix.alloc.exclude"    // (char*) regex of nodes to exclude from scheduling consideration
0839 #define PMIX_ALLOC_NUM_CPUS                 "pmix.alloc.ncpus"      // (uint64_t) number of cpus
0840 #define PMIX_ALLOC_NUM_CPU_LIST             "pmix.alloc.ncpulist"   // (char*) regex of #cpus for each node
0841 #define PMIX_ALLOC_CPU_LIST                 "pmix.alloc.cpulist"    // (char*) regex of specific cpus indicating the cpus involved.
0842 #define PMIX_ALLOC_MEM_SIZE                 "pmix.alloc.msize"      // (float) number of Mbytes
0843 #define PMIX_ALLOC_FABRIC                   "pmix.alloc.net"        // (pmix_data_array_t*) Array of pmix_info_t describing
0844                                                                     //         fabric resource request. This must include at least:
0845                                                                     //           * PMIX_ALLOC_FABRIC_ID
0846                                                                     //           * PMIX_ALLOC_FABRIC_TYPE
0847                                                                     //           * PMIX_ALLOC_FABRIC_ENDPTS
0848                                                                     //         plus whatever other descriptors are desired
0849 #define PMIX_ALLOC_FABRIC_ID                "pmix.alloc.netid"      // (char*) key to be used when accessing this requested fabric allocation. The
0850                                                                     //         allocation will be returned/stored as a pmix_data_array_t of
0851                                                                     //         pmix_info_t indexed by this key and containing at least one
0852                                                                     //         entry with the same key and the allocated resource description.
0853                                                                     //         The type of the included value depends upon the fabric
0854                                                                     //         support. For example, a TCP allocation might consist of a
0855                                                                     //         comma-delimited string of socket ranges such as
0856                                                                     //         "32000-32100,33005,38123-38146". Additional entries will consist
0857                                                                     //         of any provided resource request directives, along with their
0858                                                                     //         assigned values. Examples include:
0859                                                                     //           * PMIX_ALLOC_FABRIC_TYPE - the type of resources provided
0860                                                                     //           * PMIX_ALLOC_FABRIC_PLANE - if applicable, what plane the
0861                                                                     //               resources were assigned from
0862                                                                     //           * PMIX_ALLOC_FABRIC_QOS - the assigned QoS
0863                                                                     //           * PMIX_ALLOC_BANDWIDTH - the allocated bandwidth
0864                                                                     //           * PMIX_ALLOC_FABRIC_SEC_KEY - a security key for the requested
0865                                                                     //               fabric allocation
0866                                                                     //         NOTE: the assigned values may differ from those requested,
0867                                                                     //         especially if the "required" flag was not set in the request
0868 #define PMIX_ALLOC_BANDWIDTH                "pmix.alloc.bw"         // (float) Mbits/sec
0869 #define PMIX_ALLOC_FABRIC_QOS               "pmix.alloc.netqos"     // (char*) quality of service level
0870 #define PMIX_ALLOC_TIME                     "pmix.alloc.time"       // (char*) time that the allocation shall remain valid. Time is specified in
0871                                                                     //         usual time format of months:days:hours:minutes:seconds, scanning
0872                                                                     //         from right to left (i.e., a value of "2" equates to 2 seconds)
0873 #define PMIX_ALLOC_FABRIC_TYPE              "pmix.alloc.nettype"    // (char*) type of desired transport (e.g., tcp, udp)
0874 #define PMIX_ALLOC_FABRIC_PLANE             "pmix.alloc.netplane"   // (char*) id string for the NIC (aka plane) to be used for this allocation
0875                                                                     //         (e.g., CIDR for Ethernet)
0876 #define PMIX_ALLOC_FABRIC_ENDPTS            "pmix.alloc.endpts"     // (size_t) number of endpoints to allocate per process
0877 #define PMIX_ALLOC_FABRIC_ENDPTS_NODE       "pmix.alloc.endpts.nd"  // (size_t) number of endpoints to allocate per node
0878 #define PMIX_ALLOC_FABRIC_SEC_KEY           "pmix.alloc.nsec"       // (pmix_byte_object_t) fabric security key
0879 #define PMIX_ALLOC_QUEUE                    "pmix.alloc.queue"      // (char*) name of queue being referenced
0880 #define PMIX_ALLOC_PREEMPTIBLE              "pmix.alloc.preempt"    // (bool) by default, all jobs in the resulting allocation are to be
0881                                                                     //        considered preemptible (overridable at per-job level)
0882 #define PMIX_ALLOC_LEND                     "pmix.alloc.lend"       // (char*) estimated time before the lent resources shall be available for
0883                                                                     //         return. Time is specified in usual time format of
0884                                                                     //         months:days:hours:minutes:seconds, scanning from right to left
0885                                                                     //         (i.e., a value of "2" equates to 2 seconds)
0886 #define PMIX_ALLOC_IMAGE                    "pmix.alloc.image"      // (char*) name of the image that the requested nodes are to have on them
0887 #define PMIX_ALLOC_WAIT_ALL_NODES           "pmix.alloc.waitall"    // (bool) whether or not to wait for all nodes to be scheduled before
0888                                                                     //        starting to initialize and release nodes for use
0889 #define PMIX_ALLOC_SHARE                    "pmix.alloc.share"      // (bool) Allow non-exclusive use of specified resources
0890 #define PMIX_ALLOC_NOSHELL                  "pmix.alloc.noshell"    // (bool) Immediately exit after allocating resources, without running a command.
0891 #define PMIX_ALLOC_DEPENDENCY               "pmix.alloc.depend"     // (char*) Defer the start of allocation until the specified dependencies have
0892                                                                     //         successfully completed.
0893 #define PMIX_ALLOC_BEGIN                    "pmix.alloc.begin"      // (char*) Direct the scheduler to defer allocation until the specified time. Time
0894                                                                     //         may be of the form HH:MM:SS to schedule the session to start at a specific
0895                                                                     //         time of day (seconds are optional). If that time is already past, the
0896                                                                     //         next day is assumed. You may also specify "midnight" or "noon", and you
0897                                                                     //         can have a time-of-day suffixed with AM or PM for running in the morning
0898                                                                     //         or the evening. You can also say what day the session should start by
0899                                                                     //         specifying a date of the form MMDDYY or MM/DD/YY YYYY-MM-DD. Combine date
0900                                                                     //         and time using the usual format YYYY-MM-DD[THH:MM[:SS]]. You can also give
0901                                                                     //         times like "now + count" time-units, where the time-units can be "seconds"
0902                                                                     //         (default), "minutes", "hours", days, or weeks, or you can ask that the
0903                                                                     //         allocation be made "today" or "tomorrow".
0904 #define PMIX_ALLOC_CHILD_SEP                "pmix.alloc.sep"        // (bool) Treat the resulting allocation as independent from its parent - i.e.,
0905                                                                     //        do not terminate the allocation upon termination of the parent.
0906 
0907 
0908 /* job control attributes */
0909 #define PMIX_JOB_CTRL_ID                    "pmix.jctrl.id"         // (char*) provide a string identifier for this request
0910 #define PMIX_JOB_CTRL_PAUSE                 "pmix.jctrl.pause"      // (bool) pause the specified processes
0911 #define PMIX_JOB_CTRL_RESUME                "pmix.jctrl.resume"     // (bool) "un-pause" the specified processes
0912 #define PMIX_JOB_CTRL_CANCEL                "pmix.jctrl.cancel"     // (char*) cancel the specified request
0913                                                                     //         (NULL => cancel all requests from this requestor)
0914 #define PMIX_JOB_CTRL_KILL                  "pmix.jctrl.kill"       // (bool) forcibly terminate the specified processes and cleanup
0915 #define PMIX_JOB_CTRL_RESTART               "pmix.jctrl.restart"    // (char*) restart the specified processes using the given checkpoint ID
0916 #define PMIX_JOB_CTRL_CHECKPOINT            "pmix.jctrl.ckpt"       // (char*) checkpoint the specified processes and assign the given ID to it
0917 #define PMIX_JOB_CTRL_CHECKPOINT_EVENT      "pmix.jctrl.ckptev"     // (bool) use event notification to trigger process checkpoint
0918 #define PMIX_JOB_CTRL_CHECKPOINT_SIGNAL     "pmix.jctrl.ckptsig"    // (int) use the given signal to trigger process checkpoint
0919 #define PMIX_JOB_CTRL_CHECKPOINT_TIMEOUT    "pmix.jctrl.ckptsig"    // (int) time in seconds to wait for checkpoint to complete
0920 #define PMIX_JOB_CTRL_CHECKPOINT_METHOD     "pmix.jctrl.ckmethod"   // (pmix_data_array_t*) array of pmix_info_t declaring each
0921                                                                     //      method and value supported by this application
0922 #define PMIX_JOB_CTRL_SIGNAL                "pmix.jctrl.sig"        // (int) send given signal to specified processes
0923 #define PMIX_JOB_CTRL_PROVISION             "pmix.jctrl.pvn"        // (char*) regex identifying nodes that are to be provisioned
0924 #define PMIX_JOB_CTRL_PROVISION_IMAGE       "pmix.jctrl.pvnimg"     // (char*) name of the image that is to be provisioned
0925 #define PMIX_JOB_CTRL_PREEMPTIBLE           "pmix.jctrl.preempt"    // (bool) job can be pre-empted
0926 #define PMIX_JOB_CTRL_TERMINATE             "pmix.jctrl.term"       // (bool) politely terminate the specified procs
0927 #define PMIX_JOB_CTRL_DEFINE_PSET           "pmix.jctrl.defpset"    // (char*) Pset name to be assigned to the targets
0928 #define PMIX_REGISTER_CLEANUP               "pmix.reg.cleanup"      // (char*) comma-delimited list of files to
0929                                                                     //         be removed upon process termination
0930 #define PMIX_REGISTER_CLEANUP_DIR           "pmix.reg.cleanupdir"   // (char*) comma-delimited list of directories to
0931                                                                     //         be removed upon process termination
0932 #define PMIX_CLEANUP_RECURSIVE              "pmix.clnup.recurse"    // (bool) recursively cleanup all subdirectories under the
0933                                                                     //        specified one(s)
0934 #define PMIX_CLEANUP_EMPTY                  "pmix.clnup.empty"      // (bool) only remove empty subdirectories
0935 #define PMIX_CLEANUP_IGNORE                 "pmix.clnup.ignore"     // (char*) comma-delimited list of filenames that are not
0936                                                                     //         to be removed
0937 #define PMIX_CLEANUP_LEAVE_TOPDIR           "pmix.clnup.lvtop"      // (bool) when recursively cleaning subdirs, do not remove
0938                                                                     //        the top-level directory (the one given in the
0939                                                                     //        cleanup request)
0940 #define PMIX_JOB_CTRL_SEP                   "pmix.jctrl.sep"        // (bool) Separate the specified nspace from its parent - i.e., allow
0941                                                                     //        the two to independently terminate.
0942 
0943 
0944 /* session control attributes */
0945 #define PMIX_SESSION_CTRL_ID                "pmix.ssnctrl.id"       // (char*) provide a string identifier for this request
0946 
0947 /* session instantiation attributes - called by scheduler
0948  * Schedulers calling to create a session are required to provide:
0949  *  - the effective userID and groupID that the session should have
0950  *    when instantiated.
0951  *  - description of the resources that are to be included in the session
0952  *  - if applicable, the image that should be provisioned on nodes
0953  *    included in the session
0954  *  - an array of applications (if any) that are to be started in the
0955  *    session once instantiated
0956  */
0957 #define PMIX_SESSION_APP                    "pmix.ssn.app"          // (pmix_data_array_t*) Array of pmix_app_t to be executed in the assigned
0958                                                                     //        session upon session instantiation
0959 #define PMIX_SESSION_PROVISION              "pmix.ssn.pvn"          // (pmix_data_array_t*) description of nodes to be provisioned with
0960                                                                     //       specified image
0961 #define PMIX_SESSION_PROVISION_NODES        "pmix.ssn.pvnnds"       // (char*) regex identifying nodes that are to be provisioned
0962 #define PMIX_SESSION_PROVISION_IMAGE        "pmix.ssn.pvnimg"       // (char*) name of the image that is to be provisioned
0963 
0964 /* session operational attributes - called by scheduler */
0965 #define PMIX_SESSION_PAUSE                  "pmix.ssn.pause"        // (bool) pause all jobs in the specified session
0966 #define PMIX_SESSION_RESUME                 "pmix.ssn.resume"       // (bool) "un-pause" all jobs in the specified session
0967 #define PMIX_SESSION_TERMINATE              "pmix.ssn.terminate"    // (bool) terminate all jobs in the specified session and recover all
0968                                                                     //        resources included in the session.
0969 #define PMIX_SESSION_PREEMPT                "pmix.ssn.preempt"      // (bool) preempt indicated jobs (given in accompanying pmix_info_t via
0970                                                                     //        the PMIX_NSPACE attribute) in the specified session and recover
0971                                                                     //        all their resources. If no PMIX_NSPACE is specified, then preempt
0972                                                                     //        all jobs in the session.
0973 #define PMIX_SESSION_RESTORE                "pmix.ssn.restore"      // (bool) restore indicated jobs (given in accompanying pmix_info_t via
0974                                                                     //        the PMIX_NSPACE attribute) in the specified session, including
0975                                                                     //        all their resources. If no PMIX_NSPACE is specified, then restore
0976                                                                     //        all jobs in the session.
0977 #define PMIX_SESSION_SIGNAL                 "pmix.ssn.sig"          // (int) send given signal to all processes of every job in the session
0978 
0979 /* session operational attributes - called by RTE */
0980 #define PMIX_SESSION_COMPLETE               "pmix.ssn.complete"     // (bool) specified session has completed, all resources have been
0981                                                                     //        recovered and are available for scheduling. Must include
0982                                                                     //        pmix_info_t indicating ID and returned status of any jobs
0983                                                                     //        executing in the session.
0984 
0985 
0986 /* monitoring attributes */
0987 #define PMIX_MONITOR_ID                     "pmix.monitor.id"       // (char*) provide a string identifier for this request
0988 #define PMIX_MONITOR_CANCEL                 "pmix.monitor.cancel"   // (char*) identifier to be canceled (NULL = cancel all
0989                                                                     //         monitoring for this process)
0990 #define PMIX_MONITOR_APP_CONTROL            "pmix.monitor.appctrl"  // (bool) the application desires to control the response to
0991                                                                     //        a monitoring event
0992 #define PMIX_MONITOR_HEARTBEAT              "pmix.monitor.mbeat"    // (bool) register to have the server monitor the requestor for heartbeats
0993 #define PMIX_SEND_HEARTBEAT                 "pmix.monitor.beat"     // (bool) send heartbeat to local server
0994 #define PMIX_MONITOR_HEARTBEAT_TIME         "pmix.monitor.btime"    // (uint32_t) time in seconds before declaring heartbeat missed
0995 #define PMIX_MONITOR_HEARTBEAT_DROPS        "pmix.monitor.bdrop"    // (uint32_t) number of heartbeats that can be missed before
0996                                                                     //            generating the event
0997 #define PMIX_MONITOR_FILE                   "pmix.monitor.fmon"     // (char*) register to monitor file for signs of life
0998 #define PMIX_MONITOR_FILE_SIZE              "pmix.monitor.fsize"    // (bool) monitor size of given file is growing to determine app is running
0999 #define PMIX_MONITOR_FILE_ACCESS            "pmix.monitor.faccess"  // (char*) monitor time since last access of given file to determine app is running
1000 #define PMIX_MONITOR_FILE_MODIFY            "pmix.monitor.fmod"     // (char*) monitor time since last modified of given file to determine app is running
1001 #define PMIX_MONITOR_FILE_CHECK_TIME        "pmix.monitor.ftime"    // (uint32_t) time in seconds between checking file
1002 #define PMIX_MONITOR_FILE_DROPS             "pmix.monitor.fdrop"    // (uint32_t) number of file checks that can be missed before
1003                                                                     //            generating the event
1004 
1005 /* security attributes */
1006 #define PMIX_CRED_TYPE                      "pmix.sec.ctype"        // (char*) when passed in PMIx_Get_credential, a prioritized,
1007                                                                     // comma-delimited list of desired credential types for use
1008                                                                     // in environments where multiple authentication mechanisms
1009                                                                     // may be available. When returned in a callback function, a
1010                                                                     // string identifier of the credential type
1011 #define PMIX_CRYPTO_KEY                     "pmix.sec.key"          // (pmix_byte_object_t) blob containing crypto key
1012 
1013 
1014 /* IO Forwarding Attributes */
1015 #define PMIX_IOF_CACHE_SIZE                 "pmix.iof.csize"        // (uint32_t) requested size of the server cache in bytes for each specified channel.
1016                                                                     //            By default, the server is allowed (but not required) to drop
1017                                                                     //            all bytes received beyond the max size
1018 #define PMIX_IOF_DROP_OLDEST                "pmix.iof.old"          // (bool) in an overflow situation, drop the oldest bytes to make room in the cache
1019 #define PMIX_IOF_DROP_NEWEST                "pmix.iof.new"          // (bool) in an overflow situation, drop any new bytes received until room becomes
1020                                                                     //        available in the cache (default)
1021 #define PMIX_IOF_BUFFERING_SIZE             "pmix.iof.bsize"        // (uint32_t) basically controls grouping of IO on the specified channel(s) to
1022                                                                     //            avoid being called every time a bit of IO arrives. The library
1023                                                                     //            will execute the callback whenever the specified number of bytes
1024                                                                     //            becomes available. Any remaining buffered data will be "flushed"
1025                                                                     //            upon call to deregister the respective channel
1026 #define PMIX_IOF_BUFFERING_TIME             "pmix.iof.btime"        // (uint32_t) max time in seconds to buffer IO before delivering it. Used in conjunction
1027                                                                     //            with buffering size, this prevents IO from being held indefinitely
1028                                                                     //            while waiting for another payload to arrive
1029 #define PMIX_IOF_COMPLETE                   "pmix.iof.cmp"          // (bool) indicates whether or not the specified IO channel has been closed
1030                                                                     //        by the source
1031 #define PMIX_IOF_PUSH_STDIN                 "pmix.iof.stdin"        // (bool) Used by a tool to request that the PMIx library collect
1032                                                                     //        the tool's stdin and forward it to the procs specified in
1033                                                                     //        the PMIx_IOF_push call
1034 #define PMIX_IOF_TAG_OUTPUT                 "pmix.iof.tag"          // (bool) Tag output with the [local jobid,rank] and channel it comes from
1035 #define PMIX_IOF_TAG_DETAILED_OUTPUT        "pmix.iof.tagdet"       // (bool) Tag output with the [local jobid,rank][hostname:pid] and channel it comes from
1036 #define PMIX_IOF_TAG_FULLNAME_OUTPUT        "pmix.iof.tagfull"      // (bool) Tag output with the [nspace,rank] and channel it comes from
1037 #define PMIX_IOF_RANK_OUTPUT                "pmix.iof.rank"         // (bool) Tag output with the rank it came from
1038 #define PMIX_IOF_TIMESTAMP_OUTPUT           "pmix.iof.ts"           // (bool) Timestamp output
1039 #define PMIX_IOF_MERGE_STDERR_STDOUT        "pmix.iof.mrg"          // (bool) merge stdout and stderr streams from application procs
1040 #define PMIX_IOF_XML_OUTPUT                 "pmix.iof.xml"          // (bool) Format output in XML
1041 #define PMIX_IOF_OUTPUT_TO_FILE             "pmix.iof.file"         // (char*) direct application output into files of form
1042                                                                     //         "<filename>.rank" with both stdout and stderr redirected into it
1043 #define PMIX_IOF_FILE_PATTERN               "pmix.iof.fpt"          // (bool) Specified output file is to be treated as a pattern and not
1044                                                                     //        automatically annotated by nspace, rank, or other parameters
1045 #define PMIX_IOF_OUTPUT_TO_DIRECTORY        "pmix.iof.dir"          // (char*) direct application output into files of form
1046                                                                     //         "<directory>/<jobid>/rank.<rank>/stdout[err]"
1047 #define PMIX_IOF_FILE_ONLY                  "pmix.iof.fonly"        // (bool) output only into designated files - do not also output
1048                                                                     //        a copy to stdout/stderr
1049 #define PMIX_IOF_COPY                       "pmix.iof.cpy"          // (bool) Requests that the host environment deliver a copy of the
1050                                                                     //        specified output stream(s) to the tool, letting the stream(s)
1051                                                                     //        continue to also be delivered to the default location. This
1052                                                                     //        allows the tool to tap into the output stream(s) without
1053                                                                     //        redirecting it from its current final destination.
1054 #define PMIX_IOF_REDIRECT                   "pmix.iof.redir"        // (bool) Requests that the host environment intercept the specified
1055                                                                     //        output stream(s) and deliver it to the requesting tool instead
1056                                                                     //        of its current final destination. This might be used, for
1057                                                                     //        example, during a debugging procedure to avoid injection of
1058                                                                     //        debugger-related output into the application's results file.
1059                                                                     //        The original output stream(s) destination is restored upon
1060                                                                     //        termination of the tool.
1061 #define PMIX_IOF_LOCAL_OUTPUT               "pmix.iof.local"        // (bool) Write output streams to local stdout/err
1062 #define PMIX_IOF_OUTPUT_RAW                 "pmix.iof.raw"          // (bool) Do not buffer output to be written as complete lines - output
1063                                                                     //        characters as the stream delivers them
1064 
1065 /* Attributes for controlling contents of application setup data */
1066 #define PMIX_SETUP_APP_ENVARS               "pmix.setup.env"        // (bool) harvest and include relevant envars
1067 #define PMIX_SETUP_APP_NONENVARS            "pmix.setup.nenv"       // (bool) include all non-envar data
1068 #define PMIX_SETUP_APP_ALL                  "pmix.setup.all"        // (bool) include all relevant data
1069 
1070 /* Attributes supporting the PMIx Groups APIs */
1071 #define PMIX_GROUP_ID                       "pmix.grp.id"           // (char*) user-provided group identifier
1072 #define PMIX_GROUP_LEADER                   "pmix.grp.ldr"          // (bool) this process is the leader of the group
1073 #define PMIX_GROUP_OPTIONAL                 "pmix.grp.opt"          // (bool) participation is optional - do not return an error if any of the
1074                                                                     //        specified processes terminate without having joined. The default
1075                                                                     //        is false
1076 #define PMIX_GROUP_NOTIFY_TERMINATION       "pmix.grp.notterm"      // (bool) notify remaining members when another member terminates without first
1077                                                                     //        leaving the group. The default is false
1078 #define PMIX_GROUP_FT_COLLECTIVE            "pmix.grp.ftcoll"       // (bool) adjust internal tracking for terminated processes. Default is false
1079 #define PMIX_GROUP_MEMBERSHIP               "pmix.grp.mbrs"         // (pmix_data_array_t*) array of group member ID's
1080 #define PMIX_GROUP_ASSIGN_CONTEXT_ID        "pmix.grp.actxid"       // (bool) request that the RM assign a unique numerical (size_t) ID to this group
1081 #define PMIX_GROUP_CONTEXT_ID               "pmix.grp.ctxid"        // (size_t) context ID assigned to group
1082 #define PMIX_GROUP_LOCAL_ONLY               "pmix.grp.lcl"          // (bool) group operation only involves local procs
1083 #define PMIX_GROUP_ENDPT_DATA               "pmix.grp.endpt"        // (pmix_byte_object_t) data collected to be shared during construction
1084 #define PMIX_GROUP_NAMES                    "pmix.pgrp.nm"          // (pmix_data_array_t*) Returns an array of string names of the process groups
1085                                                                     //        in which the given process is a member.
1086 #define PMIX_GROUP_INFO                     "pmix.grp.info"         // (pmix_data_array_t*) Array of pmix_info_t containing data that is to be
1087                                                                     //        shared across all members of a group during group construction
1088 #define PMIX_GROUP_LOCAL_CID                "pmix.grp.lclid"        // (size_t) local context ID for the specified process member of a group
1089 #define PMIX_GROUP_ADD_MEMBERS              "pmix.grp.add"          // (pmix_data_array_t*) Array of pmix_proc_t identifying procs that are not
1090                                                                     //        included in the membership specified in the procs array passed to
1091                                                                     //        the PMIx_Group_construct[_nb] call, but are to be included in the
1092                                                                     //        final group. The identified procs will be sent an invitation to
1093                                                                     //        join the group during the construction procedure. This is used when
1094                                                                     //        some members of the proposed group do not know the full membership
1095                                                                     //        and therefore cannot include all members in the call to construct.
1096 
1097 /* Storage-Related Attributes */
1098 #define PMIX_QUERY_STORAGE_LIST             "pmix.strg.list"       // (char*) return comma-delimited list of identifiers for all available storage systems
1099 #define PMIX_STORAGE_CAPACITY_LIMIT         "pmix.strg.cap"        // (uint64_t) return overall capacity (in Megabytes[base2]) of specified storage system
1100 #define PMIX_STORAGE_OBJECT_LIMIT           "pmix.strg.obj"        // (uint64_t) return overall limit on number of objects (e.g., inodes) of specified storage system
1101 
1102 #define PMIX_STORAGE_ID                     "pmix.strg.id"         // (char*) identifier of the storage system being referenced
1103 #define PMIX_STORAGE_PATH                   "pmix.strg.path"       // (char*) Mount point corresponding to a specified storage ID
1104 #define PMIX_STORAGE_TYPE                   "pmix.strg.type"       // (char*) Qualifier indicating the type of storage being referenced by a query
1105                                                                    //         (e.g., lustre, gpfs, online, fabric-attached, ...)
1106 #define PMIX_STORAGE_ACCESSIBILITY          "pmix.strg.access"     // (pmix_storage_accessibility_t) Accessibility level of the storage system
1107                                                                    //         (e.g., within same node, within same session)
1108 #define PMIX_STORAGE_ACCESS_TYPE            "pmix.strg.atype"      // (pmix_storage_access_type_t) Qualifier describing the type of storage access to return
1109                                                                    //       information for (e.g., for qualifying PMIX_STORAGE_BW_CUR, PMIX_STORAGE_IOPS_CUR,
1110                                                                    //       or PMIX_STORAGE_SUGGESTED_XFER_SIZE attributes)
1111 #define PMIX_STORAGE_BW_CUR                 "pmix.strg.bwcur"      // (double) Observed bandwidth (in bytes/sec) for storage system - provided as a
1112                                                                    //       recently observed bandwidth value, with the exact measurement interval
1113                                                                    //       depending on the storage system and/or PMIx library implementation
1114 #define PMIX_STORAGE_BW_MAX                 "pmix.strg.bwmax"      // (double) Maximum bandwidth (in bytes/sec) for storage system - provided as the
1115                                                                    //       theoretical maximum or the maximum observed bandwidth value
1116 #define PMIX_STORAGE_CAPACITY_USED          "pmix.strg.capuse"     // (double) Overall used capacity (in bytes) for the storage system
1117 #define PMIX_STORAGE_IOPS_CUR               "pmix.strg.iopscur"    // (double) Observed IOPS (in I/O operations per second) for storage system - provided
1118                                                                    //       as a recently observed IOPS value, with the exact measurement interval depending
1119                                                                    //       on the storage system and/or PMIx library implementation
1120 #define PMIX_STORAGE_IOPS_MAX               "pmix.strg.iopsmax"    // (double) Maximum IOPS (in I/O operations per second) for storage system - provided
1121                                                                    //       as the theoretical maximum or the maximum observed IOPS value
1122 #define PMIX_STORAGE_MEDIUM                 "pmix.strg.medium"     // (pmix_storage_medium_t) Types of storage mediums utilized by the storage system
1123                                                                    //       (e.g., SSDs, HDDs, tape)
1124 #define PMIX_STORAGE_MINIMAL_XFER_SIZE      "pmix.strg.minxfer"    // (double) Minimal transfer size (in bytes) for the storage system - this is the
1125                                                                    //       storage system's atomic unit of transfer (e.g., block size)
1126 #define PMIX_STORAGE_OBJECTS_USED           "pmix.strg.objuse"     // (uint64_t) Overall used number of objects (e.g., inodes) for the storage system
1127 #define PMIX_STORAGE_PERSISTENCE            "pmix.strg.persist"    // (pmix_storage_persistence_t) Persistence level of the storage system
1128                                                                    //       (e.g., sratch storage or archive storage)
1129 #define PMIX_STORAGE_SUGGESTED_XFER_SIZE    "pmix.strg.sxfer"      // (double) Suggested transfer size (in bytes) for the storage system
1130 #define PMIX_STORAGE_VERSION                "pmix.strg.ver"        // (char*) Version string for the storage system
1131 
1132 
1133 /* Fabric-related Attributes */
1134 #define PMIX_FABRIC_COST_MATRIX             "pmix.fab.cm"          // (pointer) Pointer to a two-dimensional array of point-to-point relative
1135                                                                    //           communication costs expressed as uint16_t values
1136 #define PMIX_FABRIC_GROUPS                  "pmix.fab.grps"        // (char*) A string delineating the group membership of nodes in the system,
1137                                                                    //         where each fabric group consists of the group number followed by
1138                                                                    //         a colon and a comma-delimited list of nodes in that group, with the
1139                                                                    //         groups delimited by semi-colons (e.g.,
1140                                                                    //         0:node000,node002,node004,node006;1:node001,node003,node005,node007)
1141 #define PMIX_FABRIC_VENDOR                  "pmix.fab.vndr"        // (char*) Name of fabric vendor (e.g., Amazon, Mellanox, HPE, Intel)
1142 #define PMIX_FABRIC_IDENTIFIER              "pmix.fab.id"          // (char*) An identifier for the fabric (e.g., MgmtEthernet, Slingshot-11,
1143                                                                    //         OmniPath-1)
1144 #define PMIX_FABRIC_INDEX                   "pmix.fab.idx"         // (size_t) The index of the fabric as returned in pmix_fabric_t
1145 #define PMIX_FABRIC_COORDINATES             "pmix.fab.coord"       // (pmix_data_array_t*) Array of pmix_geometry_t fabric coordinates for
1146                                                                    //          devices on the specified node. The array will contain the
1147                                                                    //          coordinates of all devices on the node, including values for
1148                                                                    //          all supported coordinate views. The information for devices
1149                                                                    //          on the local node shall be provided if the node is not
1150                                                                    //          specified in the request.
1151 #define PMIX_FABRIC_DEVICE_VENDORID         "pmix.fabdev.vendid"   // (char*) This is a vendor-provided identifier for the device or product.
1152 #define PMIX_FABRIC_NUM_DEVICES             "pmix.fab.nverts"      // (size_t) Total number of fabric devices in the system - corresponds to
1153                                                                    //          the number of rows or columns in the cost matrix
1154 #define PMIX_FABRIC_DIMS                    "pmix.fab.dims"        // (uint32_t) Number of dimensions in the specified fabric plane/view. If no
1155                                                                    //          plane is specified in a request, then the dimensions of all planes
1156                                                                    //          in the overall system will be returned as a pmix_data_array_t
1157                                                                    //          containing an array of uint32_t values. Default is to
1158                                                                    //          provide dimensions in logical view.
1159 
1160 #define PMIX_FABRIC_PLANE                   "pmix.fab.plane"       // (char*) ID string of a fabric plane (e.g., CIDR for Ethernet). When used as
1161                                                                    //          a modifier in a request for information, specifies the plane whose
1162                                                                    //          information is to be returned. When used directly as a key in a
1163                                                                    //          request, returns a pmix_data_array_t of string
1164                                                                    //          identifiers for all fabric planes in the overall system.
1165 
1166 #define PMIX_FABRIC_SWITCH                  "pmix.fab.switch"      // (char*) ID string of a fabric switch. When used as a modifier in a request
1167                                                                    //         for information, specifies the switch whose information is to be
1168                                                                    //         returned. When used directly as a key in a request, returns a
1169                                                                    //         pmix_data_array_t of string identifiers for all fabric switches in
1170                                                                    //         the overall system.
1171 
1172 #define PMIX_FABRIC_ENDPT                   "pmix.fab.endpt"       // (pmix_data_array_t*) Fabric endpoints for a specified process. As multiple
1173                                                                    //         endpoints may be assigned to a given process (e.g., in the case
1174                                                                    //         where multiple devices are associated with a package to which the
1175                                                                    //         process is bound), the returned values will be provided in a
1176                                                                    //         pmix_data_array_t of pmix_endpoint_t elements.
1177 
1178 #define PMIX_FABRIC_SHAPE                   "pmix.fab.shape"       // (pmix_data_array_t*) The size of each dimension in the specified fabric
1179                                                                    //         plane/view, returned in a pmix_data_array_t containing an array of
1180                                                                    //         uint32_t values. The size is defined as the number of elements
1181                                                                    //         present in that dimension - e.g., the number of devices in one
1182                                                                    //         dimension of a physical view of a fabric plane. If no plane is
1183                                                                    //         specified, then the shape of each plane in the overall system will
1184                                                                    //         be returned in a pmix_data_array_t array where each element is
1185                                                                    //         itself a two-element array containing the PMIX_FABRIC_PLANE
1186                                                                    //         followed by that plane's fabric shape. Default is to provide the
1187                                                                    //         shape in logical view.
1188 
1189 #define PMIX_FABRIC_SHAPE_STRING            "pmix.fab.shapestr"    // (char*) Network shape expressed as a string (e.g., "10x12x2"). If no plane
1190                                                                    //         is specified, then the shape of each plane in the overall system
1191                                                                    //         will be returned in a pmix_data_array_t array where
1192                                                                    //         each element is itself a two-element array containing the
1193                                                                    //         PMIX_FABRIC_PLANE followed by that plane's fabric shape string.
1194                                                                    //         Default is to provide the shape in logical view.
1195 
1196 #define PMIX_SWITCH_PEERS                   "pmix.speers"          // (char*) Peer ranks that share the same switch as the process specified in
1197                                                                    //         the call to PMIx_Get. Returns a pmix_data_array_t array of
1198                                                                    //         pmix_info_t results, each element containing the PMIX_SWITCH_PEERS
1199                                                                    //         key with a three-element pmix_data_array_t array of pmix_info_t
1200                                                                    //         containing the PMIX_FABRIC_DEVICE_ID of the local fabric device,
1201                                                                    //         the PMIX_FABRIC_SWITCH identifying the switch to which it is
1202                                                                    //         connected, and a comma-delimited string of peer ranks sharing the
1203                                                                    //         switch to which that device is connected.
1204 #define PMIX_FABRIC_DEVICE                  "pmix.fabdev"          // (pmix_data_array_t*) An array of pmix_info_t describing a particular
1205                                                                    //         fabric device. The first element in the array shall be the
1206                                                                    //         PMIX_FABRIC_DEVICE_ID of the device
1207 #define PMIX_FABRIC_DEVICES                 "pmix.fab.devs"        // (pmix_data_array_t*) Array of pmix_info_t containing information for all
1208                                                                    //         devices on the specified node. Each element of the array will contain
1209                                                                    //         a PMIX_FABRIC_DEVICE entry, which in turn will contain an array of
1210                                                                    //         information on a given device.
1211 #define PMIX_FABRIC_DEVICE_NAME             "pmix.fabdev.nm"       // (char*) The operating system name associated with the device. This may be
1212                                                                    //         a logical fabric interface name (e.g. eth0 or eno1) or an absolute
1213                                                                    //         filename.
1214 #define PMIX_FABRIC_DEVICE_INDEX            "pmix.fabdev.idx"      // (uint32_t) Index of the device within an associated communication cost
1215                                                                    //         matrix.
1216 
1217 #define PMIX_FABRIC_DEVICE_VENDOR           "pmix.fabdev.vndr"     // (char*) Indicates the name of the vendor that distributes the NIC.
1218 #define PMIX_FABRIC_DEVICE_BUS_TYPE         "pmix.fabdev.btyp"     // (char*) The type of bus to which the device is attached (e.g., "PCI",
1219                                                                    //         "GEN-Z").
1220 #define PMIX_FABRIC_DEVICE_DRIVER           "pmix.fabdev.driver"   // (char*) The name of the driver associated with the device
1221 #define PMIX_FABRIC_DEVICE_FIRMWARE         "pmix.fabdev.fmwr"     // (char*) The device's firmware version
1222 #define PMIX_FABRIC_DEVICE_ADDRESS          "pmix.fabdev.addr"     // (char*) The primary link-level address associated with the device, such as a
1223                                                                    //         MAC address. If multiple addresses are available, only one will be
1224                                                                    //         reported.
1225 #define PMIX_FABRIC_DEVICE_COORDINATES      "pmix.fab.coord"       // (pmix_geometry_t) The pmix_geometry_t fabric coordinates for the device, including
1226                                                                    //          values for all supported coordinate views.
1227 #define PMIX_FABRIC_DEVICE_MTU              "pmix.fabdev.mtu"      // (size_t) The maximum transfer unit of link level frames or packets,
1228                                                                    //          in bytes.
1229 #define PMIX_FABRIC_DEVICE_SPEED            "pmix.fabdev.speed"    // (size_t) The active link data rate, given in bits per second.
1230 #define PMIX_FABRIC_DEVICE_STATE            "pmix.fabdev.state"    // (pmix_link_state_t) The last available physical port state. Possible values
1231                                                                    //          are PMIX_LINK_STATE_UNKNOWN, PMIX_LINK_DOWN, and PMIX_LINK_UP, to
1232                                                                    //          indicate if the port state is unknown or not applicable (unknown),
1233                                                                    //          inactive (down), or active (up).
1234 #define PMIX_FABRIC_DEVICE_TYPE             "pmix.fabdev.type"     // (char*) Specifies the type of fabric interface currently active on the
1235                                                                    //         device, such as Ethernet or InfiniBand.
1236 #define PMIX_FABRIC_DEVICE_PCI_DEVID        "pmix.fabdev.pcidevid" // (char*) A node-level unique identifier for a PCI device. Provided only if the
1237                                                                    //         device is located on a \ac{PCI} bus. The identifier is constructed as
1238                                                                    //         a four-part tuple delimited by colons comprised of the \ac{PCI} 16-bit
1239                                                                    //         domain, 8-bit bus, 8-bit device, and 8-bit function IDs, each expressed
1240                                                                    //         in zero-extended hexadecimal form. Thus, an example identifier might be
1241                                                                    //         "abc1:0f:23:01". The combination of node identifier PMIX_HOSTNAME or
1242                                                                    //         PMIX_NODEID and PMIX_FABRIC_DEVICE_PCI_DEVID shall be unique within the
1243                                                                    //         system.
1244 
1245 
1246 /* Distance Attributes */
1247 #define PMIX_DEVICE_DISTANCES               "pmix.dev.dist"        // (pmix_data_array_t*) Return an array of pmix_device_distance_t containing the
1248                                                                    //         minimum and maximum distances of the given process location to all
1249                                                                    //         devices of the specified type on the local node.
1250 #define PMIX_DEVICE_TYPE                    "pmix.dev.type"        // (pmix_device_type_t) Bitmask specifying the type(s) of device(s) whose
1251                                                                    //         information is being requested. Only used as a directive/qualifier.
1252 #define PMIX_DEVICE_ID                      "pmix.dev.id"          // (char*) System-wide UUID or node-local OS name of a particular device.
1253 
1254 
1255 /* Descriptive Attributes */
1256 #define PMIX_MAX_VALUE                      "pmix.descr.maxval"    // (varies) Used in pmix_regattr_t to describe the maximum valid value
1257                                                                    //          for the associated attribute.
1258 #define PMIX_MIN_VALUE                      "pmix.descr.minval"    // (varies) Used in pmix_regattr_t to describe the minimum valid value
1259                                                                    //          for the associated attribute.
1260 #define PMIX_ENUM_VALUE                     "pmix.descr.enum"      // (char*) Used in pmix_regattr_t to describe accepted values for the
1261                                                                    //         associated attribute. Numerical values shall be presented in
1262                                                                    //         a form convertible to the attribute's declared data type.
1263                                                                    //         Named values (i.e., values defined by constant names via a
1264                                                                    //         typical C-language enum declaration) must be provided as
1265                                                                    //         their numerical equivalent.
1266 #define PMIX_QUERY_STABLE_ABI_VERSION       "pmix.qry.stabiver"    // (char*) The PMIx Standard Stable ABI version supported returned in the form of a comma separated list of "MAJOR.MINOR"
1267                                                                    //         This attribute can be used with PMIx_Query_info outside of the init/finalize region.
1268 #define PMIX_QUERY_PROVISIONAL_ABI_VERSION  "pmix.qry.prabiver"    // (char*) The PMIx Standard Provisional ABI version supported returned in the form of a comma separated "MAJOR.MINOR"
1269                                                                    //         This attribute can be used with PMIx_Query_info outside of the init/finalize region.
1270 
1271 #define PMIX_VERSION_NUMERIC                "pmix.vers.num"        // (uint32_t) Numeric representation of the version of the PMIx library
1272                                                                    //            being used
1273 
1274 
1275 /****    PROCESS STATE DEFINITIONS    ****/
1276 typedef uint8_t pmix_proc_state_t;
1277 #define PMIX_PROC_STATE_UNDEF                    0  /* undefined process state */
1278 #define PMIX_PROC_STATE_PREPPED                  1  /* process is ready to be launched */
1279 #define PMIX_PROC_STATE_LAUNCH_UNDERWAY          2  /* launch process underway */
1280 #define PMIX_PROC_STATE_RESTART                  3  /* the proc is ready for restart */
1281 #define PMIX_PROC_STATE_TERMINATE                4  /* process is marked for termination */
1282 #define PMIX_PROC_STATE_RUNNING                  5  /* daemon has locally fork'd process */
1283 #define PMIX_PROC_STATE_CONNECTED                6  /* proc connected to PMIx server */
1284 /*
1285 * Define a "boundary" so users can easily and quickly determine
1286 * if a proc is still running or not - any value less than
1287 * this one means that the proc has not terminated
1288 */
1289 #define PMIX_PROC_STATE_UNTERMINATED            15
1290 
1291 #define PMIX_PROC_STATE_TERMINATED              20  /* process has terminated and is no longer running */
1292 /* Define a boundary so users can easily and quickly determine
1293 * if a proc abnormally terminated - leave a little room
1294 * for future expansion
1295 */
1296 #define PMIX_PROC_STATE_ERROR                   50
1297 /* Define specific error code values */
1298 #define PMIX_PROC_STATE_KILLED_BY_CMD           (PMIX_PROC_STATE_ERROR +  1)  /* process was killed by cmd */
1299 #define PMIX_PROC_STATE_ABORTED                 (PMIX_PROC_STATE_ERROR +  2)  /* process aborted */
1300 #define PMIX_PROC_STATE_FAILED_TO_START         (PMIX_PROC_STATE_ERROR +  3)  /* process failed to start */
1301 #define PMIX_PROC_STATE_ABORTED_BY_SIG          (PMIX_PROC_STATE_ERROR +  4)  /* process aborted by signal */
1302 #define PMIX_PROC_STATE_TERM_WO_SYNC            (PMIX_PROC_STATE_ERROR +  5)  /* process exit'd w/o calling PMIx_Finalize */
1303 #define PMIX_PROC_STATE_COMM_FAILED             (PMIX_PROC_STATE_ERROR +  6)  /* process communication has failed */
1304 #define PMIX_PROC_STATE_SENSOR_BOUND_EXCEEDED   (PMIX_PROC_STATE_ERROR +  7)  /* process exceeded a sensor limit */
1305 #define PMIX_PROC_STATE_CALLED_ABORT            (PMIX_PROC_STATE_ERROR +  8)  /* process called "PMIx_Abort" */
1306 #define PMIX_PROC_STATE_HEARTBEAT_FAILED        (PMIX_PROC_STATE_ERROR +  9)  /* process failed to send heartbeat w/in time limit */
1307 #define PMIX_PROC_STATE_MIGRATING               (PMIX_PROC_STATE_ERROR + 10)  /* process failed and is waiting for resources before restarting */
1308 #define PMIX_PROC_STATE_CANNOT_RESTART          (PMIX_PROC_STATE_ERROR + 11)  /* process failed and cannot be restarted */
1309 #define PMIX_PROC_STATE_TERM_NON_ZERO           (PMIX_PROC_STATE_ERROR + 12)  /* process exited with a non-zero status, indicating abnormal */
1310 #define PMIX_PROC_STATE_FAILED_TO_LAUNCH        (PMIX_PROC_STATE_ERROR + 13)  /* unable to launch process */
1311 
1312 
1313 /****    JOB STATE DEFINITIONS    ****/
1314 typedef uint8_t pmix_job_state_t;
1315 #define PMIX_JOB_STATE_UNDEF                     0  // undefined process state
1316 #define PMIX_JOB_STATE_AWAITING_ALLOC            1  // Job is waiting for resources to be allocated to it
1317 #define PMIX_JOB_STATE_LAUNCH_UNDERWAY           2  // job launch underway
1318 #define PMIX_JOB_STATE_RUNNING                   3  // all procs have been spawned
1319 #define PMIX_JOB_STATE_SUSPENDED                 4  // job has been suspended
1320 #define PMIX_JOB_STATE_CONNECTED                 5  // all procs have connected to their PMIx server
1321 
1322 /*
1323 * Define a "boundary" so users can easily and quickly determine
1324 * if a job is still running or not - any value less than
1325 * this one means that the job has not terminated
1326 */
1327 #define PMIX_JOB_STATE_UNTERMINATED             15
1328 
1329 #define PMIX_JOB_STATE_TERMINATED               20  // job has terminated and is no longer running - typically will
1330                                                     // be accompanied by the job exit status in response to a query
1331 
1332 /* Define a boundary so users can easily and quickly determine
1333 * if a job abnormally terminated - leave a little room
1334 * for future expansion
1335 */
1336 #define PMIX_JOB_STATE_TERMINATED_WITH_ERROR    50  // job has terminated and is no longer running - typically will
1337                                                     // be accompanied by a job-related error code in response to a query
1338 
1339 
1340 /****    PMIX ERROR CONSTANTS    ****/
1341 /* PMIx errors are always negative, with 0 reserved for success */
1342 typedef int pmix_status_t;
1343 
1344 /* v1.x error values - must be fixed in place for backward
1345  * compatibility. Note that some number of these have been
1346  * deprecated and may not be returned by v2.x and above
1347  * clients or servers. However, they must always be
1348  * at least defined to ensure older codes will compile */
1349 #define PMIX_SUCCESS                                 0
1350 #define PMIX_ERROR                                  -1          // general error
1351 /* fault tolerance */
1352 #define PMIX_ERR_PROC_RESTART                       -4
1353 #define PMIX_ERR_PROC_CHECKPOINT                    -5
1354 #define PMIX_ERR_PROC_MIGRATE                       -6
1355 #define PMIX_ERR_EXISTS                             -11
1356 /* communication failures */
1357 #define PMIX_ERR_INVALID_CRED                       -12
1358 #define PMIX_ERR_WOULD_BLOCK                        -15
1359 #define PMIX_ERR_UNKNOWN_DATA_TYPE                  -16
1360 #define PMIX_ERR_TYPE_MISMATCH                      -18
1361 #define PMIX_ERR_UNPACK_INADEQUATE_SPACE            -19
1362 #define PMIX_ERR_UNPACK_FAILURE                     -20
1363 #define PMIX_ERR_PACK_FAILURE                       -21
1364 #define PMIX_ERR_NO_PERMISSIONS                     -23
1365 #define PMIX_ERR_TIMEOUT                            -24
1366 #define PMIX_ERR_UNREACH                            -25
1367 #define PMIX_ERR_BAD_PARAM                          -27
1368 #define PMIX_ERR_RESOURCE_BUSY                      -28
1369 #define PMIX_ERR_OUT_OF_RESOURCE                    -29
1370 #define PMIX_ERR_INIT                               -31
1371 #define PMIX_ERR_NOMEM                              -32
1372 #define PMIX_ERR_NOT_FOUND                          -46
1373 #define PMIX_ERR_NOT_SUPPORTED                      -47
1374 #define PMIX_ERR_PARAM_VALUE_NOT_SUPPORTED          -59
1375 #define PMIX_ERR_COMM_FAILURE                       -49
1376 #define PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER     -50
1377 #define PMIX_ERR_CONFLICTING_CLEANUP_DIRECTIVES     -51
1378 #define PMIX_ERR_PARTIAL_SUCCESS                    -52
1379 #define PMIX_ERR_DUPLICATE_KEY                      -53
1380 #define PMIX_ERR_EMPTY                              -60
1381 #define PMIX_ERR_LOST_CONNECTION                    -61
1382 #define PMIX_ERR_EXISTS_OUTSIDE_SCOPE               -62
1383 
1384 /* Process set */
1385 #define PMIX_PROCESS_SET_DEFINE                     -55
1386 #define PMIX_PROCESS_SET_DELETE                     -56
1387 
1388 /* Debugger ops */
1389 #define PMIX_DEBUGGER_RELEASE                       -3      // replaced deprecated PMIX_ERR_DEBUGGER_RELEASE
1390 #define PMIX_READY_FOR_DEBUG                        -58     // accompanied by PMIX_BREAKPOINT indicating where proc is waiting
1391 
1392 /* query errors */
1393 #define PMIX_QUERY_PARTIAL_SUCCESS                  -104
1394 
1395 /* job control */
1396 #define PMIX_JCTRL_CHECKPOINT                       -106    // monitored by client to trigger checkpoint operation
1397 #define PMIX_JCTRL_CHECKPOINT_COMPLETE              -107    // sent by client and monitored by server to notify that requested
1398                                                             //     checkpoint operation has completed
1399 #define PMIX_JCTRL_PREEMPT_ALERT                    -108    // monitored by client to detect RM intends to preempt
1400 
1401 /* monitoring */
1402 #define PMIX_MONITOR_HEARTBEAT_ALERT                -109
1403 #define PMIX_MONITOR_FILE_ALERT                     -110
1404 #define PMIX_PROC_TERMINATED                        -111
1405 
1406 /* operational */
1407 #define PMIX_ERR_EVENT_REGISTRATION                 -144
1408 #define PMIX_MODEL_DECLARED                         -147
1409 #define PMIX_MODEL_RESOURCES                        -151     // model resource usage has changed
1410 #define PMIX_OPENMP_PARALLEL_ENTERED                -152     // an OpenMP parallel region has been entered
1411 #define PMIX_OPENMP_PARALLEL_EXITED                 -153     // an OpenMP parallel region has completed
1412 #define PMIX_LAUNCHER_READY                         -155
1413 #define PMIX_OPERATION_IN_PROGRESS                  -156
1414 #define PMIX_OPERATION_SUCCEEDED                    -157
1415 #define PMIX_ERR_INVALID_OPERATION                  -158
1416 #define PMIX_GROUP_INVITED                          -159
1417 #define PMIX_GROUP_LEFT                             -160
1418 #define PMIX_GROUP_INVITE_ACCEPTED                  -161
1419 #define PMIX_GROUP_INVITE_DECLINED                  -162
1420 #define PMIX_GROUP_INVITE_FAILED                    -163
1421 #define PMIX_GROUP_MEMBERSHIP_UPDATE                -164
1422 #define PMIX_GROUP_CONSTRUCT_ABORT                  -165
1423 #define PMIX_GROUP_CONSTRUCT_COMPLETE               -166
1424 #define PMIX_GROUP_LEADER_SELECTED                  -167
1425 #define PMIX_GROUP_LEADER_FAILED                    -168
1426 #define PMIX_GROUP_CONTEXT_ID_ASSIGNED              -169
1427 #define PMIX_GROUP_MEMBER_FAILED                    -170
1428 #define PMIX_ERR_REPEAT_ATTR_REGISTRATION           -171
1429 #define PMIX_ERR_IOF_FAILURE                        -172
1430 #define PMIX_ERR_IOF_COMPLETE                       -173
1431 #define PMIX_LAUNCH_COMPLETE                        -174     // include nspace of the launched job with notification
1432 #define PMIX_FABRIC_UPDATED                         -175
1433 #define PMIX_FABRIC_UPDATE_PENDING                  -176
1434 #define PMIX_FABRIC_UPDATE_ENDPOINTS                -113
1435 
1436 /* job-related errors */
1437 #define PMIX_ERR_JOB_APP_NOT_EXECUTABLE             -177
1438 #define PMIX_ERR_JOB_NO_EXE_SPECIFIED               -178
1439 #define PMIX_ERR_JOB_FAILED_TO_MAP                  -179
1440 #define PMIX_ERR_JOB_CANCELED                       -180
1441 #define PMIX_ERR_JOB_FAILED_TO_LAUNCH               -181
1442 #define PMIX_ERR_JOB_ABORTED                        -182
1443 #define PMIX_ERR_JOB_KILLED_BY_CMD                  -183
1444 #define PMIX_ERR_JOB_ABORTED_BY_SIG                 -184
1445 #define PMIX_ERR_JOB_TERM_WO_SYNC                   -185
1446 #define PMIX_ERR_JOB_SENSOR_BOUND_EXCEEDED          -186
1447 #define PMIX_ERR_JOB_NON_ZERO_TERM                  -187
1448 #define PMIX_ERR_JOB_ALLOC_FAILED                   -188
1449 #define PMIX_ERR_JOB_ABORTED_BY_SYS_EVENT           -189
1450 #define PMIX_ERR_JOB_EXE_NOT_FOUND                  -190
1451 #define PMIX_ERR_JOB_WDIR_NOT_FOUND                 -233
1452 #define PMIX_ERR_JOB_INSUFFICIENT_RESOURCES         -234
1453 #define PMIX_ERR_JOB_SYS_OP_FAILED                  -235
1454 
1455 /* job/session-related non-error events */
1456 #define PMIX_EVENT_JOB_START                        -191
1457 #define PMIX_EVENT_JOB_END                          -145
1458 #define PMIX_EVENT_SESSION_START                    -192
1459 #define PMIX_EVENT_SESSION_END                      -193
1460 
1461 /* process-related events */
1462 #define PMIX_ERR_PROC_REQUESTED_ABORT               -8
1463 #define PMIX_ERR_PROC_TERM_WO_SYNC                  -200
1464 #define PMIX_EVENT_PROC_TERMINATED                  -201
1465 #define PMIX_ERR_PROC_KILLED_BY_CMD                 -400
1466 #define PMIX_ERR_PROC_FAILED_TO_START               -401
1467 #define PMIX_ERR_PROC_ABORTED_BY_SIG                -402
1468 #define PMIX_ERR_PROC_SENSOR_BOUND_EXCEEDED         -403
1469 #define PMIX_ERR_EXIT_NONZERO_TERM                  -404
1470 
1471 /* system failures */
1472 #define PMIX_EVENT_SYS_BASE                         -230
1473 #define PMIX_EVENT_NODE_DOWN                        -231
1474 #define PMIX_EVENT_NODE_OFFLINE                     -232
1475 #define PMIX_EVENT_SYS_OTHER                        -330
1476 
1477 
1478 /* define a macro for identifying system event values */
1479 #define PMIX_SYSTEM_EVENT(a)   \
1480     ((a) <= PMIX_EVENT_SYS_BASE && PMIX_EVENT_SYS_OTHER <= (a))
1481 
1482 /* used by event handlers */
1483 #define PMIX_EVENT_NO_ACTION_TAKEN                  -331
1484 #define PMIX_EVENT_PARTIAL_ACTION_TAKEN             -332
1485 #define PMIX_EVENT_ACTION_DEFERRED                  -333
1486 #define PMIX_EVENT_ACTION_COMPLETE                  -334
1487 
1488 /* define a starting point for user-level defined error
1489  * constants - negative values larger than this are guaranteed
1490  * not to conflict with PMIx values. Definitions should always
1491  * be based on the PMIX_EXTERNAL_ERR_BASE constant and -not- a
1492  * specific value as the value of the constant may change */
1493 #define PMIX_EXTERNAL_ERR_BASE                      -3000
1494 
1495 /* define the results values for comparisons */
1496 typedef enum {
1497     PMIX_EQUAL,
1498     PMIX_VALUE1_GREATER,
1499     PMIX_VALUE2_GREATER,
1500     PMIX_VALUE_TYPE_DIFFERENT,
1501     PMIX_VALUE_INCOMPATIBLE_OBJECTS,
1502     PMIX_VALUE_COMPARISON_NOT_AVAIL
1503 } pmix_value_cmp_t;
1504 
1505 /****    PMIX DATA TYPES    ****/
1506 typedef uint16_t pmix_data_type_t;
1507 #define PMIX_UNDEF                       0
1508 #define PMIX_BOOL                        1  // converted to/from native true/false to uint8 for pack/unpack
1509 #define PMIX_BYTE                        2  // a byte of data
1510 #define PMIX_STRING                      3  // NULL-terminated string
1511 #define PMIX_SIZE                        4  // size_t
1512 #define PMIX_PID                         5  // OS-pid
1513 #define PMIX_INT                         6
1514 #define PMIX_INT8                        7
1515 #define PMIX_INT16                       8
1516 #define PMIX_INT32                       9
1517 #define PMIX_INT64                      10
1518 #define PMIX_UINT                       11
1519 #define PMIX_UINT8                      12
1520 #define PMIX_UINT16                     13
1521 #define PMIX_UINT32                     14
1522 #define PMIX_UINT64                     15
1523 #define PMIX_FLOAT                      16
1524 #define PMIX_DOUBLE                     17
1525 #define PMIX_TIMEVAL                    18
1526 #define PMIX_TIME                       19
1527 #define PMIX_STATUS                     20  // needs to be tracked separately from integer for those times
1528                                             // when we are embedded and it needs to be converted to the
1529                                             // host error definitions
1530 #define PMIX_VALUE                      21
1531 #define PMIX_PROC                       22
1532 #define PMIX_APP                        23
1533 #define PMIX_INFO                       24
1534 #define PMIX_PDATA                      25
1535 // Hole left by deprecation/removal of PMIX_BUFFER
1536 #define PMIX_BYTE_OBJECT                27
1537 #define PMIX_KVAL                       28
1538 // Hole left by deprecation/removal of PMIX_MODEX
1539 #define PMIX_PERSIST                    30
1540 #define PMIX_POINTER                    31
1541 #define PMIX_SCOPE                      32
1542 #define PMIX_DATA_RANGE                 33
1543 #define PMIX_COMMAND                    34
1544 #define PMIX_INFO_DIRECTIVES            35
1545 #define PMIX_DATA_TYPE                  36
1546 #define PMIX_PROC_STATE                 37
1547 #define PMIX_PROC_INFO                  38
1548 #define PMIX_DATA_ARRAY                 39
1549 #define PMIX_PROC_RANK                  40
1550 #define PMIX_QUERY                      41
1551 #define PMIX_COMPRESSED_STRING          42  // string compressed with zlib
1552 #define PMIX_ALLOC_DIRECTIVE            43
1553 // Hole left by deprecation/removal of PMIX_INFO_ARRAY
1554 #define PMIX_IOF_CHANNEL                45
1555 #define PMIX_ENVAR                      46
1556 #define PMIX_COORD                      47
1557 #define PMIX_REGATTR                    48
1558 #define PMIX_REGEX                      49
1559 #define PMIX_JOB_STATE                  50
1560 #define PMIX_LINK_STATE                 51
1561 #define PMIX_PROC_CPUSET                52
1562 #define PMIX_GEOMETRY                   53
1563 #define PMIX_DEVICE_DIST                54
1564 #define PMIX_ENDPOINT                   55
1565 #define PMIX_TOPO                       56
1566 #define PMIX_DEVTYPE                    57
1567 #define PMIX_LOCTYPE                    58
1568 #define PMIX_COMPRESSED_BYTE_OBJECT     59
1569 #define PMIX_PROC_NSPACE                60
1570 #define PMIX_PROC_STATS                 61
1571 #define PMIX_DISK_STATS                 62
1572 #define PMIX_NET_STATS                  63
1573 #define PMIX_NODE_STATS                 64
1574 #define PMIX_DATA_BUFFER                65
1575 #define PMIX_STOR_MEDIUM                66
1576 #define PMIX_STOR_ACCESS                67
1577 #define PMIX_STOR_PERSIST               68
1578 #define PMIX_STOR_ACCESS_TYPE           69
1579 /********************/
1580 
1581 /* define a boundary for implementers so they can add their own data types */
1582 #define PMIX_DATA_TYPE_MAX     500
1583 
1584 
1585 /* define a scope for data "put" by PMIx per the following:
1586  *
1587  * PMI_LOCAL - the data is intended only for other application
1588  *             processes on the same node. Data marked in this way
1589  *             will not be included in data packages sent to remote requestors
1590  * PMI_REMOTE - the data is intended solely for applications processes on
1591  *              remote nodes. Data marked in this way will not be shared with
1592  *              other processes on the same node
1593  * PMI_GLOBAL - the data is to be shared with all other requesting processes,
1594  *              regardless of location
1595  */
1596 typedef uint8_t pmix_scope_t;
1597 #define PMIX_SCOPE_UNDEF    0
1598 #define PMIX_LOCAL          1   // share to procs also on this node
1599 #define PMIX_REMOTE         2   // share with procs not on this node
1600 #define PMIX_GLOBAL         3   // share with all procs (local + remote)
1601 #define PMIX_INTERNAL       4   // store data in the internal tables
1602 
1603 /* define a range for data "published" by PMIx
1604  */
1605 typedef uint8_t pmix_data_range_t;
1606 #define PMIX_RANGE_UNDEF        0
1607 #define PMIX_RANGE_RM           1   // data is intended for the host resource manager
1608 #define PMIX_RANGE_LOCAL        2   // available on local node only
1609 #define PMIX_RANGE_NAMESPACE    3   // data is available to procs in the same nspace only
1610 #define PMIX_RANGE_SESSION      4   // data available to all procs in session
1611 #define PMIX_RANGE_GLOBAL       5   // data available to all procs
1612 #define PMIX_RANGE_CUSTOM       6   // range is specified in a pmix_info_t
1613 #define PMIX_RANGE_PROC_LOCAL   7   // restrict range to the local proc
1614 #define PMIX_RANGE_INVALID   UINT8_MAX
1615 
1616 /* define a "persistence" policy for data published by clients */
1617 typedef uint8_t pmix_persistence_t;
1618 #define PMIX_PERSIST_INDEF          0   // retain until specifically deleted
1619 #define PMIX_PERSIST_FIRST_READ     1   // delete upon first access
1620 #define PMIX_PERSIST_PROC           2   // retain until publishing process terminates
1621 #define PMIX_PERSIST_APP            3   // retain until application terminates
1622 #define PMIX_PERSIST_SESSION        4   // retain until session/allocation terminates
1623 #define PMIX_PERSIST_INVALID   UINT8_MAX
1624 
1625 /* define a set of bit-mask flags for specifying behavior of
1626  * command directives via pmix_info_t arrays */
1627 typedef uint32_t pmix_info_directives_t;
1628 #define PMIX_INFO_REQD              0x00000001
1629 #define PMIX_INFO_ARRAY_END         0x00000002      // mark the end of an array created by PMIX_INFO_CREATE
1630 #define PMIX_INFO_REQD_PROCESSED    0x00000004      // reqd attribute has been processed
1631 #define PMIX_INFO_QUALIFIER         0x00000008      // info is a qualifier to the primary value
1632 #define PMIX_INFO_PERSISTENT        0x00000010      // do not release included value
1633 /* the top 16-bits are reserved for internal use by
1634  * implementers - these may be changed inside the
1635  * PMIx library */
1636 #define PMIX_INFO_DIR_RESERVED 0xffff0000
1637 
1638 /* define a set of directives for allocation requests */
1639 typedef uint8_t pmix_alloc_directive_t;
1640 #define PMIX_ALLOC_NEW          1   // new allocation is being requested. The resulting allocation will be
1641                                     // disjoint (i.e., not connected in a job sense) from the requesting allocation
1642 #define PMIX_ALLOC_EXTEND       2   // extend the existing allocation, either in time or as additional resources
1643 #define PMIX_ALLOC_RELEASE      3   // release part or all of the existing allocation. Attributes in the accompanying
1644                                     // pmix\_info\_t array may be used to specify "lending" of those resources
1645                                     // for some period of time.
1646 #define PMIX_ALLOC_REAQUIRE     4   // reacquire resources that were previously "lent" back to the scheduler
1647 #define PMIX_ALLOC_REQ_CANCEL   5   // Cancel the indicated allocation request
1648 
1649 /* define a value boundary beyond which implementers are free
1650  * to define their own directive values */
1651 #define PMIX_ALLOC_EXTERNAL     128
1652 
1653 
1654 /* define a set of bit-mask flags for specifying IO
1655  * forwarding channels. These can be OR'd together
1656  * to reference multiple channels */
1657 typedef uint16_t pmix_iof_channel_t;
1658 #define PMIX_FWD_NO_CHANNELS        0x0000
1659 #define PMIX_FWD_STDIN_CHANNEL      0x0001
1660 #define PMIX_FWD_STDOUT_CHANNEL     0x0002
1661 #define PMIX_FWD_STDERR_CHANNEL     0x0004
1662 #define PMIX_FWD_STDDIAG_CHANNEL    0x0008
1663 #define PMIX_FWD_ALL_CHANNELS       0x00ff
1664 
1665 /* define values associated with PMIx_Group_join
1666  * to indicate accept and decline - this is
1667  * done for readability of user code */
1668 typedef enum {
1669     PMIX_GROUP_DECLINE,
1670     PMIX_GROUP_ACCEPT
1671 } pmix_group_opt_t;
1672 
1673 typedef enum {
1674     PMIX_GROUP_CONSTRUCT,
1675     PMIX_GROUP_DESTRUCT,
1676     PMIX_GROUP_NONE
1677 } pmix_group_operation_t;
1678 
1679 /* define storage medium values
1680  * The pmix_storage_medium_t is a uint64_t type that defines
1681  * a set of bit-mask flags for specifying different types of
1682  * storage mediums. These can be bitwise OR'd together to
1683  * accommodate storage systems that mix storage medium types. */
1684 typedef uint64_t pmix_storage_medium_t;
1685 #define PMIX_STORAGE_MEDIUM_UNKNOWN     0x0000000000000001
1686 #define PMIX_STORAGE_MEDIUM_TAPE        0x0000000000000002
1687 #define PMIX_STORAGE_MEDIUM_HDD         0x0000000000000004
1688 #define PMIX_STORAGE_MEDIUM_SSD         0x0000000000000008
1689 #define PMIX_STORAGE_MEDIUM_NVME        0x0000000000000010
1690 #define PMIX_STORAGE_MEDIUM_PMEM        0x0000000000000020
1691 #define PMIX_STORAGE_MEDIUM_RAM         0x0000000000000040
1692 
1693 /* define storage accessibility values
1694  * The pmix_storage_accessibility_t is a uint64_t type that
1695  * defines a set of bit-mask flags for specifying different
1696  * levels of storage accessibility (i.e,. from where a storage
1697  * system may be accessed). These can be bitwise OR'd together
1698  * to accommodate storage systems that are accessibile in
1699  * multiple ways. */
1700 typedef uint64_t pmix_storage_accessibility_t;
1701 #define PMIX_STORAGE_ACCESSIBILITY_NODE     0x0000000000000001
1702 #define PMIX_STORAGE_ACCESSIBILITY_SESSION  0x0000000000000002
1703 #define PMIX_STORAGE_ACCESSIBILITY_JOB      0x0000000000000004
1704 #define PMIX_STORAGE_ACCESSIBILITY_RACK     0x0000000000000008
1705 #define PMIX_STORAGE_ACCESSIBILITY_CLUSTER  0x0000000000000010
1706 #define PMIX_STORAGE_ACCESSIBILITY_REMOTE   0x0000000000000020
1707 
1708 /* define storage persistence values
1709  * The pmix_storage_persistence_t is a uint64_t type that defines
1710  * a set of bit-mask flags for specifying different levels of
1711  * persistence for a particular storage system. */
1712 typedef uint64_t pmix_storage_persistence_t;
1713 #define PMIX_STORAGE_PERSISTENCE_TEMPORARY  0x0000000000000001
1714 #define PMIX_STORAGE_PERSISTENCE_NODE       0x0000000000000002
1715 #define PMIX_STORAGE_PERSISTENCE_SESSION    0x0000000000000004
1716 #define PMIX_STORAGE_PERSISTENCE_JOB        0x0000000000000008
1717 #define PMIX_STORAGE_PERSISTENCE_SCRATCH    0x0000000000000010
1718 #define PMIX_STORAGE_PERSISTENCE_PROJECT    0x0000000000000020
1719 #define PMIX_STORAGE_PERSISTENCE_ARCHIVE    0x0000000000000040
1720 
1721 /* define storage access values
1722  * The pmix_storage_access_type_t is a uint16_t type that defines
1723  * a set of bit-mask flags for specifying different storage system
1724  * access types. */
1725 typedef uint16_t pmix_storage_access_type_t;
1726 #define PMIX_STORAGE_ACCESS_RD      0x0001
1727 #define PMIX_STORAGE_ACCESS_WR      0x0002
1728 #define PMIX_STORAGE_ACCESS_RDWR    0x0003
1729 
1730 
1731 /* define some "hooks" external libraries can use to
1732  * intercept memory allocation/release operations */
1733 static inline void* pmix_malloc(size_t n)
1734 {
1735     return malloc(n);
1736 }
1737 
1738 static inline void pmix_free(void *m)
1739 {
1740     free(m);
1741 }
1742 
1743 static inline void* pmix_calloc(size_t n, size_t m)
1744 {
1745     return calloc(n, m);
1746 }
1747 
1748 
1749 /**
1750  * Provide a safe version of strncpy that doesn't generate
1751  * a ton of spurious warnings. Note that not every environment
1752  * provides nice string functions, and we aren't concerned about
1753  * max performance here
1754  *
1755  * @param dest Destination string.
1756  * @param src Source string.
1757  * @param len Size of the dest array - 1
1758  *
1759  */
1760 static inline void pmix_strncpy(char *dest,
1761                                 const char *src,
1762                                 size_t len)
1763 {
1764     size_t i;
1765 
1766     /* use an algorithm that also protects against
1767      * non-NULL-terminated src strings */
1768     for (i=0; i < len; ++i, ++src, ++dest) {
1769         *dest = *src;
1770         if ('\0' == *src) {
1771             break;
1772         }
1773     }
1774     *dest = '\0';
1775 }
1776 
1777 static inline size_t pmix_keylen(const char *src)
1778 {
1779     size_t i, maxlen;
1780 
1781     if (NULL == src) {
1782         return 0;
1783     }
1784     maxlen = PMIX_MAX_KEYLEN + 1;
1785     /* use an algorithm that also protects against
1786      * non-NULL-terminated src strings */
1787     for (i=0; i < maxlen; ++i, ++src) {
1788         if ('\0' == *src) {
1789             break;
1790         }
1791     }
1792     return i;
1793 }
1794 
1795 static inline size_t pmix_nslen(const char *src)
1796 {
1797     size_t i, maxlen;
1798 
1799     if (NULL == src) {
1800         return 0;
1801     }
1802     maxlen = PMIX_MAX_NSLEN + 1;
1803     /* use an algorithm that also protects against
1804      * non-NULL-terminated src strings */
1805     for (i=0; i < maxlen; ++i, ++src) {
1806         if ('\0' == *src) {
1807             break;
1808         }
1809     }
1810     return i;
1811 }
1812 
1813 
1814 /****    PMIX COORD    ****/
1815 /* define coordinate system views */
1816 typedef uint8_t pmix_coord_view_t;
1817 #define PMIX_COORD_VIEW_UNDEF       0x00
1818 #define PMIX_COORD_LOGICAL_VIEW     0x01
1819 #define PMIX_COORD_PHYSICAL_VIEW    0x02
1820 
1821 /* define a structure for a proc's fabric coordinate */
1822 typedef struct pmix_coord {
1823     pmix_coord_view_t view;
1824     uint32_t *coord;
1825     size_t dims;
1826 } pmix_coord_t;
1827 
1828 #define PMIX_COORD_STATIC_INIT      \
1829 {                                   \
1830     .view = PMIX_COORD_VIEW_UNDEF,  \
1831     .coord = NULL,                  \
1832     .dims = 0                       \
1833 }
1834 
1835 
1836 /****    PMIX LINK STATES    ****/
1837 typedef uint8_t pmix_link_state_t;
1838 #define PMIX_LINK_STATE_UNKNOWN     0  // The port state is unknown or not applicable
1839 #define PMIX_LINK_DOWN              1  // The port is inactive.
1840 #define PMIX_LINK_UP                2  // The port is active.
1841 
1842 
1843 /****   PMIX CPUSET    ****/
1844 typedef struct{
1845     char *source;
1846     void *bitmap;
1847 } pmix_cpuset_t;
1848 
1849 #define PMIX_CPUSET_STATIC_INIT \
1850 {                               \
1851     .source = NULL,             \
1852     .bitmap = NULL              \
1853 }
1854 
1855 
1856 /****    PMIX BIND ENVELOPE    ****/
1857 typedef uint8_t pmix_bind_envelope_t;
1858 #define PMIX_CPUBIND_PROCESS    0
1859 #define PMIX_CPUBIND_THREAD     1
1860 
1861 
1862 /****    PMIX TOPOLOGY    ****/
1863 typedef struct {
1864     char *source;
1865     void *topology;
1866 } pmix_topology_t;
1867 
1868 #define PMIX_TOPOLOGY_STATIC_INIT   \
1869 {                                   \
1870     .source = NULL,                 \
1871     .topology = NULL                \
1872 }
1873 
1874 
1875 /**** PMIX RELATIVE LOCALITY    ****/
1876 typedef uint16_t pmix_locality_t;
1877 #define PMIX_LOCALITY_UNKNOWN           0x0000
1878 #define PMIX_LOCALITY_NONLOCAL          0x8000
1879 #define PMIX_LOCALITY_SHARE_HWTHREAD    0x0001
1880 #define PMIX_LOCALITY_SHARE_CORE        0x0002
1881 #define PMIX_LOCALITY_SHARE_L1CACHE     0x0004
1882 #define PMIX_LOCALITY_SHARE_L2CACHE     0x0008
1883 #define PMIX_LOCALITY_SHARE_L3CACHE     0x0010
1884 #define PMIX_LOCALITY_SHARE_PACKAGE     0x0020
1885 #define PMIX_LOCALITY_SHARE_NUMA        0x0040
1886 #define PMIX_LOCALITY_SHARE_NODE        0x4000
1887 
1888 
1889 /****    PMIX GEOMETRY     ****/
1890 typedef struct pmix_geometry {
1891     size_t fabric;
1892     char *uuid;
1893     char *osname;
1894     pmix_coord_t *coordinates;
1895     size_t ncoords;
1896 } pmix_geometry_t;
1897 
1898 #define PMIX_GEOMETRY_STATIC_INIT   \
1899 {                                   \
1900     .fabric = 0,                    \
1901     .uuid = NULL,                   \
1902     .osname = NULL,                 \
1903     .coordinates = NULL,            \
1904     .ncoords = 0                    \
1905 }
1906 
1907 
1908 /****    PMIX_DEVICE_TYPE    ****/
1909 typedef uint64_t pmix_device_type_t;
1910 #define PMIX_DEVTYPE_UNKNOWN        0x00
1911 #define PMIX_DEVTYPE_BLOCK          0x01
1912 #define PMIX_DEVTYPE_GPU            0x02
1913 #define PMIX_DEVTYPE_NETWORK        0x04
1914 #define PMIX_DEVTYPE_OPENFABRICS    0x08
1915 #define PMIX_DEVTYPE_DMA            0x10
1916 #define PMIX_DEVTYPE_COPROC         0x20
1917 
1918 /****    PMIX_DISTANCE     ****/
1919 typedef struct pmix_device_distance {
1920     char *uuid;
1921     char *osname;
1922     pmix_device_type_t type;
1923     uint16_t mindist;
1924     uint16_t maxdist;
1925 } pmix_device_distance_t;
1926 
1927 #define PMIX_DEVICE_DIST_STATIC_INIT    \
1928 {                                       \
1929     .uuid = NULL,                       \
1930     .osname = NULL,                     \
1931     .type = PMIX_DEVTYPE_UNKNOWN,       \
1932     .mindist = 0,                       \
1933     .maxdist = 0                        \
1934 }
1935 
1936 
1937 /****    PMIX BYTE OBJECT    ****/
1938 typedef struct pmix_byte_object {
1939     char *bytes;
1940     size_t size;
1941 } pmix_byte_object_t;
1942 
1943 #define PMIX_BYTE_OBJECT_STATIC_INIT    \
1944 {                                       \
1945     .bytes = NULL,                      \
1946     .size = 0                           \
1947 }
1948 
1949 
1950 /****    PMIX ENDPOINT    ****/
1951 typedef struct pmix_endpoint {
1952     char *uuid;
1953     char *osname;
1954     pmix_byte_object_t endpt;
1955 } pmix_endpoint_t;
1956 
1957 #define PMIX_ENDPOINT_STATIC_INIT           \
1958 {                                           \
1959     .uuid = NULL,                           \
1960     .osname = NULL,                         \
1961     .endpt = PMIX_BYTE_OBJECT_STATIC_INIT   \
1962 }
1963 
1964 
1965 /****    PMIX ENVAR STRUCT   ****/
1966 /* Provide a structure for specifying environment variable modifications
1967  * Standard environment variables (e.g., PATH, LD_LIBRARY_PATH, and LD_PRELOAD)
1968  * take multiple arguments separated by delimiters. Unfortunately, the delimiters
1969  * depend upon the variable itself - some use semi-colons, some colons, etc. Thus,
1970  * the operation requires not only the name of the variable to be modified and
1971  * the value to be inserted, but also the separator to be used when composing
1972  * the aggregate value
1973  */
1974 typedef struct {
1975     char *envar;
1976     char *value;
1977     char separator;
1978 } pmix_envar_t;
1979 
1980 #define PMIX_ENVAR_STATIC_INIT  \
1981 {                               \
1982     .envar = NULL,              \
1983     .value = NULL,              \
1984     .separator = '\0'           \
1985 }
1986 
1987 
1988 /****    PMIX DATA BUFFER    ****/
1989 typedef struct pmix_data_buffer {
1990     /** Start of my memory */
1991     char *base_ptr;
1992     /** Where the next data will be packed to (within the allocated
1993         memory starting at base_ptr) */
1994     char *pack_ptr;
1995     /** Where the next data will be unpacked from (within the
1996         allocated memory starting as base_ptr) */
1997     char *unpack_ptr;
1998     /** Number of bytes allocated (starting at base_ptr) */
1999     size_t bytes_allocated;
2000     /** Number of bytes used by the buffer (i.e., amount of data --
2001         including overhead -- packed in the buffer) */
2002     size_t bytes_used;
2003 } pmix_data_buffer_t;
2004 
2005 #define PMIX_DATA_BUFFER_STATIC_INIT    \
2006 {                                       \
2007     .base_ptr = NULL,                   \
2008     .pack_ptr = NULL,                   \
2009     .unpack_ptr = NULL,                 \
2010     .bytes_allocated = 0,               \
2011     .bytes_used = 0                     \
2012 }
2013 
2014 
2015 /****    PMIX PROC OBJECT    ****/
2016 typedef struct pmix_proc {
2017     pmix_nspace_t nspace;
2018     pmix_rank_t rank;
2019 } pmix_proc_t;
2020 
2021 #define PMIX_PROC_STATIC_INIT   \
2022 {                               \
2023     .nspace = {0},              \
2024     .rank = PMIX_RANK_UNDEF     \
2025 }
2026 
2027 
2028 /****    PMIX PROC INFO STRUCT    ****/
2029 typedef struct pmix_proc_info {
2030     pmix_proc_t proc;
2031     char *hostname;
2032     char *executable_name;
2033     pid_t pid;
2034     int exit_code;
2035     pmix_proc_state_t state;
2036 } pmix_proc_info_t;
2037 
2038 #define PMIX_PROC_INFO_STATIC_INIT  \
2039 {                                   \
2040     .proc = PMIX_PROC_STATIC_INIT,  \
2041     .hostname = NULL,               \
2042     .executable_name = NULL,        \
2043     .pid = 0,                       \
2044     .exit_code = 0,                 \
2045     .state = PMIX_PROC_STATE_UNDEF  \
2046 }
2047 
2048 
2049 
2050 /****    PMIX DATA ARRAY STRUCT    ****/
2051 
2052 typedef struct pmix_data_array {
2053     pmix_data_type_t type;
2054     size_t size;
2055     void *array;
2056 } pmix_data_array_t;
2057 
2058 #define PMIX_DATA_ARRAY_STATIC_INIT     \
2059 {                                       \
2060     .type = PMIX_UNDEF,                 \
2061     .size = 0,                          \
2062     .array = NULL                       \
2063 }
2064 
2065 /* we cannot forward-declare the pmix_regattr_t struct
2066  * as Cython doesn't know what to do with it. Thus, we
2067  * will utilize the void* entry of the pmix_value_t to
2068  * hold the pointer to pmix_regattr_t */
2069 
2070 /****   STATISTICS STRUCTURES  ****/
2071 typedef struct pmix_proc_stats {
2072     /* process ident info */
2073     char *node;
2074     pmix_proc_t proc;
2075     pid_t pid;
2076     char *cmd;
2077     /* process stats */
2078     char state;
2079     struct timeval time;
2080     float percent_cpu;
2081     int32_t priority;
2082     uint16_t num_threads;
2083     float pss;   /* in MBytes */
2084     float vsize;  /* in MBytes */
2085     float rss;  /* in MBytes */
2086     float peak_vsize;  /* in MBytes */
2087     uint16_t processor;
2088     /* time at which sample was taken */
2089     struct timeval sample_time;
2090 } pmix_proc_stats_t;
2091 
2092 #define PMIX_PROC_STATS_STATIC_INIT     \
2093 {                                       \
2094     .node = NULL,                       \
2095     .proc = PMIX_PROC_STATIC_INIT,      \
2096     .pid = 0,                           \
2097     .cmd = NULL,                        \
2098     .state = '\0',                      \
2099     .time = {0, 0},                     \
2100     .percent_cpu = 0.0,                 \
2101     .priority = 0,                      \
2102     .num_threads = 0,                   \
2103     .pss = 0.0,                         \
2104     .vsize = 0.0,                       \
2105     .rss = 0.0,                         \
2106     .peak_vsize = 0.0                   \
2107     .processor = 0,                     \
2108     .sample_time = {0, 0}               \
2109 }
2110 
2111 
2112 typedef struct {
2113     char *disk;
2114     uint64_t num_reads_completed;
2115     uint64_t num_reads_merged;
2116     uint64_t num_sectors_read;
2117     uint64_t milliseconds_reading;
2118     uint64_t num_writes_completed;
2119     uint64_t num_writes_merged;
2120     uint64_t num_sectors_written;
2121     uint64_t milliseconds_writing;
2122     uint64_t num_ios_in_progress;
2123     uint64_t milliseconds_io;
2124     uint64_t weighted_milliseconds_io;
2125 } pmix_disk_stats_t;
2126 
2127 #define PMIX_DISK_STATS_STATIC_INIT     \
2128 {                                       \
2129     .disk = NULL,                       \
2130     .num_reads_completed = 0,           \
2131     .num_reads_merged = 0,              \
2132     .num_sectors_read = 0,              \
2133     .milliseconds_reading = 0,          \
2134     .num_writes_completed = 0,          \
2135     .num_writes_merged = 0,             \
2136     .num_sectors_written = 0,           \
2137     .milliseconds_writing = 0,          \
2138     .num_ios_in_progress = 0,           \
2139     .milliseconds_io = 0,               \
2140     .weighted_milliseconds_io = 0       \
2141 }
2142 
2143 
2144 typedef struct {
2145     char *net_interface;
2146     uint64_t num_bytes_recvd;
2147     uint64_t num_packets_recvd;
2148     uint64_t num_recv_errs;
2149     uint64_t num_bytes_sent;
2150     uint64_t num_packets_sent;
2151     uint64_t num_send_errs;
2152 } pmix_net_stats_t;
2153 
2154 #define PMIX_NET_STATS_STATIC_INIT  \
2155 {                                   \
2156     .net_interface = NULL,          \
2157     .num_bytes_recvd = 0,           \
2158     .num_packets_recvd = 0,         \
2159     .num_recv_errs = 0,             \
2160     .num_bytes_sent = 0,            \
2161     .num_packets_sent = 0,          \
2162     .num_send_errs = 0              \
2163 }
2164 
2165 
2166 typedef struct {
2167     char *node;
2168     /* node-level load averages */
2169     float la;
2170     float la5;
2171     float la15;
2172     /* memory usage */
2173     float total_mem;  /* in MBytes */
2174     float free_mem;  /* in MBytes */
2175     float buffers;  /* in MBytes */
2176     float cached;   /* in MBytes */
2177     float swap_cached;  /* in MBytes */
2178     float swap_total;   /* in MBytes */
2179     float swap_free;    /* in MBytes */
2180     float mapped;       /* in MBytes */
2181     /* time at which sample was taken */
2182     struct timeval sample_time;
2183     /* array of disk stats, one per disk */
2184     pmix_disk_stats_t *diskstats;
2185     size_t ndiskstats;
2186     /* array of net stats, one per interface */
2187     pmix_net_stats_t *netstats;
2188     size_t nnetstats;
2189 } pmix_node_stats_t;
2190 
2191 #define PMIX_NODE_STATS_STATIC_INIT     \
2192 {                                       \
2193     .node = NULL,                       \
2194     .la = 0,                            \
2195     .la5 = 0,                           \
2196     .la15 = 0,                          \
2197     .total_mem = 0.0,                   \
2198     .free_mem = 0.0,                    \
2199     .buffers = 0.0,                     \
2200     .cached = 0.0,                      \
2201     .swap_cached = 0.0,                 \
2202     .swap_total = 0.0,                  \
2203     .swap_free = 0.0,                   \
2204     .mapped = 0.0,                      \
2205     .sample_time = {0, 0},              \
2206     .diskstats = NULL,                  \
2207     .ndiskstats = 0,                    \
2208     .netstats = NULL,                   \
2209     .nnetstats = 0                      \
2210 }
2211 
2212 
2213 /****    PMIX VALUE STRUCT    ****/
2214 
2215 /* NOTE: operations can supply a collection of values under
2216  * a single key by passing a pmix_value_t containing a
2217  * data array of type PMIX_INFO, with each array element
2218  * containing its own pmix_info_t object */
2219 
2220 typedef struct pmix_value {
2221     pmix_data_type_t type;
2222     union {
2223         bool flag;
2224         uint8_t byte;
2225         char *string;
2226         size_t size;
2227         pid_t pid;
2228         int integer;
2229         int8_t int8;
2230         int16_t int16;
2231         int32_t int32;
2232         int64_t int64;
2233         unsigned int uint;
2234         uint8_t uint8;
2235         uint16_t uint16;
2236         uint32_t uint32;
2237         uint64_t uint64;
2238         float fval;
2239         double dval;
2240         struct timeval tv;
2241         time_t time;
2242         pmix_status_t status;
2243         pmix_rank_t rank;
2244         pmix_nspace_t *nspace;
2245         pmix_proc_t *proc;
2246         pmix_byte_object_t bo;
2247         pmix_persistence_t persist;
2248         pmix_scope_t scope;
2249         pmix_data_range_t range;
2250         pmix_proc_state_t state;
2251         pmix_proc_info_t *pinfo;
2252         pmix_data_array_t *darray;
2253         void *ptr;
2254         pmix_alloc_directive_t adir;
2255         pmix_envar_t envar;
2256         pmix_coord_t *coord;
2257         pmix_link_state_t linkstate;
2258         pmix_job_state_t jstate;
2259         pmix_topology_t *topo;
2260         pmix_cpuset_t *cpuset;
2261         pmix_locality_t locality;
2262         pmix_geometry_t *geometry;
2263         pmix_device_type_t devtype;
2264         pmix_device_distance_t *devdist;
2265         pmix_endpoint_t *endpoint;
2266         pmix_data_buffer_t *dbuf;
2267         pmix_proc_stats_t *pstats;
2268         pmix_disk_stats_t *dkstats;
2269         pmix_net_stats_t *netstats;
2270         pmix_node_stats_t *ndstats;
2271     } data;
2272 } pmix_value_t;
2273 
2274 #define PMIX_VALUE_STATIC_INIT  \
2275 {                               \
2276     .type = PMIX_UNDEF,         \
2277     .data.ptr = NULL            \
2278 }
2279 
2280 #define PMIX_VALUE_GET_NUMBER(s, m, n, t)               \
2281     do {                                                \
2282         (s) = PMIX_SUCCESS;                             \
2283         if (PMIX_SIZE == (m)->type) {                   \
2284             (n) = (t)((m)->data.size);                  \
2285         } else if (PMIX_INT == (m)->type) {             \
2286             (n) = (t)((m)->data.integer);               \
2287         } else if (PMIX_INT8 == (m)->type) {            \
2288             (n) = (t)((m)->data.int8);                  \
2289         } else if (PMIX_INT16 == (m)->type) {           \
2290             (n) = (t)((m)->data.int16);                 \
2291         } else if (PMIX_INT32 == (m)->type) {           \
2292             (n) = (t)((m)->data.int32);                 \
2293         } else if (PMIX_INT64 == (m)->type) {           \
2294             (n) = (t)((m)->data.int64);                 \
2295         } else if (PMIX_UINT == (m)->type) {            \
2296             (n) = (t)((m)->data.uint);                  \
2297         } else if (PMIX_UINT8 == (m)->type) {           \
2298             (n) = (t)((m)->data.uint8);                 \
2299         } else if (PMIX_UINT16 == (m)->type) {          \
2300             (n) = (t)((m)->data.uint16);                \
2301         } else if (PMIX_UINT32 == (m)->type) {          \
2302             (n) = (t)((m)->data.uint32);                \
2303         } else if (PMIX_UINT64 == (m)->type) {          \
2304             (n) = (t)((m)->data.uint64);                \
2305         } else if (PMIX_FLOAT == (m)->type) {           \
2306             (n) = (t)((m)->data.fval);                  \
2307         } else if (PMIX_DOUBLE == (m)->type) {          \
2308             (n) = (t)((m)->data.dval);                  \
2309         } else if (PMIX_PID == (m)->type) {             \
2310             (n) = (t)((m)->data.pid);                   \
2311         } else if (PMIX_PROC_RANK == (m)->type) {       \
2312             (n) = (t)((m)->data.rank);                  \
2313         } else if (PMIX_STATUS == (m)->type) {          \
2314             (n) = (t)((m)->data.status);                \
2315         } else {                                        \
2316             (s) = PMIX_ERR_BAD_PARAM;                   \
2317         }                                               \
2318     } while(0)
2319 
2320 /****    PMIX INFO STRUCT    ****/
2321 typedef struct pmix_info {
2322     pmix_key_t key;
2323     pmix_info_directives_t flags;   // bit-mask of flags
2324     pmix_value_t value;
2325 } pmix_info_t;
2326 
2327 #define PMIX_INFO_STATIC_INIT       \
2328 {                                   \
2329     .key = {0},                     \
2330     .flags = 0,                     \
2331     .value = PMIX_VALUE_STATIC_INIT \
2332 }
2333 
2334 
2335 typedef enum {
2336     PMIX_BOOL_TRUE,
2337     PMIX_BOOL_FALSE,
2338     PMIX_NON_BOOL
2339 } pmix_boolean_t;
2340 
2341 
2342 /****    PMIX LOOKUP RETURN STRUCT    ****/
2343 typedef struct pmix_pdata {
2344     pmix_proc_t proc;
2345     pmix_key_t key;
2346     pmix_value_t value;
2347 } pmix_pdata_t;
2348 
2349 #define PMIX_LOOKUP_STATIC_INIT     \
2350 {                                   \
2351     .proc = PMIX_PROC_STATIC_INIT,  \
2352     .key = {0},                     \
2353     .value = PMIX_VALUE_STATIC_INIT \
2354 }
2355 
2356 
2357 
2358 /****    PMIX APP STRUCT    ****/
2359 typedef struct pmix_app {
2360     char *cmd;
2361     char **argv;
2362     char **env;
2363     char *cwd;
2364     int maxprocs;
2365     pmix_info_t *info;
2366     size_t ninfo;
2367 } pmix_app_t;
2368 
2369 #define PMIX_APP_STATIC_INIT    \
2370 {                               \
2371     .cmd = NULL,                \
2372     .argv = NULL,               \
2373     .env = NULL,                \
2374     .cwd = NULL,                \
2375     .maxprocs = 0,              \
2376     .info = NULL,               \
2377     .ninfo = 0                  \
2378 }
2379 
2380 
2381 /****    PMIX QUERY STRUCT    ****/
2382 typedef struct pmix_query {
2383     char **keys;
2384     pmix_info_t *qualifiers;
2385     size_t nqual;
2386 } pmix_query_t;
2387 
2388 #define PMIX_QUERY_STATIC_INIT  \
2389 {                               \
2390     .keys = NULL,               \
2391     .qualifiers = NULL,         \
2392     .nqual = 0                  \
2393 }
2394 
2395 
2396 /****    ATTRIBUTE REGISTRATION STRUCT   ****/
2397 typedef struct pmix_regattr_t {
2398     char *name;
2399     pmix_key_t string;
2400     pmix_data_type_t type;
2401     char **description;
2402 } pmix_regattr_t;
2403 
2404 #define PMIX_REGATTR_STATIC_INIT    \
2405 {                                   \
2406     .name = NULL,                   \
2407     .string = {0},                  \
2408     .type = PMIX_UNDEF,             \
2409     .description = NULL             \
2410 }
2411 
2412 
2413 /****    FABRIC STRUCT    ****/
2414 /* Define a pmix_fabric_t struct for
2415  * interacting with fabric-related interfaces */
2416 typedef struct pmix_fabric_s {
2417     /* user-supplied name for this fabric */
2418     char *name;
2419     /* a PMIx-supplied index identifying this registration object */
2420     size_t index;
2421     /* array containing information (provided by the PMIx library)
2422      * about the fabric */
2423     pmix_info_t *info;
2424     size_t ninfo;
2425     /* object pointer for use by the PMIx library */
2426     void *module;
2427 } pmix_fabric_t;
2428 
2429 #define PMIX_FABRIC_STATIC_INIT \
2430 {                               \
2431     .name = NULL,               \
2432     .index = 0,                 \
2433     .info = NULL,               \
2434     .ninfo = 0,                 \
2435     .module = NULL              \
2436 }
2437 
2438 /* convenience macros to support pmix_fabric_t */
2439 #define PMIX_FABRIC_CONSTRUCT(x) \
2440     memset(x, 0, sizeof(pmix_fabric_t))
2441 
2442 typedef enum {
2443     PMIX_FABRIC_REQUEST_INFO,
2444     PMIX_FABRIC_UPDATE_INFO
2445 } pmix_fabric_operation_t;
2446 
2447 
2448 /****    CALLBACK FUNCTIONS FOR NON-BLOCKING OPERATIONS    ****/
2449 
2450 typedef void (*pmix_release_cbfunc_t)(void *cbdata);
2451 
2452 /* define a callback function that is solely used by servers, and
2453  * not clients, to return modex data in response to "fence" and "get"
2454  * operations. The returned blob contains the data collected from each
2455  * server participating in the operation.
2456  *
2457  * As the data is "owned" by the host server, provide a secondary
2458  * callback function to notify the host server that we are done
2459  * with the data so it can be released */
2460 typedef void (*pmix_modex_cbfunc_t)(pmix_status_t status,
2461                                     const char *data, size_t ndata,
2462                                     void *cbdata,
2463                                     pmix_release_cbfunc_t release_fn,
2464                                     void *release_cbdata);
2465 
2466 /* define a callback function for calls to PMIx_Spawn_nb - the function
2467  * will be called upon completion of the spawn command. The status
2468  * will indicate whether or not the spawn succeeded. The nspace
2469  * of the spawned processes will be returned, along with any provided
2470  * callback data. Note that the returned nspace value will be
2471  * released by the library upon return from the callback function, so
2472  * the receiver must copy it if it needs to be retained */
2473 typedef void (*pmix_spawn_cbfunc_t)(pmix_status_t status,
2474                                     pmix_nspace_t nspace, void *cbdata);
2475 
2476 /* define a callback for common operations that simply return
2477  * a status. Examples include the non-blocking versions of
2478  * Fence, Connect, and Disconnect */
2479 typedef void (*pmix_op_cbfunc_t)(pmix_status_t status, void *cbdata);
2480 
2481 /* define a callback function for calls to PMIx_Lookup_nb - the
2482  * function will be called upon completion of the command with the
2483  * status indicating the success of failure of the request. Any
2484  * retrieved data will be returned in an array of pmix_pdata_t structs.
2485  * The nspace/rank of the process that provided each data element is
2486  * also returned.
2487  *
2488  * Note that these structures will be released upon return from
2489  * the callback function, so the receiver must copy/protect the
2490  * data prior to returning if it needs to be retained */
2491 
2492 typedef void (*pmix_lookup_cbfunc_t)(pmix_status_t status,
2493                                      pmix_pdata_t data[], size_t ndata,
2494                                      void *cbdata);
2495 
2496 /* define a callback by which an event handler can notify the PMIx library
2497  * that it has completed its response to the notification. The handler
2498  * is _required_ to execute this callback so the library can determine
2499  * if additional handlers need to be called. The handler shall return
2500  * PMIX_SUCCESS if no further action is required. The return status
2501  * of each event handler and any returned pmix_info_t structures
2502  * will be added to the array of pmix_info_t passed to any subsequent
2503  * event handlers to help guide their operation.
2504  *
2505  * If non-NULL, the provided callback function will be called to allow
2506  * the event handler to release the provided info array.
2507  */
2508 typedef void (*pmix_event_notification_cbfunc_fn_t)(pmix_status_t status,
2509                                                     pmix_info_t *results, size_t nresults,
2510                                                     pmix_op_cbfunc_t cbfunc, void *thiscbdata,
2511                                                     void *notification_cbdata);
2512 
2513 /* define a callback function for the event handler. Upon receipt of an
2514  * event notification, PMIx will execute the specified notification
2515  * callback function, providing:
2516  *
2517  * evhdlr_registration_id - the returned registration number of
2518  *                          the event handler being called
2519  * status - the event that occurred
2520  * source - the nspace and rank of the process that generated
2521  *          the event. If the source is the resource manager,
2522  *          then the nspace will be empty and the rank will
2523  *          be PMIX_RANK_UNDEF
2524  * info - any additional info provided regarding the event.
2525  * ninfo - the number of info objects in the info array
2526  * results - any provided results from event handlers called
2527  *           prior to this one.
2528  * nresults - number of info objects in the results array
2529  * cbfunc - the function to be called upon completion of the handler
2530  * cbdata - pointer to be returned in the completion cbfunc
2531  *
2532  * Note that different resource managers may provide differing levels
2533  * of support for event notification to application processes. Thus, the
2534  * info array may be NULL or may contain detailed information of the event.
2535  * It is the responsibility of the application to parse any provided info array
2536  * for defined key-values if it so desires.
2537  *
2538  * Possible uses of the pmix_info_t object include:
2539  *
2540  * - for the RM to alert the process as to planned actions, such as
2541  *   to abort the session, in response to the reported event
2542  *
2543  * - provide a timeout for alternative action to occur, such as for
2544  *   the application to request an alternate response to the event
2545  *
2546  * For example, the RM might alert the application to the failure of
2547  * a node that resulted in termination of several processes, and indicate
2548  * that the overall session will be aborted unless the application
2549  * requests an alternative behavior in the next 5 seconds. The application
2550  * then has time to respond with a checkpoint request, or a request to
2551  * recover from the failure by obtaining replacement nodes and restarting
2552  * from some earlier checkpoint.
2553  *
2554  * Support for these options is left to the discretion of the host RM. Info
2555  * keys are included in the common definions above, but also may be augmented
2556  * on a per-RM basis.
2557  *
2558  * On the server side, the notification function is used to inform the host
2559  * server of a detected event in the PMIx subsystem and/or client
2560  */
2561 typedef void (*pmix_notification_fn_t)(size_t evhdlr_registration_id,
2562                                        pmix_status_t status,
2563                                        const pmix_proc_t *source,
2564                                        pmix_info_t info[], size_t ninfo,
2565                                        pmix_info_t *results, size_t nresults,
2566                                        pmix_event_notification_cbfunc_fn_t cbfunc,
2567                                        void *cbdata);
2568 
2569 /* define a callback function for calls to register handlers, e.g., event
2570  * notification and IOF requests
2571  *
2572  * status - PMIX_SUCCESS or an appropriate error constant
2573  *
2574  * refid - reference identifier assigned to the handler by PMIx,
2575  *         used to deregister the handler
2576  *
2577  * cbdata - object provided to the registration call
2578  */
2579 typedef void (*pmix_hdlr_reg_cbfunc_t)(pmix_status_t status,
2580                                        size_t refid,
2581                                        void *cbdata);
2582 /* retain the deprecated form */
2583 typedef void (*pmix_evhdlr_reg_cbfunc_t)(pmix_status_t status,
2584                                          size_t refid,
2585                                          void *cbdata);
2586 
2587 /* define a callback function for calls to PMIx_Get_nb. The status
2588  * indicates if the requested data was found or not - a pointer to the
2589  * pmix_value_t structure containing the found data is returned. The
2590  * pointer will be NULL if the requested data was not found. */
2591 typedef void (*pmix_value_cbfunc_t)(pmix_status_t status,
2592                                     pmix_value_t *kv, void *cbdata);
2593 
2594 /* define a callback function for calls to PMIx_Query. The status
2595  * indicates if requested data was found or not - an array of
2596  * pmix_info_t will contain the key/value pairs. */
2597 typedef void (*pmix_info_cbfunc_t)(pmix_status_t status,
2598                                    pmix_info_t *info, size_t ninfo,
2599                                    void *cbdata,
2600                                    pmix_release_cbfunc_t release_fn,
2601                                    void *release_cbdata);
2602 
2603 /* Define a callback function to return a requested security credential.
2604  * Returned values include:
2605  *
2606  * status - PMIX_SUCCESS if a credential could be assigned as requested, or
2607  *          else an appropriate error code indicating the problem
2608  *
2609  * credential - pointer to an allocated pmix_byte_object_t containing the
2610  *              credential (as a opaque blob) and its size. Ownership of
2611  *              the credential is transferred to the receiving function - thus,
2612  *              responsibility for releasing the memory lies outside the
2613  *              PMIx library.
2614  *
2615  * info - an array of pmix_info_t structures provided by the system to pass
2616  *        any additional information about the credential - e.g., the identity
2617  *        of the issuing agent. The info array is owned by the PMIx library
2618  *        and is not to be released or altered by the receiving party. Note that
2619  *        this array is not related to the pmix_info_t structures possibly
2620  *        provided in the call to PMIx_Get_credential.
2621  *
2622  *        Information provided by the issuing agent can subsequently be used
2623  *        by the application for a variety of purposes. Examples include:
2624  *            - checking identified authorizations to determine what
2625  *              requests/operations are feasible as a means to steering
2626  *              workflows
2627  *            - compare the credential type to that of the local SMS for
2628  *              compatibility
2629  *
2630  * ninfo - number of elements in the info array
2631  *
2632  * cbdata - the caller's provided void* object
2633  *
2634  * NOTE: the credential is opaque and therefore understandable only by
2635  *       a service compatible with the issuer.
2636  */
2637 typedef void (*pmix_credential_cbfunc_t)(pmix_status_t status,
2638                                          pmix_byte_object_t *credential,
2639                                          pmix_info_t info[], size_t ninfo,
2640                                          void *cbdata);
2641 
2642 
2643 /* Define a validation callback function to indicate if a provided
2644  * credential is valid, and any corresponding information regarding
2645  * authorizations and other security matters
2646  * Returned values include:
2647  *
2648  * status - PMIX_SUCCESS if the provided credential is valid. An appropriate
2649  *          error code indicating the issue if the credential is rejected.
2650  *
2651  * info - an array of pmix_info_t structures provided by the system to pass
2652  *        any additional information about the authentication - e.g., the
2653  *        effective userid and group id of the certificate holder, and any
2654  *        related authorizations. The info array is owned by the PMIx library
2655  *        and is not to be released or altered by the receiving party. Note that
2656  *        this array is not related to the pmix_info_t structures possibly
2657  *        provided in the call to PMIx_Validate_credential.
2658  *
2659  *        The precise contents of the array will depend on the host SMS and
2660  *        its associated security system. At the minimum, it is expected (but
2661  *        not required) that the array will contain entries for the PMIX_USERID
2662  *        and PMIX_GROUPID of the client described in the credential.
2663  *
2664  * ninfo - number of elements in the info array
2665  *
2666  * cbdata - the caller's provided void* object
2667  */
2668 typedef void (*pmix_validation_cbfunc_t)(pmix_status_t status,
2669                                          pmix_info_t info[], size_t ninfo,
2670                                          void *cbdata);
2671 
2672 /* Define a callback function to return device distance arrays
2673  */
2674 typedef void (*pmix_device_dist_cbfunc_t)(pmix_status_t status,
2675                                           pmix_device_distance_t *dist,
2676                                           size_t ndist,
2677                                           void *cbdata,
2678                                           pmix_release_cbfunc_t release_fn,
2679                                           void *release_cbdata);
2680 
2681 
2682 
2683 
2684 #include <pmix_deprecated.h>
2685 
2686 #if defined(c_plusplus) || defined(__cplusplus)
2687 }
2688 #endif
2689 
2690 #endif