Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-17 09:55:55

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 
0554 
0555 /* query keys - value type shown is the type of the value that will be RETURNED by that key  */
0556 #define PMIX_QUERY_SUPPORTED_KEYS           "pmix.qry.keys"         // (char*) returns comma-delimited list of keys supported by the query
0557                                                                     //         function. NO QUALIFIERS
0558 #define PMIX_QUERY_NAMESPACES               "pmix.qry.ns"           // (char*) returns a comma-delimited list of active namespaces. NO QUALIFIERS
0559 #define PMIX_QUERY_NAMESPACE_INFO           "pmix.qry.nsinfo"       // (pmix_data_array_t*) returns an array of active nspace information - each
0560                                                                     //        element will contain an array including the namespace plus the
0561                                                                     //        command line of the application executing within it
0562                                                                     //        SUPPORTED QUALIFIERS: PMIX_NSPACE of specific nspace whose info
0563                                                                     //        is being requested
0564 #define PMIX_QUERY_JOB_STATUS               "pmix.qry.jst"          // (pmix_status_t) returns status of a specified currently executing job
0565                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0566 #define PMIX_QUERY_QUEUE_LIST               "pmix.qry.qlst"         // (char*) request a comma-delimited list of scheduler queues. NO QUALIFIERS
0567 #define PMIX_QUERY_QUEUE_STATUS             "pmix.qry.qst"          // (pmix_data_array_t*) returns array where each element contains the name and
0568                                                                     //         status of a scheduler queue
0569                                                                     //        SUPPORTED QUALIFIERS: PMIX_ALLOC_QUEUE naming specific queue whose status
0570                                                                     //        is being requested
0571 #define PMIX_QUERY_PROC_TABLE               "pmix.qry.ptable"       // (pmix_data_array_t*) returns (pmix_data_array_t*) an array of pmix_proc_info_t
0572                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0573 #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
0574                                                                     //         for procs in job on same node
0575                                                                     //         REQUIRES a PMIX_NSPACE qualifier indicating the nspace being queried
0576 #define PMIX_QUERY_AUTHORIZATIONS           "pmix.qry.auths"        // (pmix_data_array_t*) return operations tool is authorized to perform. The contents
0577                                                                     //         of the array elements have not yet been standardized. NO QUALIFIERS
0578 #define PMIX_QUERY_SPAWN_SUPPORT            "pmix.qry.spawn"        // (char*) return a comma-delimited list of supported spawn attributes. NO QUALIFIERS
0579 #define PMIX_QUERY_DEBUG_SUPPORT            "pmix.qry.debug"        // (char*) return a comma-delimited list of supported debug attributes. NO QUALIFIERS
0580 #define PMIX_QUERY_MEMORY_USAGE             "pmix.qry.mem"          // (pmix_data_array_t*) return info on memory usage for the procs indicated in the qualifiers
0581                                                                     //        SUPPORTED QUALIFIERS: PMIX_NSPACE/PMIX_RANK, or PMIX_PROCID of specific proc(s)
0582                                                                     //        whose info is being requested
0583 #define PMIX_QUERY_ALLOC_STATUS             "pmix.query.alloc"      // (char*) return a string reporting status of an allocation request
0584                                                                     //         REQUIRES a PMIX_ALLOC_REQUEST_ID qualifier indicating the allocation request
0585                                                                     //         being queried
0586 #define PMIX_QUERY_ALLOCATION               "pmix.query.allc"       // (pmix_data_array_t*) returns an array of pmix_info_t describing the nodes known to the
0587                                                                     //         server. Each array element will consist of the PMIX_NODE_INFO key containing
0588                                                                     //         a pmix_data_array_t of pmix_info_t - the first element of the array must be
0589                                                                     //         the hostname of that node, with additional info on the node in subsequent entries.
0590                                                                     //         SUPPORTED_QUALIFIER: a PMIX_ALLOC_ID qualifier indicating the specific
0591                                                                     //         allocation of interest
0592 #define PMIX_TIME_REMAINING                 "pmix.time.remaining"   // (uint32_t) returns number of seconds remaining in allocation
0593                                                                     //         for the specified nspace (defaults to allocation containing the caller)
0594                                                                     //         SUPPORTED QUALIFIERS: PMIX_NSPACE of the nspace whose info is being requested
0595 #define PMIX_QUERY_NUM_PSETS                "pmix.qry.psetnum"      // (size_t) returns the number of psets defined
0596                                                                     //          in the specified range (defaults to session)
0597                                                                     //         SUPPORTED QUALIFIERS: PMIX_RANGE whose info is being requested
0598 #define PMIX_QUERY_PSET_NAMES               "pmix.qry.psets"        // (char*) returns a comma-delimited list of the names of the
0599                                                                     //         psets defined in the specified range (defaults to session)
0600                                                                     //         SUPPORTED QUALIFIERS: PMIX_RANGE whose info is being requested
0601 #define PMIX_QUERY_PSET_MEMBERSHIP          "pmix.qry.pmems"        // (pmix_data_array_t*) Return an array of pmix_proc_t containing the members of
0602                                                                     //         the specified process set.
0603 #define PMIX_QUERY_NUM_GROUPS               "pmix.qry.pgrpnum"      // (size_t) Return the number of process groups defined in the specified range
0604                                                                     //         (defaults to session). OPTIONAL QUALIFERS: PMIX_RANGE.
0605 #define PMIX_QUERY_GROUP_NAMES              "pmix.qry.pgrp"         // (pmix_data_array_t*) Return a pmix_data_array_t containing an array of string
0606                                                                     //         names of the process groups defined in the specified range (defaults
0607                                                                     //         to session). OPTIONAL QUALIFERS: PMIX_RANGE
0608 #define PMIX_QUERY_GROUP_MEMBERSHIP         "pmix.qry.pgrpmems"     // (pmix_data_array_t*) Return a pmix_data_array_t of pmix_proc_t containing
0609                                                                     //         the members of the specified process group. REQUIRED QUALIFIERS:
0610                                                                     //         PMIX_GROUP_ID.
0611 #define PMIX_QUERY_ATTRIBUTE_SUPPORT        "pmix.qry.attrs"        // (pmix_data_array_t*) returns array of pmix_info_t where each element consists
0612                                                                     //         of a key containing the name of the function, and an array of pmix_regattr_t
0613                                                                     //         detailing the attribute support for that function
0614                                                                     //         SUPPORTED QUALIFIERS: PMIX_CLIENT_FUNCTIONS, PMIX_SERVER_FUNCTIONS,
0615                                                                     //         PMIX_TOOL_FUNCTIONS, and/or PMIX_HOST_FUNCTIONS
0616 #define PMIX_CLIENT_FUNCTIONS               "pmix.client.fns"       // (char*) returns a comma-delimited list of supported PMIx client functions. NO QUALIFIERS
0617 #define PMIX_SERVER_FUNCTIONS               "pmix.srvr.fns"         // (char*) returns a comma-delimited list of supported PMIx server functions. NO QUALIFIERS
0618 #define PMIX_TOOL_FUNCTIONS                 "pmix.tool.fns"         // (char*) returns a comma-delimited list of supported PMIx tool functions. NO QUALIFIERS
0619 #define PMIX_HOST_FUNCTIONS                 "pmix.host.fns"         // (char*) returns a comma-delimited list of PMIx functions supported by the host environment
0620 #define PMIX_QUERY_AVAIL_SERVERS            "pmix.qry.asrvrs"       // (pmix_data_array_t*) array of pmix_info_t, each element containing an array of
0621                                                                     //         pmix_info_t of available data for servers on this node
0622                                                                     //         to which the caller might be able to connect. NO QUALIFIERS
0623 #define PMIX_QUERY_QUALIFIERS               "pmix.qry.quals"        // (pmix_data_array_t*) Contains an array of qualifiers that were included in the
0624                                                                     //         query that produced the provided results. This attribute is solely for
0625                                                                     //         reporting purposes and cannot be used in PMIx_Get or other query
0626                                                                     //         operations
0627 #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
0628                                                                     //         PMIx_Query_info APIs. If qualifiers were included in the query, then the first element
0629                                                                     //         of the array shall be the PMIX_QUERY_QUALIFIERS attribute containing those qualifiers.
0630                                                                     //         Each of the remaining elements of the array is a pmix_info_t containing the query key
0631                                                                     //         and the corresponding value returned by the query. This attribute is solely for
0632                                                                     //         reporting purposes and cannot be used in PMIx_Get or other query operations
0633 #define PMIX_QUERY_AVAILABLE_SLOTS          "pmix.qry.aslots"       // (uint32_t) Number of slots currently available
0634                                                                     //         in the session. This is a snapshot in
0635                                                                     //         time as the number may have changed
0636                                                                     //         (e.g., if another job was submitted after
0637                                                                     //         the host generated its response). Request
0638                                                                     //         may optionally specify the session using
0639                                                                     //         the PMIX_SESSION_ID attribute - default
0640                                                                     //         is the session of the requestor
0641 
0642 
0643 /* query qualifiers - these are used to provide information to narrow/modify the query. Value type shown is the type of data expected
0644  * to be provided with the key */
0645 #define PMIX_QUERY_REFRESH_CACHE            "pmix.qry.rfsh"         // (bool) retrieve updated information from server
0646                                                                     //        to update local cache
0647 #define PMIX_QUERY_LOCAL_ONLY               "pmix.qry.local"        // (bool) constrain the query to local information only
0648 #define PMIX_QUERY_REPORT_AVG               "pmix.qry.avg"          // (bool) report average values
0649 #define PMIX_QUERY_REPORT_MINMAX            "pmix.qry.minmax"       // (bool) report minimum and maximum value
0650 #define PMIX_CLIENT_ATTRIBUTES              "pmix.client.attrs"     // (char*) comma-delimited list of functions, including "all"
0651                                                                     //        when used in a query, indicates whether or not to include
0652                                                                     //        attributes supported by the PMIx client library
0653 #define PMIX_SERVER_ATTRIBUTES              "pmix.srvr.attrs"       // (char*) comma-delimited list of functions, including "all"
0654                                                                     //        when used in a query, indicates whether or not to include
0655                                                                     //        attributes supported by the PMIx server library
0656 #define PMIX_HOST_ATTRIBUTES                "pmix.host.attrs"       // (char*) comma-delimited list of functions, including "all"
0657                                                                     //        when used in a query, indicates whether or not to include
0658                                                                     //        attributes supported by the host environment
0659 #define PMIX_TOOL_ATTRIBUTES                "pmix.tool.attrs"       // (char*) comma-delimited list of functions, including "all"
0660                                                                     //        when used in a query, indicates whether or not to include
0661                                                                     //        attributes supported by the PMIx tool library
0662 #define PMIX_QUERY_SUPPORTED_QUALIFIERS     "pmix.qry.quals"        // (bool) return comma-delimited list of qualifiers supported by
0663                                                                     //        a query on the provided key, instead of actually performing
0664                                                                     //        the query on the key.
0665 
0666 
0667 /* PMIx_Get information retrieval qualifiers */
0668 #define PMIX_SESSION_INFO                   "pmix.ssn.info"         // (bool) Return information about the specified session. If information
0669                                                                     //        about a session other than the one containing the requesting
0670                                                                     //        process is desired, then the attribute array must contain a
0671                                                                     //        PMIX_SESSION_ID attribute identifying the desired target.
0672 #define PMIX_JOB_INFO                       "pmix.job.info"         // (bool) Return information about the specified job or namespace. If
0673                                                                     //        information about a job or namespace other than the one containing
0674                                                                     //        the requesting process is desired, then the attribute array must
0675                                                                     //        contain a PMIX_JOBID or PMIX_NSPACE attribute identifying the
0676                                                                     //        desired target. Similarly, if information is requested about a
0677                                                                     //        job or namespace in a session other than the one containing the
0678                                                                     //        requesting process, then an attribute identifying the target
0679                                                                     //        session must be provided.
0680 #define PMIX_APP_INFO                       "pmix.app.info"         // (bool) Return information about the specified application. If information
0681                                                                     //        about an application other than the one containing the requesting
0682                                                                     //        process is desired, then the attribute array must contain a
0683                                                                     //        PMIX_APPNUM attribute identifying the desired target. Similarly,
0684                                                                     //        if information is requested about an application in a job or session
0685                                                                     //        other than the one containing the requesting process, then attributes
0686                                                                     //        identifying the target job and/or session must be provided.
0687 #define PMIX_NODE_INFO                      "pmix.node.info"        // (bool) Return information about the specified node. If information about a
0688                                                                     //        node other than the one containing the requesting process is desired,
0689                                                                     //        then the attribute array must contain either the PMIX_NODEID or
0690                                                                     //        PMIX_HOSTNAME attribute identifying the desired target.
0691 
0692 
0693 /* information storage attributes */
0694 #define PMIX_SESSION_INFO_ARRAY             "pmix.ssn.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing
0695                                                                     //        session-level information. The PMIX_SESSION_ID attribute is required
0696                                                                     //        to be included in the array.
0697 #define PMIX_JOB_INFO_ARRAY                 "pmix.job.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing job-level
0698                                                                     //        information. Information is registered one job (aka namespace) at a time
0699                                                                     //        via the PMIx_server_register_nspace API. Thus, there is no requirement that
0700                                                                     //        the array contain either the PMIX_NSPACE or PMIX_JOBID attributes, though
0701                                                                     //        either or both of them may be included.
0702 #define PMIX_APP_INFO_ARRAY                 "pmix.app.arr"          // (pmix_data_array_t*) Provide an array of pmix_info_t containing app-level
0703                                                                     //        information. The PMIX_NSPACE or PMIX_JOBID attributes of the job containing
0704                                                                     //        the application, plus its PMIX_APPNUM attribute, are required to be
0705                                                                     //        included in the array.
0706 #define PMIX_PROC_INFO_ARRAY                "pmix.pdata"            // (pmix_data_array_t*) Provide an array of pmix_info_t containing process-realm
0707                                                                     //        information. The PMIX_RANK and PMIX_NSPACE attributes, or the
0708                                                                     //        PMIX_PROCID attribute, are required to be included in the array when
0709                                                                     //        the array is not included as part of a call to
0710                                                                     //        PMIx_server_register_nspace - i.e., when the job containing the process
0711                                                                     //        is ambiguous. All three may be included if desired. When the array is
0712                                                                     //        included in some broader structure that identifies the job, then only
0713                                                                     //        the PMIX_RANK or the PMIX_PROCID attribute must be included (the others
0714                                                                     //        are optional).
0715 #define PMIX_NODE_INFO_ARRAY                "pmix.node.arr"         // (pmix_data_array_t*) Provide an array of pmix_info_t containing node-level
0716                                                                     //        information. At a minimum, either the PMIX_NODEID or PMIX_HOSTNAME
0717                                                                     //        attribute is required to be included in the array, though both may be
0718                                                                     //        included.
0719 #define PMIX_SERVER_INFO_ARRAY              "pmix.srv.arr"          // (pmix_data_array_t*) array of data on a given server, starting with its nspace
0720 
0721 
0722 /* log attributes */
0723 #define PMIX_LOG_SOURCE                     "pmix.log.source"       // (pmix_proc_t*) ID of source of the log request
0724 #define PMIX_LOG_STDERR                     "pmix.log.stderr"       // (char*) log string to stderr
0725 #define PMIX_LOG_STDOUT                     "pmix.log.stdout"       // (char*) log string to stdout
0726 #define PMIX_LOG_SYSLOG                     "pmix.log.syslog"       // (char*) log message to syslog - defaults to ERROR priority. Will log
0727                                                                     //         to global syslog if available, otherwise to local syslog
0728 #define PMIX_LOG_LOCAL_SYSLOG               "pmix.log.lsys"         // (char*) log msg to local syslog - defaults to ERROR priority
0729 #define PMIX_LOG_GLOBAL_SYSLOG              "pmix.log.gsys"         // (char*) forward data to system "master" and log msg to that syslog
0730 #define PMIX_LOG_SYSLOG_PRI                 "pmix.log.syspri"       // (int) syslog priority level
0731 
0732 #define PMIX_LOG_TIMESTAMP                  "pmix.log.tstmp"        // (time_t) timestamp for log report
0733 #define PMIX_LOG_GENERATE_TIMESTAMP         "pmix.log.gtstmp"       // (bool) generate timestamp for log
0734 #define PMIX_LOG_TAG_OUTPUT                 "pmix.log.tag"          // (bool) label the output stream with the channel name (e.g., "stdout")
0735 #define PMIX_LOG_TIMESTAMP_OUTPUT           "pmix.log.tsout"        // (bool) print timestamp in output string
0736 #define PMIX_LOG_XML_OUTPUT                 "pmix.log.xml"          // (bool) print the output stream in xml format
0737 #define PMIX_LOG_ONCE                       "pmix.log.once"         // (bool) only log this once with whichever channel can first support it
0738 #define PMIX_LOG_MSG                        "pmix.log.msg"          // (pmix_byte_object_t) message blob to be sent somewhere
0739 #define PMIX_LOG_KEY                        "pmix.log.key"          // (char*) key to a logging message
0740 #define PMIX_LOG_VAL                        "pmix.log.val"          // (char*) value to a logging message
0741 #define PMIX_LOG_AGG                        "pmix.log.agg"          // (bool) Whether to aggregate and prevent duplicate logging messages
0742                                                                     //        based on key value pairs.
0743 
0744 #define PMIX_LOG_EMAIL                      "pmix.log.email"        // (pmix_data_array_t*) log via email based on array of pmix_info_t
0745                                                                     //         containing directives
0746 #define PMIX_LOG_EMAIL_ADDR                 "pmix.log.emaddr"       // (char*) comma-delimited list of email addresses that are to recv msg
0747 #define PMIX_LOG_EMAIL_SENDER_ADDR          "pmix.log.emfaddr"      // (char*) return email address of sender
0748 #define PMIX_LOG_EMAIL_SUBJECT              "pmix.log.emsub"        // (char*) subject line for email
0749 #define PMIX_LOG_EMAIL_MSG                  "pmix.log.emmsg"        // (char*) msg to be included in email
0750 #define PMIX_LOG_EMAIL_SERVER               "pmix.log.esrvr"        // (char*) hostname (or IP addr) of estmp server
0751 #define PMIX_LOG_EMAIL_SRVR_PORT            "pmix.log.esrvrprt"     // (int32_t) port the email server is listening to
0752 
0753 #define PMIX_LOG_GLOBAL_DATASTORE           "pmix.log.gstore"       // (bool) log the provided data to a global datastore
0754 #define PMIX_LOG_JOB_RECORD                 "pmix.log.jrec"         // (bool) log the provided information to the RM's job record
0755 #define PMIX_LOG_PROC_TERMINATION           "pmix.logproc"          // (bool) Requests that the launcher log the PMIX_EVENT_PROC_TERMINATED event
0756                                                                     //        whenever a process either normally or abnormally terminates.
0757 #define PMIX_LOG_PROC_ABNORMAL_TERMINATION  "pmix.logabproc"        // (bool) Requests that the launcher log the PMIX_EVENT_PROC_TERMINATED event
0758                                                                     //        only when a process abnormally terminates.
0759 #define PMIX_LOG_JOB_EVENTS                 "pmix.log.jev"          // (bool) Requests that the launcher log the PMIX_EVENT_JOB_START,
0760                                                                     //        PMIX_LAUNCH_COMPLETE, and PMIX_EVENT_JOB_END events using PMIx_Log
0761 #define PMIX_LOG_COMPLETION                 "pmix.logcomp"          // (bool) Requests that the launcher log the PMIX_EVENT_JOB_END event
0762                                                                     //        for normal or abnormal termination of the spawned job using
0763                                                                     //        PMIx_Log. The event shall include the returned status code
0764                                                                     //        (PMIX_JOB_TERM_STATUS) for the corresponding job; the identity
0765                                                                     //        (PMIX_PROCID) and exit status (PMIX_EXIT_CODE) of the first failed
0766                                                                     //        process, if applicable; and a PMIX_EVENT_TIMESTAMP indicating the time
0767                                                                     //        the termination occurred.
0768 
0769 
0770 /* debugger attributes */
0771 #define PMIX_DEBUG_STOP_ON_EXEC             "pmix.dbg.exec"         // (varies) stop specified rank(s) on exec and notify ready-to-debug
0772                                                                     //        Can be any of three data types:
0773                                                                     //           (a) bool - true indicating all ranks, false indicating none
0774                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0775                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0776                                                                     //               are specified
0777 #define PMIX_DEBUG_STOP_IN_INIT             "pmix.dbg.init"         // (varies) stop specified rank(s) in PMIx_Init and notify ready-to-debug
0778                                                                     //        Can be any of three data types:
0779                                                                     //           (a) bool - true indicating all ranks, false indicating none
0780                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0781                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0782                                                                     //               are specified
0783 #define PMIX_DEBUG_STOP_IN_APP              "pmix.dbg.notify"       // (varies) direct specified ranks to stop at application-specific point and
0784                                                                     //        notify ready-to-debug. Can be any of three data types:
0785                                                                     //           (a) bool - true indicating all ranks, false indicating none
0786                                                                     //           (b) pmix_rank_t - the rank of one proc, or WILDCARD for all
0787                                                                     //           (c) a pmix_data_array_t if an array of individual processes
0788                                                                     //               are specified
0789 #define PMIX_BREAKPOINT                     "pmix.brkpnt"           // (char*) string ID of the breakpoint where the process(es) is(are) waiting
0790 #define PMIX_DEBUG_TARGET                   "pmix.dbg.tgt"          // (pmix_proc_t*) Identifier of proc(s) to be debugged
0791 #define PMIX_DEBUG_DAEMONS_PER_PROC         "pmix.dbg.dpproc"       // (uint16_t) Number of debugger daemons to be spawned per application
0792                                                                     //        process. The launcher is to pass the identifier of the namespace to
0793                                                                     //        be debugged by including the PMIX_DEBUG_TARGET attribute in the
0794                                                                     //        daemon's job-level information. The debugger daemons spawned on a
0795                                                                     //        given node are responsible for self-determining their specific
0796                                                                     //        target process(es) - e.g., by referencing their own PMIX_LOCAL_RANK
0797                                                                     //        in the daemon debugger job versus the corresponding PMIX_LOCAL_RANK
0798                                                                     //        of the target processes on the node.
0799 #define PMIX_DEBUG_DAEMONS_PER_NODE         "pmix.dbg.dpnd"         // (uint16_t) Number of debugger daemons to be spawned on each node where the
0800                                                                     //        target job is executing. The launcher is to pass the identifier of
0801                                                                     //        the namespace to be debugged by including the PMIX_DEBUG_TARGET
0802                                                                     //        attribute in the daemon's job-level information. The debugger
0803                                                                     //        daemons spawned on a given node are responsible for
0804                                                                     //        self-determining their specific target process(es) - e.g., by
0805                                                                     //        referencing their own PMIX_LOCAL_RANK in the daemon debugger job
0806                                                                     //        versus the corresponding PMIX_LOCAL_RANK of the target processes on
0807                                                                     //        the node.
0808 
0809 
0810 /* Resource Manager identification */
0811 #define PMIX_RM_NAME                        "pmix.rm.name"          // (char*) string name of the resource manager
0812 #define PMIX_RM_VERSION                     "pmix.rm.version"       // (char*) RM version string
0813 
0814 /* environmental variable operation attributes */
0815 #define PMIX_SET_ENVAR                      "pmix.envar.set"          // (pmix_envar_t*) set the envar to the given value,
0816                                                                       //                 overwriting any pre-existing one
0817 #define PMIX_ADD_ENVAR                      "pmix.envar.add"          // (pmix_envar_t*) add envar, but do not overwrite any existing one
0818 #define PMIX_UNSET_ENVAR                    "pmix.envar.unset"        // (char*) unset the envar, if present
0819 #define PMIX_PREPEND_ENVAR                  "pmix.envar.prepnd"       // (pmix_envar_t*) prepend the given value to the
0820                                                                       //                 specified envar using the separator
0821                                                                       //                 character, creating the envar if it doesn't already exist
0822 #define PMIX_APPEND_ENVAR                   "pmix.envar.appnd"        // (pmix_envar_t*) append the given value to the specified
0823                                                                       //                 envar using the separator character,
0824                                                                       //                 creating the envar if it doesn't already exist
0825 #define PMIX_FIRST_ENVAR                    "pmix.envar.first"        // (pmix_envar_t*) ensure the given value appears first in the
0826                                                                       //                 specified envar using the separator
0827                                                                       //                 character, creating the envar if it doesn't already exist
0828 
0829 /* attributes relating to allocations */
0830 #define PMIX_ALLOC_REQ_ID                   "pmix.alloc.reqid"      // (char*) User-provided string identifier for this allocation request
0831                                                                     //         which can later be used to query status of the request.
0832 #define PMIX_ALLOC_ID                       "pmix.alloc.id"         // (char*) A string identifier (provided by the host environment) for
0833                                                                     //         the resulting allocation which can later be used to reference
0834                                                                     //         the allocated resources in, for example, a call to PMIx_Spawn
0835 #define PMIX_ALLOC_NUM_NODES                "pmix.alloc.nnodes"     // (uint64_t) number of nodes
0836 #define PMIX_ALLOC_NODE_LIST                "pmix.alloc.nlist"      // (char*) regex of specific nodes
0837 #define PMIX_ALLOC_EXCLUDE                  "pmix.alloc.exclude"    // (char*) regex of nodes to exclude from scheduling consideration
0838 #define PMIX_ALLOC_NUM_CPUS                 "pmix.alloc.ncpus"      // (uint64_t) number of cpus
0839 #define PMIX_ALLOC_NUM_CPU_LIST             "pmix.alloc.ncpulist"   // (char*) regex of #cpus for each node
0840 #define PMIX_ALLOC_CPU_LIST                 "pmix.alloc.cpulist"    // (char*) regex of specific cpus indicating the cpus involved.
0841 #define PMIX_ALLOC_MEM_SIZE                 "pmix.alloc.msize"      // (float) number of Mbytes
0842 #define PMIX_ALLOC_FABRIC                   "pmix.alloc.net"        // (pmix_data_array_t*) Array of pmix_info_t describing
0843                                                                     //         fabric resource request. This must include at least:
0844                                                                     //           * PMIX_ALLOC_FABRIC_ID
0845                                                                     //           * PMIX_ALLOC_FABRIC_TYPE
0846                                                                     //           * PMIX_ALLOC_FABRIC_ENDPTS
0847                                                                     //         plus whatever other descriptors are desired
0848 #define PMIX_ALLOC_FABRIC_ID                "pmix.alloc.netid"      // (char*) key to be used when accessing this requested fabric allocation. The
0849                                                                     //         allocation will be returned/stored as a pmix_data_array_t of
0850                                                                     //         pmix_info_t indexed by this key and containing at least one
0851                                                                     //         entry with the same key and the allocated resource description.
0852                                                                     //         The type of the included value depends upon the fabric
0853                                                                     //         support. For example, a TCP allocation might consist of a
0854                                                                     //         comma-delimited string of socket ranges such as
0855                                                                     //         "32000-32100,33005,38123-38146". Additional entries will consist
0856                                                                     //         of any provided resource request directives, along with their
0857                                                                     //         assigned values. Examples include:
0858                                                                     //           * PMIX_ALLOC_FABRIC_TYPE - the type of resources provided
0859                                                                     //           * PMIX_ALLOC_FABRIC_PLANE - if applicable, what plane the
0860                                                                     //               resources were assigned from
0861                                                                     //           * PMIX_ALLOC_FABRIC_QOS - the assigned QoS
0862                                                                     //           * PMIX_ALLOC_BANDWIDTH - the allocated bandwidth
0863                                                                     //           * PMIX_ALLOC_FABRIC_SEC_KEY - a security key for the requested
0864                                                                     //               fabric allocation
0865                                                                     //         NOTE: the assigned values may differ from those requested,
0866                                                                     //         especially if the "required" flag was not set in the request
0867 #define PMIX_ALLOC_BANDWIDTH                "pmix.alloc.bw"         // (float) Mbits/sec
0868 #define PMIX_ALLOC_FABRIC_QOS               "pmix.alloc.netqos"     // (char*) quality of service level
0869 #define PMIX_ALLOC_TIME                     "pmix.alloc.time"       // (char*) time that the allocation shall remain valid. Time is specified in
0870                                                                     //         usual time format of months:days:hours:minutes:seconds, scanning
0871                                                                     //         from right to left (i.e., a value of "2" equates to 2 seconds)
0872 #define PMIX_ALLOC_FABRIC_TYPE              "pmix.alloc.nettype"    // (char*) type of desired transport (e.g., tcp, udp)
0873 #define PMIX_ALLOC_FABRIC_PLANE             "pmix.alloc.netplane"   // (char*) id string for the NIC (aka plane) to be used for this allocation
0874                                                                     //         (e.g., CIDR for Ethernet)
0875 #define PMIX_ALLOC_FABRIC_ENDPTS            "pmix.alloc.endpts"     // (size_t) number of endpoints to allocate per process
0876 #define PMIX_ALLOC_FABRIC_ENDPTS_NODE       "pmix.alloc.endpts.nd"  // (size_t) number of endpoints to allocate per node
0877 #define PMIX_ALLOC_FABRIC_SEC_KEY           "pmix.alloc.nsec"       // (pmix_byte_object_t) fabric security key
0878 #define PMIX_ALLOC_QUEUE                    "pmix.alloc.queue"      // (char*) name of queue being referenced
0879 #define PMIX_ALLOC_PREEMPTIBLE              "pmix.alloc.preempt"    // (bool) by default, all jobs in the resulting allocation are to be
0880                                                                     //        considered preemptible (overridable at per-job level)
0881 #define PMIX_ALLOC_LEND                     "pmix.alloc.lend"       // (char*) estimated time before the lent resources shall be available for
0882                                                                     //         return. Time is specified in usual time format of
0883                                                                     //         months:days:hours:minutes:seconds, scanning from right to left
0884                                                                     //         (i.e., a value of "2" equates to 2 seconds)
0885 #define PMIX_ALLOC_IMAGE                    "pmix.alloc.image"      // (char*) name of the image that the requested nodes are to have on them
0886 #define PMIX_ALLOC_WAIT_ALL_NODES           "pmix.alloc.waitall"    // (bool) whether or not to wait for all nodes to be scheduled before
0887                                                                     //        starting to initialize and release nodes for use
0888 #define PMIX_ALLOC_SHARE                    "pmix.alloc.share"      // (bool) Allow non-exclusive use of specified resources
0889 #define PMIX_ALLOC_NOSHELL                  "pmix.alloc.noshell"    // (bool) Immediately exit after allocating resources, without running a command.
0890 #define PMIX_ALLOC_DEPENDENCY               "pmix.alloc.depend"     // (char*) Defer the start of allocation until the specified dependencies have
0891                                                                     //         successfully completed.
0892 #define PMIX_ALLOC_BEGIN                    "pmix.alloc.begin"      // (char*) Direct the scheduler to defer allocation until the specified time. Time
0893                                                                     //         may be of the form HH:MM:SS to schedule the session to start at a specific
0894                                                                     //         time of day (seconds are optional). If that time is already past, the
0895                                                                     //         next day is assumed. You may also specify "midnight" or "noon", and you
0896                                                                     //         can have a time-of-day suffixed with AM or PM for running in the morning
0897                                                                     //         or the evening. You can also say what day the session should start by
0898                                                                     //         specifying a date of the form MMDDYY or MM/DD/YY YYYY-MM-DD. Combine date
0899                                                                     //         and time using the usual format YYYY-MM-DD[THH:MM[:SS]]. You can also give
0900                                                                     //         times like "now + count" time-units, where the time-units can be "seconds"
0901                                                                     //         (default), "minutes", "hours", days, or weeks, or you can ask that the
0902                                                                     //         allocation be made "today" or "tomorrow".
0903 
0904 
0905 /* job control attributes */
0906 #define PMIX_JOB_CTRL_ID                    "pmix.jctrl.id"         // (char*) provide a string identifier for this request
0907 #define PMIX_JOB_CTRL_PAUSE                 "pmix.jctrl.pause"      // (bool) pause the specified processes
0908 #define PMIX_JOB_CTRL_RESUME                "pmix.jctrl.resume"     // (bool) "un-pause" the specified processes
0909 #define PMIX_JOB_CTRL_CANCEL                "pmix.jctrl.cancel"     // (char*) cancel the specified request
0910                                                                     //         (NULL => cancel all requests from this requestor)
0911 #define PMIX_JOB_CTRL_KILL                  "pmix.jctrl.kill"       // (bool) forcibly terminate the specified processes and cleanup
0912 #define PMIX_JOB_CTRL_RESTART               "pmix.jctrl.restart"    // (char*) restart the specified processes using the given checkpoint ID
0913 #define PMIX_JOB_CTRL_CHECKPOINT            "pmix.jctrl.ckpt"       // (char*) checkpoint the specified processes and assign the given ID to it
0914 #define PMIX_JOB_CTRL_CHECKPOINT_EVENT      "pmix.jctrl.ckptev"     // (bool) use event notification to trigger process checkpoint
0915 #define PMIX_JOB_CTRL_CHECKPOINT_SIGNAL     "pmix.jctrl.ckptsig"    // (int) use the given signal to trigger process checkpoint
0916 #define PMIX_JOB_CTRL_CHECKPOINT_TIMEOUT    "pmix.jctrl.ckptsig"    // (int) time in seconds to wait for checkpoint to complete
0917 #define PMIX_JOB_CTRL_CHECKPOINT_METHOD     "pmix.jctrl.ckmethod"   // (pmix_data_array_t*) array of pmix_info_t declaring each
0918                                                                     //      method and value supported by this application
0919 #define PMIX_JOB_CTRL_SIGNAL                "pmix.jctrl.sig"        // (int) send given signal to specified processes
0920 #define PMIX_JOB_CTRL_PROVISION             "pmix.jctrl.pvn"        // (char*) regex identifying nodes that are to be provisioned
0921 #define PMIX_JOB_CTRL_PROVISION_IMAGE       "pmix.jctrl.pvnimg"     // (char*) name of the image that is to be provisioned
0922 #define PMIX_JOB_CTRL_PREEMPTIBLE           "pmix.jctrl.preempt"    // (bool) job can be pre-empted
0923 #define PMIX_JOB_CTRL_TERMINATE             "pmix.jctrl.term"       // (bool) politely terminate the specified procs
0924 #define PMIX_JOB_CTRL_DEFINE_PSET           "pmix.jctrl.defpset"    // (char*) Pset name to be assigned to the targets
0925 #define PMIX_REGISTER_CLEANUP               "pmix.reg.cleanup"      // (char*) comma-delimited list of files to
0926                                                                     //         be removed upon process termination
0927 #define PMIX_REGISTER_CLEANUP_DIR           "pmix.reg.cleanupdir"   // (char*) comma-delimited list of directories to
0928                                                                     //         be removed upon process termination
0929 #define PMIX_CLEANUP_RECURSIVE              "pmix.clnup.recurse"    // (bool) recursively cleanup all subdirectories under the
0930                                                                     //        specified one(s)
0931 #define PMIX_CLEANUP_EMPTY                  "pmix.clnup.empty"      // (bool) only remove empty subdirectories
0932 #define PMIX_CLEANUP_IGNORE                 "pmix.clnup.ignore"     // (char*) comma-delimited list of filenames that are not
0933                                                                     //         to be removed
0934 #define PMIX_CLEANUP_LEAVE_TOPDIR           "pmix.clnup.lvtop"      // (bool) when recursively cleaning subdirs, do not remove
0935                                                                     //        the top-level directory (the one given in the
0936                                                                     //        cleanup request)
0937 /* session control attributes */
0938 #define PMIX_SESSION_CTRL_ID                "pmix.ssnctrl.id"       // (char*) provide a string identifier for this request
0939 
0940 /* session instantiation attributes - called by scheduler
0941  * Schedulers calling to create a session are required to provide:
0942  *  - the effective userID and groupID that the session should have
0943  *    when instantiated.
0944  *  - description of the resources that are to be included in the session
0945  *  - if applicable, the image that should be provisioned on nodes
0946  *    included in the session
0947  *  - an array of applications (if any) that are to be started in the
0948  *    session once instantiated
0949  */
0950 #define PMIX_SESSION_APP                    "pmix.ssn.app"          // (pmix_data_array_t*) Array of pmix_app_t to be executed in the assigned
0951                                                                     //        session upon session instantiation
0952 #define PMIX_SESSION_PROVISION              "pmix.ssn.pvn"          // (pmix_data_array_t*) description of nodes to be provisioned with
0953                                                                     //       specified image
0954 #define PMIX_SESSION_PROVISION_NODES        "pmix.ssn.pvnnds"       // (char*) regex identifying nodes that are to be provisioned
0955 #define PMIX_SESSION_PROVISION_IMAGE        "pmix.ssn.pvnimg"       // (char*) name of the image that is to be provisioned
0956 
0957 /* session operational attributes - called by scheduler */
0958 #define PMIX_SESSION_PAUSE                  "pmix.ssn.pause"        // (bool) pause all jobs in the specified session
0959 #define PMIX_SESSION_RESUME                 "pmix.ssn.resume"       // (bool) "un-pause" all jobs in the specified session
0960 #define PMIX_SESSION_TERMINATE              "pmix.ssn.terminate"    // (bool) terminate all jobs in the specified session and recover all
0961                                                                     //        resources included in the session.
0962 #define PMIX_SESSION_PREEMPT                "pmix.ssn.preempt"      // (bool) preempt indicated jobs (given in accompanying pmix_info_t via
0963                                                                     //        the PMIX_NSPACE attribute) in the specified session and recover
0964                                                                     //        all their resources. If no PMIX_NSPACE is specified, then preempt
0965                                                                     //        all jobs in the session.
0966 #define PMIX_SESSION_RESTORE                "pmix.ssn.restore"      // (bool) restore indicated jobs (given in accompanying pmix_info_t via
0967                                                                     //        the PMIX_NSPACE attribute) in the specified session, including
0968                                                                     //        all their resources. If no PMIX_NSPACE is specified, then restore
0969                                                                     //        all jobs in the session.
0970 #define PMIX_SESSION_SIGNAL                 "pmix.ssn.sig"          // (int) send given signal to all processes of every job in the session
0971 
0972 /* session operational attributes - called by RTE */
0973 #define PMIX_SESSION_COMPLETE               "pmix.ssn.complete"     // (bool) specified session has completed, all resources have been
0974                                                                     //        recovered and are available for scheduling. Must include
0975                                                                     //        pmix_info_t indicating ID and returned status of any jobs
0976                                                                     //        executing in the session.
0977 
0978 
0979 /* monitoring attributes */
0980 #define PMIX_MONITOR_ID                     "pmix.monitor.id"       // (char*) provide a string identifier for this request
0981 #define PMIX_MONITOR_CANCEL                 "pmix.monitor.cancel"   // (char*) identifier to be canceled (NULL = cancel all
0982                                                                     //         monitoring for this process)
0983 #define PMIX_MONITOR_APP_CONTROL            "pmix.monitor.appctrl"  // (bool) the application desires to control the response to
0984                                                                     //        a monitoring event
0985 #define PMIX_MONITOR_HEARTBEAT              "pmix.monitor.mbeat"    // (bool) register to have the server monitor the requestor for heartbeats
0986 #define PMIX_SEND_HEARTBEAT                 "pmix.monitor.beat"     // (bool) send heartbeat to local server
0987 #define PMIX_MONITOR_HEARTBEAT_TIME         "pmix.monitor.btime"    // (uint32_t) time in seconds before declaring heartbeat missed
0988 #define PMIX_MONITOR_HEARTBEAT_DROPS        "pmix.monitor.bdrop"    // (uint32_t) number of heartbeats that can be missed before
0989                                                                     //            generating the event
0990 #define PMIX_MONITOR_FILE                   "pmix.monitor.fmon"     // (char*) register to monitor file for signs of life
0991 #define PMIX_MONITOR_FILE_SIZE              "pmix.monitor.fsize"    // (bool) monitor size of given file is growing to determine app is running
0992 #define PMIX_MONITOR_FILE_ACCESS            "pmix.monitor.faccess"  // (char*) monitor time since last access of given file to determine app is running
0993 #define PMIX_MONITOR_FILE_MODIFY            "pmix.monitor.fmod"     // (char*) monitor time since last modified of given file to determine app is running
0994 #define PMIX_MONITOR_FILE_CHECK_TIME        "pmix.monitor.ftime"    // (uint32_t) time in seconds between checking file
0995 #define PMIX_MONITOR_FILE_DROPS             "pmix.monitor.fdrop"    // (uint32_t) number of file checks that can be missed before
0996                                                                     //            generating the event
0997 
0998 /* security attributes */
0999 #define PMIX_CRED_TYPE                      "pmix.sec.ctype"        // (char*) when passed in PMIx_Get_credential, a prioritized,
1000                                                                     // comma-delimited list of desired credential types for use
1001                                                                     // in environments where multiple authentication mechanisms
1002                                                                     // may be available. When returned in a callback function, a
1003                                                                     // string identifier of the credential type
1004 #define PMIX_CRYPTO_KEY                     "pmix.sec.key"          // (pmix_byte_object_t) blob containing crypto key
1005 
1006 
1007 /* IO Forwarding Attributes */
1008 #define PMIX_IOF_CACHE_SIZE                 "pmix.iof.csize"        // (uint32_t) requested size of the server cache in bytes for each specified channel.
1009                                                                     //            By default, the server is allowed (but not required) to drop
1010                                                                     //            all bytes received beyond the max size
1011 #define PMIX_IOF_DROP_OLDEST                "pmix.iof.old"          // (bool) in an overflow situation, drop the oldest bytes to make room in the cache
1012 #define PMIX_IOF_DROP_NEWEST                "pmix.iof.new"          // (bool) in an overflow situation, drop any new bytes received until room becomes
1013                                                                     //        available in the cache (default)
1014 #define PMIX_IOF_BUFFERING_SIZE             "pmix.iof.bsize"        // (uint32_t) basically controls grouping of IO on the specified channel(s) to
1015                                                                     //            avoid being called every time a bit of IO arrives. The library
1016                                                                     //            will execute the callback whenever the specified number of bytes
1017                                                                     //            becomes available. Any remaining buffered data will be "flushed"
1018                                                                     //            upon call to deregister the respective channel
1019 #define PMIX_IOF_BUFFERING_TIME             "pmix.iof.btime"        // (uint32_t) max time in seconds to buffer IO before delivering it. Used in conjunction
1020                                                                     //            with buffering size, this prevents IO from being held indefinitely
1021                                                                     //            while waiting for another payload to arrive
1022 #define PMIX_IOF_COMPLETE                   "pmix.iof.cmp"          // (bool) indicates whether or not the specified IO channel has been closed
1023                                                                     //        by the source
1024 #define PMIX_IOF_PUSH_STDIN                 "pmix.iof.stdin"        // (bool) Used by a tool to request that the PMIx library collect
1025                                                                     //        the tool's stdin and forward it to the procs specified in
1026                                                                     //        the PMIx_IOF_push call
1027 #define PMIX_IOF_TAG_OUTPUT                 "pmix.iof.tag"          // (bool) Tag output with the [local jobid,rank] and channel it comes from
1028 #define PMIX_IOF_TAG_DETAILED_OUTPUT        "pmix.iof.tagdet"       // (bool) Tag output with the [local jobid,rank][hostname:pid] and channel it comes from
1029 #define PMIX_IOF_TAG_FULLNAME_OUTPUT        "pmix.iof.tagfull"      // (bool) Tag output with the [nspace,rank] and channel it comes from
1030 #define PMIX_IOF_RANK_OUTPUT                "pmix.iof.rank"         // (bool) Tag output with the rank it came from
1031 #define PMIX_IOF_TIMESTAMP_OUTPUT           "pmix.iof.ts"           // (bool) Timestamp output
1032 #define PMIX_IOF_MERGE_STDERR_STDOUT        "pmix.iof.mrg"          // (bool) merge stdout and stderr streams from application procs
1033 #define PMIX_IOF_XML_OUTPUT                 "pmix.iof.xml"          // (bool) Format output in XML
1034 #define PMIX_IOF_OUTPUT_TO_FILE             "pmix.iof.file"         // (char*) direct application output into files of form
1035                                                                     //         "<filename>.rank" with both stdout and stderr redirected into it
1036 #define PMIX_IOF_FILE_PATTERN               "pmix.iof.fpt"          // (bool) Specified output file is to be treated as a pattern and not
1037                                                                     //        automatically annotated by nspace, rank, or other parameters
1038 #define PMIX_IOF_OUTPUT_TO_DIRECTORY        "pmix.iof.dir"          // (char*) direct application output into files of form
1039                                                                     //         "<directory>/<jobid>/rank.<rank>/stdout[err]"
1040 #define PMIX_IOF_FILE_ONLY                  "pmix.iof.fonly"        // (bool) output only into designated files - do not also output
1041                                                                     //        a copy to stdout/stderr
1042 #define PMIX_IOF_COPY                       "pmix.iof.cpy"          // (bool) Requests that the host environment deliver a copy of the
1043                                                                     //        specified output stream(s) to the tool, letting the stream(s)
1044                                                                     //        continue to also be delivered to the default location. This
1045                                                                     //        allows the tool to tap into the output stream(s) without
1046                                                                     //        redirecting it from its current final destination.
1047 #define PMIX_IOF_REDIRECT                   "pmix.iof.redir"        // (bool) Requests that the host environment intercept the specified
1048                                                                     //        output stream(s) and deliver it to the requesting tool instead
1049                                                                     //        of its current final destination. This might be used, for
1050                                                                     //        example, during a debugging procedure to avoid injection of
1051                                                                     //        debugger-related output into the application's results file.
1052                                                                     //        The original output stream(s) destination is restored upon
1053                                                                     //        termination of the tool.
1054 #define PMIX_IOF_LOCAL_OUTPUT               "pmix.iof.local"        // (bool) Write output streams to local stdout/err
1055 #define PMIX_IOF_OUTPUT_RAW                 "pmix.iof.raw"          // (bool) Do not buffer output to be written as complete lines - output
1056                                                                     //        characters as the stream delivers them
1057 
1058 /* Attributes for controlling contents of application setup data */
1059 #define PMIX_SETUP_APP_ENVARS               "pmix.setup.env"        // (bool) harvest and include relevant envars
1060 #define PMIX_SETUP_APP_NONENVARS            "pmix.setup.nenv"       // (bool) include all non-envar data
1061 #define PMIX_SETUP_APP_ALL                  "pmix.setup.all"        // (bool) include all relevant data
1062 
1063 /* Attributes supporting the PMIx Groups APIs */
1064 #define PMIX_GROUP_ID                       "pmix.grp.id"           // (char*) user-provided group identifier
1065 #define PMIX_GROUP_LEADER                   "pmix.grp.ldr"          // (bool) this process is the leader of the group
1066 #define PMIX_GROUP_OPTIONAL                 "pmix.grp.opt"          // (bool) participation is optional - do not return an error if any of the
1067                                                                     //        specified processes terminate without having joined. The default
1068                                                                     //        is false
1069 #define PMIX_GROUP_NOTIFY_TERMINATION       "pmix.grp.notterm"      // (bool) notify remaining members when another member terminates without first
1070                                                                     //        leaving the group. The default is false
1071 #define PMIX_GROUP_FT_COLLECTIVE            "pmix.grp.ftcoll"       // (bool) adjust internal tracking for terminated processes. Default is false
1072 #define PMIX_GROUP_MEMBERSHIP               "pmix.grp.mbrs"         // (pmix_data_array_t*) array of group member ID's
1073 #define PMIX_GROUP_ASSIGN_CONTEXT_ID        "pmix.grp.actxid"       // (bool) request that the RM assign a unique numerical (size_t) ID to this group
1074 #define PMIX_GROUP_CONTEXT_ID               "pmix.grp.ctxid"        // (size_t) context ID assigned to group
1075 #define PMIX_GROUP_LOCAL_ONLY               "pmix.grp.lcl"          // (bool) group operation only involves local procs
1076 #define PMIX_GROUP_ENDPT_DATA               "pmix.grp.endpt"        // (pmix_byte_object_t) data collected to be shared during construction
1077 #define PMIX_GROUP_NAMES                    "pmix.pgrp.nm"          // (pmix_data_array_t*) Returns an array of string names of the process groups
1078                                                                     //        in which the given process is a member.
1079 #define PMIX_GROUP_INFO                     "pmix.grp.info"         // (pmix_data_array_t*) Array of pmix_info_t containing data that is to be
1080                                                                     //        shared across all members of a group during group construction
1081 #define PMIX_GROUP_LOCAL_CID                "pmix.grp.lclid"        // (size_t) local context ID for the specified process member of a group
1082 #define PMIX_GROUP_ADD_MEMBERS              "pmix.grp.add"          // (pmix_data_array_t*) Array of pmix_proc_t identifying procs that are not
1083                                                                     //        included in the membership specified in the procs array passed to
1084                                                                     //        the PMIx_Group_construct[_nb] call, but are to be included in the
1085                                                                     //        final group. The identified procs will be sent an invitation to
1086                                                                     //        join the group during the construction procedure. This is used when
1087                                                                     //        some members of the proposed group do not know the full membership
1088                                                                     //        and therefore cannot include all members in the call to construct.
1089 
1090 /* Storage-Related Attributes */
1091 #define PMIX_QUERY_STORAGE_LIST             "pmix.strg.list"       // (char*) return comma-delimited list of identifiers for all available storage systems
1092 #define PMIX_STORAGE_CAPACITY_LIMIT         "pmix.strg.cap"        // (uint64_t) return overall capacity (in Megabytes[base2]) of specified storage system
1093 #define PMIX_STORAGE_OBJECT_LIMIT           "pmix.strg.obj"        // (uint64_t) return overall limit on number of objects (e.g., inodes) of specified storage system
1094 
1095 #define PMIX_STORAGE_ID                     "pmix.strg.id"         // (char*) identifier of the storage system being referenced
1096 #define PMIX_STORAGE_PATH                   "pmix.strg.path"       // (char*) Mount point corresponding to a specified storage ID
1097 #define PMIX_STORAGE_TYPE                   "pmix.strg.type"       // (char*) Qualifier indicating the type of storage being referenced by a query
1098                                                                    //         (e.g., lustre, gpfs, online, fabric-attached, ...)
1099 #define PMIX_STORAGE_ACCESSIBILITY          "pmix.strg.access"     // (pmix_storage_accessibility_t) Accessibility level of the storage system
1100                                                                    //         (e.g., within same node, within same session)
1101 #define PMIX_STORAGE_ACCESS_TYPE            "pmix.strg.atype"      // (pmix_storage_access_type_t) Qualifier describing the type of storage access to return
1102                                                                    //       information for (e.g., for qualifying PMIX_STORAGE_BW_CUR, PMIX_STORAGE_IOPS_CUR,
1103                                                                    //       or PMIX_STORAGE_SUGGESTED_XFER_SIZE attributes)
1104 #define PMIX_STORAGE_BW_CUR                 "pmix.strg.bwcur"      // (double) Observed bandwidth (in bytes/sec) for storage system - provided as a
1105                                                                    //       recently observed bandwidth value, with the exact measurement interval
1106                                                                    //       depending on the storage system and/or PMIx library implementation
1107 #define PMIX_STORAGE_BW_MAX                 "pmix.strg.bwmax"      // (double) Maximum bandwidth (in bytes/sec) for storage system - provided as the
1108                                                                    //       theoretical maximum or the maximum observed bandwidth value
1109 #define PMIX_STORAGE_CAPACITY_USED          "pmix.strg.capuse"     // (double) Overall used capacity (in bytes) for the storage system
1110 #define PMIX_STORAGE_IOPS_CUR               "pmix.strg.iopscur"    // (double) Observed IOPS (in I/O operations per second) for storage system - provided
1111                                                                    //       as a recently observed IOPS value, with the exact measurement interval depending
1112                                                                    //       on the storage system and/or PMIx library implementation
1113 #define PMIX_STORAGE_IOPS_MAX               "pmix.strg.iopsmax"    // (double) Maximum IOPS (in I/O operations per second) for storage system - provided
1114                                                                    //       as the theoretical maximum or the maximum observed IOPS value
1115 #define PMIX_STORAGE_MEDIUM                 "pmix.strg.medium"     // (pmix_storage_medium_t) Types of storage mediums utilized by the storage system
1116                                                                    //       (e.g., SSDs, HDDs, tape)
1117 #define PMIX_STORAGE_MINIMAL_XFER_SIZE      "pmix.strg.minxfer"    // (double) Minimal transfer size (in bytes) for the storage system - this is the
1118                                                                    //       storage system's atomic unit of transfer (e.g., block size)
1119 #define PMIX_STORAGE_OBJECTS_USED           "pmix.strg.objuse"     // (uint64_t) Overall used number of objects (e.g., inodes) for the storage system
1120 #define PMIX_STORAGE_PERSISTENCE            "pmix.strg.persist"    // (pmix_storage_persistence_t) Persistence level of the storage system
1121                                                                    //       (e.g., sratch storage or archive storage)
1122 #define PMIX_STORAGE_SUGGESTED_XFER_SIZE    "pmix.strg.sxfer"      // (double) Suggested transfer size (in bytes) for the storage system
1123 #define PMIX_STORAGE_VERSION                "pmix.strg.ver"        // (char*) Version string for the storage system
1124 
1125 
1126 /* Fabric-related Attributes */
1127 #define PMIX_FABRIC_COST_MATRIX             "pmix.fab.cm"          // (pointer) Pointer to a two-dimensional array of point-to-point relative
1128                                                                    //           communication costs expressed as uint16_t values
1129 #define PMIX_FABRIC_GROUPS                  "pmix.fab.grps"        // (char*) A string delineating the group membership of nodes in the system,
1130                                                                    //         where each fabric group consists of the group number followed by
1131                                                                    //         a colon and a comma-delimited list of nodes in that group, with the
1132                                                                    //         groups delimited by semi-colons (e.g.,
1133                                                                    //         0:node000,node002,node004,node006;1:node001,node003,node005,node007)
1134 #define PMIX_FABRIC_VENDOR                  "pmix.fab.vndr"        // (char*) Name of fabric vendor (e.g., Amazon, Mellanox, HPE, Intel)
1135 #define PMIX_FABRIC_IDENTIFIER              "pmix.fab.id"          // (char*) An identifier for the fabric (e.g., MgmtEthernet, Slingshot-11,
1136                                                                    //         OmniPath-1)
1137 #define PMIX_FABRIC_INDEX                   "pmix.fab.idx"         // (size_t) The index of the fabric as returned in pmix_fabric_t
1138 #define PMIX_FABRIC_COORDINATES             "pmix.fab.coord"       // (pmix_data_array_t*) Array of pmix_geometry_t fabric coordinates for
1139                                                                    //          devices on the specified node. The array will contain the
1140                                                                    //          coordinates of all devices on the node, including values for
1141                                                                    //          all supported coordinate views. The information for devices
1142                                                                    //          on the local node shall be provided if the node is not
1143                                                                    //          specified in the request.
1144 #define PMIX_FABRIC_DEVICE_VENDORID         "pmix.fabdev.vendid"   // (char*) This is a vendor-provided identifier for the device or product.
1145 #define PMIX_FABRIC_NUM_DEVICES             "pmix.fab.nverts"      // (size_t) Total number of fabric devices in the system - corresponds to
1146                                                                    //          the number of rows or columns in the cost matrix
1147 #define PMIX_FABRIC_DIMS                    "pmix.fab.dims"        // (uint32_t) Number of dimensions in the specified fabric plane/view. If no
1148                                                                    //          plane is specified in a request, then the dimensions of all planes
1149                                                                    //          in the overall system will be returned as a pmix_data_array_t
1150                                                                    //          containing an array of uint32_t values. Default is to
1151                                                                    //          provide dimensions in logical view.
1152 
1153 #define PMIX_FABRIC_PLANE                   "pmix.fab.plane"       // (char*) ID string of a fabric plane (e.g., CIDR for Ethernet). When used as
1154                                                                    //          a modifier in a request for information, specifies the plane whose
1155                                                                    //          information is to be returned. When used directly as a key in a
1156                                                                    //          request, returns a pmix_data_array_t of string
1157                                                                    //          identifiers for all fabric planes in the overall system.
1158 
1159 #define PMIX_FABRIC_SWITCH                  "pmix.fab.switch"      // (char*) ID string of a fabric switch. When used as a modifier in a request
1160                                                                    //         for information, specifies the switch whose information is to be
1161                                                                    //         returned. When used directly as a key in a request, returns a
1162                                                                    //         pmix_data_array_t of string identifiers for all fabric switches in
1163                                                                    //         the overall system.
1164 
1165 #define PMIX_FABRIC_ENDPT                   "pmix.fab.endpt"       // (pmix_data_array_t*) Fabric endpoints for a specified process. As multiple
1166                                                                    //         endpoints may be assigned to a given process (e.g., in the case
1167                                                                    //         where multiple devices are associated with a package to which the
1168                                                                    //         process is bound), the returned values will be provided in a
1169                                                                    //         pmix_data_array_t of pmix_endpoint_t elements.
1170 
1171 #define PMIX_FABRIC_SHAPE                   "pmix.fab.shape"       // (pmix_data_array_t*) The size of each dimension in the specified fabric
1172                                                                    //         plane/view, returned in a pmix_data_array_t containing an array of
1173                                                                    //         uint32_t values. The size is defined as the number of elements
1174                                                                    //         present in that dimension - e.g., the number of devices in one
1175                                                                    //         dimension of a physical view of a fabric plane. If no plane is
1176                                                                    //         specified, then the shape of each plane in the overall system will
1177                                                                    //         be returned in a pmix_data_array_t array where each element is
1178                                                                    //         itself a two-element array containing the PMIX_FABRIC_PLANE
1179                                                                    //         followed by that plane's fabric shape. Default is to provide the
1180                                                                    //         shape in logical view.
1181 
1182 #define PMIX_FABRIC_SHAPE_STRING            "pmix.fab.shapestr"    // (char*) Network shape expressed as a string (e.g., "10x12x2"). If no plane
1183                                                                    //         is specified, then the shape of each plane in the overall system
1184                                                                    //         will be returned in a pmix_data_array_t array where
1185                                                                    //         each element is itself a two-element array containing the
1186                                                                    //         PMIX_FABRIC_PLANE followed by that plane's fabric shape string.
1187                                                                    //         Default is to provide the shape in logical view.
1188 
1189 #define PMIX_SWITCH_PEERS                   "pmix.speers"          // (char*) Peer ranks that share the same switch as the process specified in
1190                                                                    //         the call to PMIx_Get. Returns a pmix_data_array_t array of
1191                                                                    //         pmix_info_t results, each element containing the PMIX_SWITCH_PEERS
1192                                                                    //         key with a three-element pmix_data_array_t array of pmix_info_t
1193                                                                    //         containing the PMIX_FABRIC_DEVICE_ID of the local fabric device,
1194                                                                    //         the PMIX_FABRIC_SWITCH identifying the switch to which it is
1195                                                                    //         connected, and a comma-delimited string of peer ranks sharing the
1196                                                                    //         switch to which that device is connected.
1197 #define PMIX_FABRIC_DEVICE                  "pmix.fabdev"          // (pmix_data_array_t*) An array of pmix_info_t describing a particular
1198                                                                    //         fabric device. The first element in the array shall be the
1199                                                                    //         PMIX_FABRIC_DEVICE_ID of the device
1200 #define PMIX_FABRIC_DEVICES                 "pmix.fab.devs"        // (pmix_data_array_t*) Array of pmix_info_t containing information for all
1201                                                                    //         devices on the specified node. Each element of the array will contain
1202                                                                    //         a PMIX_FABRIC_DEVICE entry, which in turn will contain an array of
1203                                                                    //         information on a given device.
1204 #define PMIX_FABRIC_DEVICE_NAME             "pmix.fabdev.nm"       // (char*) The operating system name associated with the device. This may be
1205                                                                    //         a logical fabric interface name (e.g. eth0 or eno1) or an absolute
1206                                                                    //         filename.
1207 #define PMIX_FABRIC_DEVICE_INDEX            "pmix.fabdev.idx"      // (uint32_t) Index of the device within an associated communication cost
1208                                                                    //         matrix.
1209 
1210 #define PMIX_FABRIC_DEVICE_VENDOR           "pmix.fabdev.vndr"     // (char*) Indicates the name of the vendor that distributes the NIC.
1211 #define PMIX_FABRIC_DEVICE_BUS_TYPE         "pmix.fabdev.btyp"     // (char*) The type of bus to which the device is attached (e.g., "PCI",
1212                                                                    //         "GEN-Z").
1213 #define PMIX_FABRIC_DEVICE_DRIVER           "pmix.fabdev.driver"   // (char*) The name of the driver associated with the device
1214 #define PMIX_FABRIC_DEVICE_FIRMWARE         "pmix.fabdev.fmwr"     // (char*) The device's firmware version
1215 #define PMIX_FABRIC_DEVICE_ADDRESS          "pmix.fabdev.addr"     // (char*) The primary link-level address associated with the device, such as a
1216                                                                    //         MAC address. If multiple addresses are available, only one will be
1217                                                                    //         reported.
1218 #define PMIX_FABRIC_DEVICE_COORDINATES      "pmix.fab.coord"       // (pmix_geometry_t) The pmix_geometry_t fabric coordinates for the device, including
1219                                                                    //          values for all supported coordinate views.
1220 #define PMIX_FABRIC_DEVICE_MTU              "pmix.fabdev.mtu"      // (size_t) The maximum transfer unit of link level frames or packets,
1221                                                                    //          in bytes.
1222 #define PMIX_FABRIC_DEVICE_SPEED            "pmix.fabdev.speed"    // (size_t) The active link data rate, given in bits per second.
1223 #define PMIX_FABRIC_DEVICE_STATE            "pmix.fabdev.state"    // (pmix_link_state_t) The last available physical port state. Possible values
1224                                                                    //          are PMIX_LINK_STATE_UNKNOWN, PMIX_LINK_DOWN, and PMIX_LINK_UP, to
1225                                                                    //          indicate if the port state is unknown or not applicable (unknown),
1226                                                                    //          inactive (down), or active (up).
1227 #define PMIX_FABRIC_DEVICE_TYPE             "pmix.fabdev.type"     // (char*) Specifies the type of fabric interface currently active on the
1228                                                                    //         device, such as Ethernet or InfiniBand.
1229 #define PMIX_FABRIC_DEVICE_PCI_DEVID        "pmix.fabdev.pcidevid" // (char*) A node-level unique identifier for a PCI device. Provided only if the
1230                                                                    //         device is located on a \ac{PCI} bus. The identifier is constructed as
1231                                                                    //         a four-part tuple delimited by colons comprised of the \ac{PCI} 16-bit
1232                                                                    //         domain, 8-bit bus, 8-bit device, and 8-bit function IDs, each expressed
1233                                                                    //         in zero-extended hexadecimal form. Thus, an example identifier might be
1234                                                                    //         "abc1:0f:23:01". The combination of node identifier PMIX_HOSTNAME or
1235                                                                    //         PMIX_NODEID and PMIX_FABRIC_DEVICE_PCI_DEVID shall be unique within the
1236                                                                    //         system.
1237 
1238 
1239 /* Distance Attributes */
1240 #define PMIX_DEVICE_DISTANCES               "pmix.dev.dist"        // (pmix_data_array_t*) Return an array of pmix_device_distance_t containing the
1241                                                                    //         minimum and maximum distances of the given process location to all
1242                                                                    //         devices of the specified type on the local node.
1243 #define PMIX_DEVICE_TYPE                    "pmix.dev.type"        // (pmix_device_type_t) Bitmask specifying the type(s) of device(s) whose
1244                                                                    //         information is being requested. Only used as a directive/qualifier.
1245 #define PMIX_DEVICE_ID                      "pmix.dev.id"          // (char*) System-wide UUID or node-local OS name of a particular device.
1246 
1247 
1248 /* Descriptive Attributes */
1249 #define PMIX_MAX_VALUE                      "pmix.descr.maxval"    // (varies) Used in pmix_regattr_t to describe the maximum valid value
1250                                                                    //          for the associated attribute.
1251 #define PMIX_MIN_VALUE                      "pmix.descr.minval"    // (varies) Used in pmix_regattr_t to describe the minimum valid value
1252                                                                    //          for the associated attribute.
1253 #define PMIX_ENUM_VALUE                     "pmix.descr.enum"      // (char*) Used in pmix_regattr_t to describe accepted values for the
1254                                                                    //         associated attribute. Numerical values shall be presented in
1255                                                                    //         a form convertible to the attribute's declared data type.
1256                                                                    //         Named values (i.e., values defined by constant names via a
1257                                                                    //         typical C-language enum declaration) must be provided as
1258                                                                    //         their numerical equivalent.
1259 #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"
1260                                                                    //         This attribute can be used with PMIx_Query_info outside of the init/finalize region.
1261 #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"
1262                                                                    //         This attribute can be used with PMIx_Query_info outside of the init/finalize region.
1263 
1264 #define PMIX_VERSION_NUMERIC                "pmix.vers.num"        // (uint32_t) Numeric representation of the version of the PMIx library
1265                                                                    //            being used
1266 
1267 
1268 /****    PROCESS STATE DEFINITIONS    ****/
1269 typedef uint8_t pmix_proc_state_t;
1270 #define PMIX_PROC_STATE_UNDEF                    0  /* undefined process state */
1271 #define PMIX_PROC_STATE_PREPPED                  1  /* process is ready to be launched */
1272 #define PMIX_PROC_STATE_LAUNCH_UNDERWAY          2  /* launch process underway */
1273 #define PMIX_PROC_STATE_RESTART                  3  /* the proc is ready for restart */
1274 #define PMIX_PROC_STATE_TERMINATE                4  /* process is marked for termination */
1275 #define PMIX_PROC_STATE_RUNNING                  5  /* daemon has locally fork'd process */
1276 #define PMIX_PROC_STATE_CONNECTED                6  /* proc connected to PMIx server */
1277 /*
1278 * Define a "boundary" so users can easily and quickly determine
1279 * if a proc is still running or not - any value less than
1280 * this one means that the proc has not terminated
1281 */
1282 #define PMIX_PROC_STATE_UNTERMINATED            15
1283 
1284 #define PMIX_PROC_STATE_TERMINATED              20  /* process has terminated and is no longer running */
1285 /* Define a boundary so users can easily and quickly determine
1286 * if a proc abnormally terminated - leave a little room
1287 * for future expansion
1288 */
1289 #define PMIX_PROC_STATE_ERROR                   50
1290 /* Define specific error code values */
1291 #define PMIX_PROC_STATE_KILLED_BY_CMD           (PMIX_PROC_STATE_ERROR +  1)  /* process was killed by cmd */
1292 #define PMIX_PROC_STATE_ABORTED                 (PMIX_PROC_STATE_ERROR +  2)  /* process aborted */
1293 #define PMIX_PROC_STATE_FAILED_TO_START         (PMIX_PROC_STATE_ERROR +  3)  /* process failed to start */
1294 #define PMIX_PROC_STATE_ABORTED_BY_SIG          (PMIX_PROC_STATE_ERROR +  4)  /* process aborted by signal */
1295 #define PMIX_PROC_STATE_TERM_WO_SYNC            (PMIX_PROC_STATE_ERROR +  5)  /* process exit'd w/o calling PMIx_Finalize */
1296 #define PMIX_PROC_STATE_COMM_FAILED             (PMIX_PROC_STATE_ERROR +  6)  /* process communication has failed */
1297 #define PMIX_PROC_STATE_SENSOR_BOUND_EXCEEDED   (PMIX_PROC_STATE_ERROR +  7)  /* process exceeded a sensor limit */
1298 #define PMIX_PROC_STATE_CALLED_ABORT            (PMIX_PROC_STATE_ERROR +  8)  /* process called "PMIx_Abort" */
1299 #define PMIX_PROC_STATE_HEARTBEAT_FAILED        (PMIX_PROC_STATE_ERROR +  9)  /* process failed to send heartbeat w/in time limit */
1300 #define PMIX_PROC_STATE_MIGRATING               (PMIX_PROC_STATE_ERROR + 10)  /* process failed and is waiting for resources before restarting */
1301 #define PMIX_PROC_STATE_CANNOT_RESTART          (PMIX_PROC_STATE_ERROR + 11)  /* process failed and cannot be restarted */
1302 #define PMIX_PROC_STATE_TERM_NON_ZERO           (PMIX_PROC_STATE_ERROR + 12)  /* process exited with a non-zero status, indicating abnormal */
1303 #define PMIX_PROC_STATE_FAILED_TO_LAUNCH        (PMIX_PROC_STATE_ERROR + 13)  /* unable to launch process */
1304 
1305 
1306 /****    JOB STATE DEFINITIONS    ****/
1307 typedef uint8_t pmix_job_state_t;
1308 #define PMIX_JOB_STATE_UNDEF                     0  // undefined process state
1309 #define PMIX_JOB_STATE_AWAITING_ALLOC            1  // Job is waiting for resources to be allocated to it
1310 #define PMIX_JOB_STATE_LAUNCH_UNDERWAY           2  // job launch underway
1311 #define PMIX_JOB_STATE_RUNNING                   3  // all procs have been spawned
1312 #define PMIX_JOB_STATE_SUSPENDED                 4  // job has been suspended
1313 #define PMIX_JOB_STATE_CONNECTED                 5  // all procs have connected to their PMIx server
1314 
1315 /*
1316 * Define a "boundary" so users can easily and quickly determine
1317 * if a job is still running or not - any value less than
1318 * this one means that the job has not terminated
1319 */
1320 #define PMIX_JOB_STATE_UNTERMINATED             15
1321 
1322 #define PMIX_JOB_STATE_TERMINATED               20  // job has terminated and is no longer running - typically will
1323                                                     // be accompanied by the job exit status in response to a query
1324 
1325 /* Define a boundary so users can easily and quickly determine
1326 * if a job abnormally terminated - leave a little room
1327 * for future expansion
1328 */
1329 #define PMIX_JOB_STATE_TERMINATED_WITH_ERROR    50  // job has terminated and is no longer running - typically will
1330                                                     // be accompanied by a job-related error code in response to a query
1331 
1332 
1333 /****    PMIX ERROR CONSTANTS    ****/
1334 /* PMIx errors are always negative, with 0 reserved for success */
1335 typedef int pmix_status_t;
1336 
1337 /* v1.x error values - must be fixed in place for backward
1338  * compatibility. Note that some number of these have been
1339  * deprecated and may not be returned by v2.x and above
1340  * clients or servers. However, they must always be
1341  * at least defined to ensure older codes will compile */
1342 #define PMIX_SUCCESS                                 0
1343 #define PMIX_ERROR                                  -1          // general error
1344 /* fault tolerance */
1345 #define PMIX_ERR_PROC_RESTART                       -4
1346 #define PMIX_ERR_PROC_CHECKPOINT                    -5
1347 #define PMIX_ERR_PROC_MIGRATE                       -6
1348 #define PMIX_ERR_EXISTS                             -11
1349 /* communication failures */
1350 #define PMIX_ERR_INVALID_CRED                       -12
1351 #define PMIX_ERR_WOULD_BLOCK                        -15
1352 #define PMIX_ERR_UNKNOWN_DATA_TYPE                  -16
1353 #define PMIX_ERR_TYPE_MISMATCH                      -18
1354 #define PMIX_ERR_UNPACK_INADEQUATE_SPACE            -19
1355 #define PMIX_ERR_UNPACK_FAILURE                     -20
1356 #define PMIX_ERR_PACK_FAILURE                       -21
1357 #define PMIX_ERR_NO_PERMISSIONS                     -23
1358 #define PMIX_ERR_TIMEOUT                            -24
1359 #define PMIX_ERR_UNREACH                            -25
1360 #define PMIX_ERR_BAD_PARAM                          -27
1361 #define PMIX_ERR_RESOURCE_BUSY                      -28
1362 #define PMIX_ERR_OUT_OF_RESOURCE                    -29
1363 #define PMIX_ERR_INIT                               -31
1364 #define PMIX_ERR_NOMEM                              -32
1365 #define PMIX_ERR_NOT_FOUND                          -46
1366 #define PMIX_ERR_NOT_SUPPORTED                      -47
1367 #define PMIX_ERR_PARAM_VALUE_NOT_SUPPORTED          -59
1368 #define PMIX_ERR_COMM_FAILURE                       -49
1369 #define PMIX_ERR_UNPACK_READ_PAST_END_OF_BUFFER     -50
1370 #define PMIX_ERR_CONFLICTING_CLEANUP_DIRECTIVES     -51
1371 #define PMIX_ERR_PARTIAL_SUCCESS                    -52
1372 #define PMIX_ERR_DUPLICATE_KEY                      -53
1373 #define PMIX_ERR_EMPTY                              -60
1374 #define PMIX_ERR_LOST_CONNECTION                    -61
1375 #define PMIX_ERR_EXISTS_OUTSIDE_SCOPE               -62
1376 
1377 /* Process set */
1378 #define PMIX_PROCESS_SET_DEFINE                     -55
1379 #define PMIX_PROCESS_SET_DELETE                     -56
1380 
1381 /* Debugger ops */
1382 #define PMIX_DEBUGGER_RELEASE                       -3      // replaced deprecated PMIX_ERR_DEBUGGER_RELEASE
1383 #define PMIX_READY_FOR_DEBUG                        -58     // accompanied by PMIX_BREAKPOINT indicating where proc is waiting
1384 
1385 /* query errors */
1386 #define PMIX_QUERY_PARTIAL_SUCCESS                  -104
1387 
1388 /* job control */
1389 #define PMIX_JCTRL_CHECKPOINT                       -106    // monitored by client to trigger checkpoint operation
1390 #define PMIX_JCTRL_CHECKPOINT_COMPLETE              -107    // sent by client and monitored by server to notify that requested
1391                                                             //     checkpoint operation has completed
1392 #define PMIX_JCTRL_PREEMPT_ALERT                    -108    // monitored by client to detect RM intends to preempt
1393 
1394 /* monitoring */
1395 #define PMIX_MONITOR_HEARTBEAT_ALERT                -109
1396 #define PMIX_MONITOR_FILE_ALERT                     -110
1397 #define PMIX_PROC_TERMINATED                        -111
1398 
1399 /* operational */
1400 #define PMIX_ERR_EVENT_REGISTRATION                 -144
1401 #define PMIX_MODEL_DECLARED                         -147
1402 #define PMIX_MODEL_RESOURCES                        -151     // model resource usage has changed
1403 #define PMIX_OPENMP_PARALLEL_ENTERED                -152     // an OpenMP parallel region has been entered
1404 #define PMIX_OPENMP_PARALLEL_EXITED                 -153     // an OpenMP parallel region has completed
1405 #define PMIX_LAUNCHER_READY                         -155
1406 #define PMIX_OPERATION_IN_PROGRESS                  -156
1407 #define PMIX_OPERATION_SUCCEEDED                    -157
1408 #define PMIX_ERR_INVALID_OPERATION                  -158
1409 #define PMIX_GROUP_INVITED                          -159
1410 #define PMIX_GROUP_LEFT                             -160
1411 #define PMIX_GROUP_INVITE_ACCEPTED                  -161
1412 #define PMIX_GROUP_INVITE_DECLINED                  -162
1413 #define PMIX_GROUP_INVITE_FAILED                    -163
1414 #define PMIX_GROUP_MEMBERSHIP_UPDATE                -164
1415 #define PMIX_GROUP_CONSTRUCT_ABORT                  -165
1416 #define PMIX_GROUP_CONSTRUCT_COMPLETE               -166
1417 #define PMIX_GROUP_LEADER_SELECTED                  -167
1418 #define PMIX_GROUP_LEADER_FAILED                    -168
1419 #define PMIX_GROUP_CONTEXT_ID_ASSIGNED              -169
1420 #define PMIX_GROUP_MEMBER_FAILED                    -170
1421 #define PMIX_ERR_REPEAT_ATTR_REGISTRATION           -171
1422 #define PMIX_ERR_IOF_FAILURE                        -172
1423 #define PMIX_ERR_IOF_COMPLETE                       -173
1424 #define PMIX_LAUNCH_COMPLETE                        -174     // include nspace of the launched job with notification
1425 #define PMIX_FABRIC_UPDATED                         -175
1426 #define PMIX_FABRIC_UPDATE_PENDING                  -176
1427 #define PMIX_FABRIC_UPDATE_ENDPOINTS                -113
1428 
1429 /* job-related errors */
1430 #define PMIX_ERR_JOB_APP_NOT_EXECUTABLE             -177
1431 #define PMIX_ERR_JOB_NO_EXE_SPECIFIED               -178
1432 #define PMIX_ERR_JOB_FAILED_TO_MAP                  -179
1433 #define PMIX_ERR_JOB_CANCELED                       -180
1434 #define PMIX_ERR_JOB_FAILED_TO_LAUNCH               -181
1435 #define PMIX_ERR_JOB_ABORTED                        -182
1436 #define PMIX_ERR_JOB_KILLED_BY_CMD                  -183
1437 #define PMIX_ERR_JOB_ABORTED_BY_SIG                 -184
1438 #define PMIX_ERR_JOB_TERM_WO_SYNC                   -185
1439 #define PMIX_ERR_JOB_SENSOR_BOUND_EXCEEDED          -186
1440 #define PMIX_ERR_JOB_NON_ZERO_TERM                  -187
1441 #define PMIX_ERR_JOB_ALLOC_FAILED                   -188
1442 #define PMIX_ERR_JOB_ABORTED_BY_SYS_EVENT           -189
1443 #define PMIX_ERR_JOB_EXE_NOT_FOUND                  -190
1444 #define PMIX_ERR_JOB_WDIR_NOT_FOUND                 -233
1445 #define PMIX_ERR_JOB_INSUFFICIENT_RESOURCES         -234
1446 #define PMIX_ERR_JOB_SYS_OP_FAILED                  -235
1447 
1448 /* job/session-related non-error events */
1449 #define PMIX_EVENT_JOB_START                        -191
1450 #define PMIX_EVENT_JOB_END                          -145
1451 #define PMIX_EVENT_SESSION_START                    -192
1452 #define PMIX_EVENT_SESSION_END                      -193
1453 
1454 /* process-related events */
1455 #define PMIX_ERR_PROC_REQUESTED_ABORT               -8
1456 #define PMIX_ERR_PROC_TERM_WO_SYNC                  -200
1457 #define PMIX_EVENT_PROC_TERMINATED                  -201
1458 #define PMIX_ERR_PROC_KILLED_BY_CMD                 -400
1459 #define PMIX_ERR_PROC_FAILED_TO_START               -401
1460 #define PMIX_ERR_PROC_ABORTED_BY_SIG                -402
1461 #define PMIX_ERR_PROC_SENSOR_BOUND_EXCEEDED         -403
1462 #define PMIX_ERR_EXIT_NONZERO_TERM                  -404
1463 
1464 /* system failures */
1465 #define PMIX_EVENT_SYS_BASE                         -230
1466 #define PMIX_EVENT_NODE_DOWN                        -231
1467 #define PMIX_EVENT_NODE_OFFLINE                     -232
1468 #define PMIX_EVENT_SYS_OTHER                        -330
1469 
1470 
1471 /* define a macro for identifying system event values */
1472 #define PMIX_SYSTEM_EVENT(a)   \
1473     ((a) <= PMIX_EVENT_SYS_BASE && PMIX_EVENT_SYS_OTHER <= (a))
1474 
1475 /* used by event handlers */
1476 #define PMIX_EVENT_NO_ACTION_TAKEN                  -331
1477 #define PMIX_EVENT_PARTIAL_ACTION_TAKEN             -332
1478 #define PMIX_EVENT_ACTION_DEFERRED                  -333
1479 #define PMIX_EVENT_ACTION_COMPLETE                  -334
1480 
1481 /* define a starting point for user-level defined error
1482  * constants - negative values larger than this are guaranteed
1483  * not to conflict with PMIx values. Definitions should always
1484  * be based on the PMIX_EXTERNAL_ERR_BASE constant and -not- a
1485  * specific value as the value of the constant may change */
1486 #define PMIX_EXTERNAL_ERR_BASE                      -3000
1487 
1488 /* define the results values for comparisons */
1489 typedef enum {
1490     PMIX_EQUAL,
1491     PMIX_VALUE1_GREATER,
1492     PMIX_VALUE2_GREATER,
1493     PMIX_VALUE_TYPE_DIFFERENT,
1494     PMIX_VALUE_INCOMPATIBLE_OBJECTS,
1495     PMIX_VALUE_COMPARISON_NOT_AVAIL
1496 } pmix_value_cmp_t;
1497 
1498 /****    PMIX DATA TYPES    ****/
1499 typedef uint16_t pmix_data_type_t;
1500 #define PMIX_UNDEF                       0
1501 #define PMIX_BOOL                        1  // converted to/from native true/false to uint8 for pack/unpack
1502 #define PMIX_BYTE                        2  // a byte of data
1503 #define PMIX_STRING                      3  // NULL-terminated string
1504 #define PMIX_SIZE                        4  // size_t
1505 #define PMIX_PID                         5  // OS-pid
1506 #define PMIX_INT                         6
1507 #define PMIX_INT8                        7
1508 #define PMIX_INT16                       8
1509 #define PMIX_INT32                       9
1510 #define PMIX_INT64                      10
1511 #define PMIX_UINT                       11
1512 #define PMIX_UINT8                      12
1513 #define PMIX_UINT16                     13
1514 #define PMIX_UINT32                     14
1515 #define PMIX_UINT64                     15
1516 #define PMIX_FLOAT                      16
1517 #define PMIX_DOUBLE                     17
1518 #define PMIX_TIMEVAL                    18
1519 #define PMIX_TIME                       19
1520 #define PMIX_STATUS                     20  // needs to be tracked separately from integer for those times
1521                                             // when we are embedded and it needs to be converted to the
1522                                             // host error definitions
1523 #define PMIX_VALUE                      21
1524 #define PMIX_PROC                       22
1525 #define PMIX_APP                        23
1526 #define PMIX_INFO                       24
1527 #define PMIX_PDATA                      25
1528 // Hole left by deprecation/removal of PMIX_BUFFER
1529 #define PMIX_BYTE_OBJECT                27
1530 #define PMIX_KVAL                       28
1531 // Hole left by deprecation/removal of PMIX_MODEX
1532 #define PMIX_PERSIST                    30
1533 #define PMIX_POINTER                    31
1534 #define PMIX_SCOPE                      32
1535 #define PMIX_DATA_RANGE                 33
1536 #define PMIX_COMMAND                    34
1537 #define PMIX_INFO_DIRECTIVES            35
1538 #define PMIX_DATA_TYPE                  36
1539 #define PMIX_PROC_STATE                 37
1540 #define PMIX_PROC_INFO                  38
1541 #define PMIX_DATA_ARRAY                 39
1542 #define PMIX_PROC_RANK                  40
1543 #define PMIX_QUERY                      41
1544 #define PMIX_COMPRESSED_STRING          42  // string compressed with zlib
1545 #define PMIX_ALLOC_DIRECTIVE            43
1546 // Hole left by deprecation/removal of PMIX_INFO_ARRAY
1547 #define PMIX_IOF_CHANNEL                45
1548 #define PMIX_ENVAR                      46
1549 #define PMIX_COORD                      47
1550 #define PMIX_REGATTR                    48
1551 #define PMIX_REGEX                      49
1552 #define PMIX_JOB_STATE                  50
1553 #define PMIX_LINK_STATE                 51
1554 #define PMIX_PROC_CPUSET                52
1555 #define PMIX_GEOMETRY                   53
1556 #define PMIX_DEVICE_DIST                54
1557 #define PMIX_ENDPOINT                   55
1558 #define PMIX_TOPO                       56
1559 #define PMIX_DEVTYPE                    57
1560 #define PMIX_LOCTYPE                    58
1561 #define PMIX_COMPRESSED_BYTE_OBJECT     59
1562 #define PMIX_PROC_NSPACE                60
1563 #define PMIX_PROC_STATS                 61
1564 #define PMIX_DISK_STATS                 62
1565 #define PMIX_NET_STATS                  63
1566 #define PMIX_NODE_STATS                 64
1567 #define PMIX_DATA_BUFFER                65
1568 #define PMIX_STOR_MEDIUM                66
1569 #define PMIX_STOR_ACCESS                67
1570 #define PMIX_STOR_PERSIST               68
1571 #define PMIX_STOR_ACCESS_TYPE           69
1572 /********************/
1573 
1574 /* define a boundary for implementers so they can add their own data types */
1575 #define PMIX_DATA_TYPE_MAX     500
1576 
1577 
1578 /* define a scope for data "put" by PMIx per the following:
1579  *
1580  * PMI_LOCAL - the data is intended only for other application
1581  *             processes on the same node. Data marked in this way
1582  *             will not be included in data packages sent to remote requestors
1583  * PMI_REMOTE - the data is intended solely for applications processes on
1584  *              remote nodes. Data marked in this way will not be shared with
1585  *              other processes on the same node
1586  * PMI_GLOBAL - the data is to be shared with all other requesting processes,
1587  *              regardless of location
1588  */
1589 typedef uint8_t pmix_scope_t;
1590 #define PMIX_SCOPE_UNDEF    0
1591 #define PMIX_LOCAL          1   // share to procs also on this node
1592 #define PMIX_REMOTE         2   // share with procs not on this node
1593 #define PMIX_GLOBAL         3   // share with all procs (local + remote)
1594 #define PMIX_INTERNAL       4   // store data in the internal tables
1595 
1596 /* define a range for data "published" by PMIx
1597  */
1598 typedef uint8_t pmix_data_range_t;
1599 #define PMIX_RANGE_UNDEF        0
1600 #define PMIX_RANGE_RM           1   // data is intended for the host resource manager
1601 #define PMIX_RANGE_LOCAL        2   // available on local node only
1602 #define PMIX_RANGE_NAMESPACE    3   // data is available to procs in the same nspace only
1603 #define PMIX_RANGE_SESSION      4   // data available to all procs in session
1604 #define PMIX_RANGE_GLOBAL       5   // data available to all procs
1605 #define PMIX_RANGE_CUSTOM       6   // range is specified in a pmix_info_t
1606 #define PMIX_RANGE_PROC_LOCAL   7   // restrict range to the local proc
1607 #define PMIX_RANGE_INVALID   UINT8_MAX
1608 
1609 /* define a "persistence" policy for data published by clients */
1610 typedef uint8_t pmix_persistence_t;
1611 #define PMIX_PERSIST_INDEF          0   // retain until specifically deleted
1612 #define PMIX_PERSIST_FIRST_READ     1   // delete upon first access
1613 #define PMIX_PERSIST_PROC           2   // retain until publishing process terminates
1614 #define PMIX_PERSIST_APP            3   // retain until application terminates
1615 #define PMIX_PERSIST_SESSION        4   // retain until session/allocation terminates
1616 #define PMIX_PERSIST_INVALID   UINT8_MAX
1617 
1618 /* define a set of bit-mask flags for specifying behavior of
1619  * command directives via pmix_info_t arrays */
1620 typedef uint32_t pmix_info_directives_t;
1621 #define PMIX_INFO_REQD              0x00000001
1622 #define PMIX_INFO_ARRAY_END         0x00000002      // mark the end of an array created by PMIX_INFO_CREATE
1623 #define PMIX_INFO_REQD_PROCESSED    0x00000004      // reqd attribute has been processed
1624 #define PMIX_INFO_QUALIFIER         0x00000008      // info is a qualifier to the primary value
1625 #define PMIX_INFO_PERSISTENT        0x00000010      // do not release included value
1626 /* the top 16-bits are reserved for internal use by
1627  * implementers - these may be changed inside the
1628  * PMIx library */
1629 #define PMIX_INFO_DIR_RESERVED 0xffff0000
1630 
1631 /* define a set of directives for allocation requests */
1632 typedef uint8_t pmix_alloc_directive_t;
1633 #define PMIX_ALLOC_NEW          1   // new allocation is being requested. The resulting allocation will be
1634                                     // disjoint (i.e., not connected in a job sense) from the requesting allocation
1635 #define PMIX_ALLOC_EXTEND       2   // extend the existing allocation, either in time or as additional resources
1636 #define PMIX_ALLOC_RELEASE      3   // release part or all of the existing allocation. Attributes in the accompanying
1637                                     // pmix\_info\_t array may be used to specify "lending" of those resources
1638                                     // for some period of time.
1639 #define PMIX_ALLOC_REAQUIRE     4   // reacquire resources that were previously "lent" back to the scheduler
1640 #define PMIX_ALLOC_REQ_CANCEL   5   // Cancel the indicated allocation request
1641 
1642 /* define a value boundary beyond which implementers are free
1643  * to define their own directive values */
1644 #define PMIX_ALLOC_EXTERNAL     128
1645 
1646 
1647 /* define a set of bit-mask flags for specifying IO
1648  * forwarding channels. These can be OR'd together
1649  * to reference multiple channels */
1650 typedef uint16_t pmix_iof_channel_t;
1651 #define PMIX_FWD_NO_CHANNELS        0x0000
1652 #define PMIX_FWD_STDIN_CHANNEL      0x0001
1653 #define PMIX_FWD_STDOUT_CHANNEL     0x0002
1654 #define PMIX_FWD_STDERR_CHANNEL     0x0004
1655 #define PMIX_FWD_STDDIAG_CHANNEL    0x0008
1656 #define PMIX_FWD_ALL_CHANNELS       0x00ff
1657 
1658 /* define values associated with PMIx_Group_join
1659  * to indicate accept and decline - this is
1660  * done for readability of user code */
1661 typedef enum {
1662     PMIX_GROUP_DECLINE,
1663     PMIX_GROUP_ACCEPT
1664 } pmix_group_opt_t;
1665 
1666 typedef enum {
1667     PMIX_GROUP_CONSTRUCT,
1668     PMIX_GROUP_DESTRUCT,
1669     PMIX_GROUP_NONE
1670 } pmix_group_operation_t;
1671 
1672 /* define storage medium values
1673  * The pmix_storage_medium_t is a uint64_t type that defines
1674  * a set of bit-mask flags for specifying different types of
1675  * storage mediums. These can be bitwise OR'd together to
1676  * accommodate storage systems that mix storage medium types. */
1677 typedef uint64_t pmix_storage_medium_t;
1678 #define PMIX_STORAGE_MEDIUM_UNKNOWN     0x0000000000000001
1679 #define PMIX_STORAGE_MEDIUM_TAPE        0x0000000000000002
1680 #define PMIX_STORAGE_MEDIUM_HDD         0x0000000000000004
1681 #define PMIX_STORAGE_MEDIUM_SSD         0x0000000000000008
1682 #define PMIX_STORAGE_MEDIUM_NVME        0x0000000000000010
1683 #define PMIX_STORAGE_MEDIUM_PMEM        0x0000000000000020
1684 #define PMIX_STORAGE_MEDIUM_RAM         0x0000000000000040
1685 
1686 /* define storage accessibility values
1687  * The pmix_storage_accessibility_t is a uint64_t type that
1688  * defines a set of bit-mask flags for specifying different
1689  * levels of storage accessibility (i.e,. from where a storage
1690  * system may be accessed). These can be bitwise OR'd together
1691  * to accommodate storage systems that are accessibile in
1692  * multiple ways. */
1693 typedef uint64_t pmix_storage_accessibility_t;
1694 #define PMIX_STORAGE_ACCESSIBILITY_NODE     0x0000000000000001
1695 #define PMIX_STORAGE_ACCESSIBILITY_SESSION  0x0000000000000002
1696 #define PMIX_STORAGE_ACCESSIBILITY_JOB      0x0000000000000004
1697 #define PMIX_STORAGE_ACCESSIBILITY_RACK     0x0000000000000008
1698 #define PMIX_STORAGE_ACCESSIBILITY_CLUSTER  0x0000000000000010
1699 #define PMIX_STORAGE_ACCESSIBILITY_REMOTE   0x0000000000000020
1700 
1701 /* define storage persistence values
1702  * The pmix_storage_persistence_t is a uint64_t type that defines
1703  * a set of bit-mask flags for specifying different levels of
1704  * persistence for a particular storage system. */
1705 typedef uint64_t pmix_storage_persistence_t;
1706 #define PMIX_STORAGE_PERSISTENCE_TEMPORARY  0x0000000000000001
1707 #define PMIX_STORAGE_PERSISTENCE_NODE       0x0000000000000002
1708 #define PMIX_STORAGE_PERSISTENCE_SESSION    0x0000000000000004
1709 #define PMIX_STORAGE_PERSISTENCE_JOB        0x0000000000000008
1710 #define PMIX_STORAGE_PERSISTENCE_SCRATCH    0x0000000000000010
1711 #define PMIX_STORAGE_PERSISTENCE_PROJECT    0x0000000000000020
1712 #define PMIX_STORAGE_PERSISTENCE_ARCHIVE    0x0000000000000040
1713 
1714 /* define storage access values
1715  * The pmix_storage_access_type_t is a uint16_t type that defines
1716  * a set of bit-mask flags for specifying different storage system
1717  * access types. */
1718 typedef uint16_t pmix_storage_access_type_t;
1719 #define PMIX_STORAGE_ACCESS_RD      0x0001
1720 #define PMIX_STORAGE_ACCESS_WR      0x0002
1721 #define PMIX_STORAGE_ACCESS_RDWR    0x0003
1722 
1723 
1724 /* define some "hooks" external libraries can use to
1725  * intercept memory allocation/release operations */
1726 static inline void* pmix_malloc(size_t n)
1727 {
1728     return malloc(n);
1729 }
1730 
1731 static inline void pmix_free(void *m)
1732 {
1733     free(m);
1734 }
1735 
1736 static inline void* pmix_calloc(size_t n, size_t m)
1737 {
1738     return calloc(n, m);
1739 }
1740 
1741 
1742 /**
1743  * Provide a safe version of strncpy that doesn't generate
1744  * a ton of spurious warnings. Note that not every environment
1745  * provides nice string functions, and we aren't concerned about
1746  * max performance here
1747  *
1748  * @param dest Destination string.
1749  * @param src Source string.
1750  * @param len Size of the dest array - 1
1751  *
1752  */
1753 static inline void pmix_strncpy(char *dest,
1754                                 const char *src,
1755                                 size_t len)
1756 {
1757     size_t i;
1758 
1759     /* use an algorithm that also protects against
1760      * non-NULL-terminated src strings */
1761     for (i=0; i < len; ++i, ++src, ++dest) {
1762         *dest = *src;
1763         if ('\0' == *src) {
1764             break;
1765         }
1766     }
1767     *dest = '\0';
1768 }
1769 
1770 static inline size_t pmix_keylen(const char *src)
1771 {
1772     size_t i, maxlen;
1773 
1774     if (NULL == src) {
1775         return 0;
1776     }
1777     maxlen = PMIX_MAX_KEYLEN + 1;
1778     /* use an algorithm that also protects against
1779      * non-NULL-terminated src strings */
1780     for (i=0; i < maxlen; ++i, ++src) {
1781         if ('\0' == *src) {
1782             break;
1783         }
1784     }
1785     return i;
1786 }
1787 
1788 static inline size_t pmix_nslen(const char *src)
1789 {
1790     size_t i, maxlen;
1791 
1792     if (NULL == src) {
1793         return 0;
1794     }
1795     maxlen = PMIX_MAX_NSLEN + 1;
1796     /* use an algorithm that also protects against
1797      * non-NULL-terminated src strings */
1798     for (i=0; i < maxlen; ++i, ++src) {
1799         if ('\0' == *src) {
1800             break;
1801         }
1802     }
1803     return i;
1804 }
1805 
1806 
1807 /****    PMIX COORD    ****/
1808 /* define coordinate system views */
1809 typedef uint8_t pmix_coord_view_t;
1810 #define PMIX_COORD_VIEW_UNDEF       0x00
1811 #define PMIX_COORD_LOGICAL_VIEW     0x01
1812 #define PMIX_COORD_PHYSICAL_VIEW    0x02
1813 
1814 /* define a structure for a proc's fabric coordinate */
1815 typedef struct pmix_coord {
1816     pmix_coord_view_t view;
1817     uint32_t *coord;
1818     size_t dims;
1819 } pmix_coord_t;
1820 
1821 #define PMIX_COORD_STATIC_INIT      \
1822 {                                   \
1823     .view = PMIX_COORD_VIEW_UNDEF,  \
1824     .coord = NULL,                  \
1825     .dims = 0                       \
1826 }
1827 
1828 
1829 /****    PMIX LINK STATES    ****/
1830 typedef uint8_t pmix_link_state_t;
1831 #define PMIX_LINK_STATE_UNKNOWN     0  // The port state is unknown or not applicable
1832 #define PMIX_LINK_DOWN              1  // The port is inactive.
1833 #define PMIX_LINK_UP                2  // The port is active.
1834 
1835 
1836 /****   PMIX CPUSET    ****/
1837 typedef struct{
1838     char *source;
1839     void *bitmap;
1840 } pmix_cpuset_t;
1841 
1842 #define PMIX_CPUSET_STATIC_INIT \
1843 {                               \
1844     .source = NULL,             \
1845     .bitmap = NULL              \
1846 }
1847 
1848 
1849 /****    PMIX BIND ENVELOPE    ****/
1850 typedef uint8_t pmix_bind_envelope_t;
1851 #define PMIX_CPUBIND_PROCESS    0
1852 #define PMIX_CPUBIND_THREAD     1
1853 
1854 
1855 /****    PMIX TOPOLOGY    ****/
1856 typedef struct {
1857     char *source;
1858     void *topology;
1859 } pmix_topology_t;
1860 
1861 #define PMIX_TOPOLOGY_STATIC_INIT   \
1862 {                                   \
1863     .source = NULL,                 \
1864     .topology = NULL                \
1865 }
1866 
1867 
1868 /**** PMIX RELATIVE LOCALITY    ****/
1869 typedef uint16_t pmix_locality_t;
1870 #define PMIX_LOCALITY_UNKNOWN           0x0000
1871 #define PMIX_LOCALITY_NONLOCAL          0x8000
1872 #define PMIX_LOCALITY_SHARE_HWTHREAD    0x0001
1873 #define PMIX_LOCALITY_SHARE_CORE        0x0002
1874 #define PMIX_LOCALITY_SHARE_L1CACHE     0x0004
1875 #define PMIX_LOCALITY_SHARE_L2CACHE     0x0008
1876 #define PMIX_LOCALITY_SHARE_L3CACHE     0x0010
1877 #define PMIX_LOCALITY_SHARE_PACKAGE     0x0020
1878 #define PMIX_LOCALITY_SHARE_NUMA        0x0040
1879 #define PMIX_LOCALITY_SHARE_NODE        0x4000
1880 
1881 
1882 /****    PMIX GEOMETRY     ****/
1883 typedef struct pmix_geometry {
1884     size_t fabric;
1885     char *uuid;
1886     char *osname;
1887     pmix_coord_t *coordinates;
1888     size_t ncoords;
1889 } pmix_geometry_t;
1890 
1891 #define PMIX_GEOMETRY_STATIC_INIT   \
1892 {                                   \
1893     .fabric = 0,                    \
1894     .uuid = NULL,                   \
1895     .osname = NULL,                 \
1896     .coordinates = NULL,            \
1897     .ncoords = 0                    \
1898 }
1899 
1900 
1901 /****    PMIX_DEVICE_TYPE    ****/
1902 typedef uint64_t pmix_device_type_t;
1903 #define PMIX_DEVTYPE_UNKNOWN        0x00
1904 #define PMIX_DEVTYPE_BLOCK          0x01
1905 #define PMIX_DEVTYPE_GPU            0x02
1906 #define PMIX_DEVTYPE_NETWORK        0x04
1907 #define PMIX_DEVTYPE_OPENFABRICS    0x08
1908 #define PMIX_DEVTYPE_DMA            0x10
1909 #define PMIX_DEVTYPE_COPROC         0x20
1910 
1911 /****    PMIX_DISTANCE     ****/
1912 typedef struct pmix_device_distance {
1913     char *uuid;
1914     char *osname;
1915     pmix_device_type_t type;
1916     uint16_t mindist;
1917     uint16_t maxdist;
1918 } pmix_device_distance_t;
1919 
1920 #define PMIX_DEVICE_DIST_STATIC_INIT    \
1921 {                                       \
1922     .uuid = NULL,                       \
1923     .osname = NULL,                     \
1924     .type = PMIX_DEVTYPE_UNKNOWN,       \
1925     .mindist = 0,                       \
1926     .maxdist = 0                        \
1927 }
1928 
1929 
1930 /****    PMIX BYTE OBJECT    ****/
1931 typedef struct pmix_byte_object {
1932     char *bytes;
1933     size_t size;
1934 } pmix_byte_object_t;
1935 
1936 #define PMIX_BYTE_OBJECT_STATIC_INIT    \
1937 {                                       \
1938     .bytes = NULL,                      \
1939     .size = 0                           \
1940 }
1941 
1942 
1943 /****    PMIX ENDPOINT    ****/
1944 typedef struct pmix_endpoint {
1945     char *uuid;
1946     char *osname;
1947     pmix_byte_object_t endpt;
1948 } pmix_endpoint_t;
1949 
1950 #define PMIX_ENDPOINT_STATIC_INIT           \
1951 {                                           \
1952     .uuid = NULL,                           \
1953     .osname = NULL,                         \
1954     .endpt = PMIX_BYTE_OBJECT_STATIC_INIT   \
1955 }
1956 
1957 
1958 /****    PMIX ENVAR STRUCT   ****/
1959 /* Provide a structure for specifying environment variable modifications
1960  * Standard environment variables (e.g., PATH, LD_LIBRARY_PATH, and LD_PRELOAD)
1961  * take multiple arguments separated by delimiters. Unfortunately, the delimiters
1962  * depend upon the variable itself - some use semi-colons, some colons, etc. Thus,
1963  * the operation requires not only the name of the variable to be modified and
1964  * the value to be inserted, but also the separator to be used when composing
1965  * the aggregate value
1966  */
1967 typedef struct {
1968     char *envar;
1969     char *value;
1970     char separator;
1971 } pmix_envar_t;
1972 
1973 #define PMIX_ENVAR_STATIC_INIT  \
1974 {                               \
1975     .envar = NULL,              \
1976     .value = NULL,              \
1977     .separator = '\0'           \
1978 }
1979 
1980 
1981 /****    PMIX DATA BUFFER    ****/
1982 typedef struct pmix_data_buffer {
1983     /** Start of my memory */
1984     char *base_ptr;
1985     /** Where the next data will be packed to (within the allocated
1986         memory starting at base_ptr) */
1987     char *pack_ptr;
1988     /** Where the next data will be unpacked from (within the
1989         allocated memory starting as base_ptr) */
1990     char *unpack_ptr;
1991     /** Number of bytes allocated (starting at base_ptr) */
1992     size_t bytes_allocated;
1993     /** Number of bytes used by the buffer (i.e., amount of data --
1994         including overhead -- packed in the buffer) */
1995     size_t bytes_used;
1996 } pmix_data_buffer_t;
1997 
1998 #define PMIX_DATA_BUFFER_STATIC_INIT    \
1999 {                                       \
2000     .base_ptr = NULL,                   \
2001     .pack_ptr = NULL,                   \
2002     .unpack_ptr = NULL,                 \
2003     .bytes_allocated = 0,               \
2004     .bytes_used = 0                     \
2005 }
2006 
2007 
2008 /****    PMIX PROC OBJECT    ****/
2009 typedef struct pmix_proc {
2010     pmix_nspace_t nspace;
2011     pmix_rank_t rank;
2012 } pmix_proc_t;
2013 
2014 #define PMIX_PROC_STATIC_INIT   \
2015 {                               \
2016     .nspace = {0},              \
2017     .rank = PMIX_RANK_UNDEF     \
2018 }
2019 
2020 
2021 /****    PMIX PROC INFO STRUCT    ****/
2022 typedef struct pmix_proc_info {
2023     pmix_proc_t proc;
2024     char *hostname;
2025     char *executable_name;
2026     pid_t pid;
2027     int exit_code;
2028     pmix_proc_state_t state;
2029 } pmix_proc_info_t;
2030 
2031 #define PMIX_PROC_INFO_STATIC_INIT  \
2032 {                                   \
2033     .proc = PMIX_PROC_STATIC_INIT,  \
2034     .hostname = NULL,               \
2035     .executable_name = NULL,        \
2036     .pid = 0,                       \
2037     .exit_code = 0,                 \
2038     .state = PMIX_PROC_STATE_UNDEF  \
2039 }
2040 
2041 
2042 
2043 /****    PMIX DATA ARRAY STRUCT    ****/
2044 
2045 typedef struct pmix_data_array {
2046     pmix_data_type_t type;
2047     size_t size;
2048     void *array;
2049 } pmix_data_array_t;
2050 
2051 #define PMIX_DATA_ARRAY_STATIC_INIT     \
2052 {                                       \
2053     .type = PMIX_UNDEF,                 \
2054     .size = 0,                          \
2055     .array = NULL                       \
2056 }
2057 
2058 /* we cannot forward-declare the pmix_regattr_t struct
2059  * as Cython doesn't know what to do with it. Thus, we
2060  * will utilize the void* entry of the pmix_value_t to
2061  * hold the pointer to pmix_regattr_t */
2062 
2063 /****   STATISTICS STRUCTURES  ****/
2064 typedef struct pmix_proc_stats {
2065     /* process ident info */
2066     char *node;
2067     pmix_proc_t proc;
2068     pid_t pid;
2069     char *cmd;
2070     /* process stats */
2071     char state;
2072     struct timeval time;
2073     float percent_cpu;
2074     int32_t priority;
2075     uint16_t num_threads;
2076     float pss;   /* in MBytes */
2077     float vsize;  /* in MBytes */
2078     float rss;  /* in MBytes */
2079     float peak_vsize;  /* in MBytes */
2080     uint16_t processor;
2081     /* time at which sample was taken */
2082     struct timeval sample_time;
2083 } pmix_proc_stats_t;
2084 
2085 #define PMIX_PROC_STATS_STATIC_INIT     \
2086 {                                       \
2087     .node = NULL,                       \
2088     .proc = PMIX_PROC_STATIC_INIT,      \
2089     .pid = 0,                           \
2090     .cmd = NULL,                        \
2091     .state = '\0',                      \
2092     .time = {0, 0},                     \
2093     .percent_cpu = 0.0,                 \
2094     .priority = 0,                      \
2095     .num_threads = 0,                   \
2096     .pss = 0.0,                         \
2097     .vsize = 0.0,                       \
2098     .rss = 0.0,                         \
2099     .peak_vsize = 0.0                   \
2100     .processor = 0,                     \
2101     .sample_time = {0, 0}               \
2102 }
2103 
2104 
2105 typedef struct {
2106     char *disk;
2107     uint64_t num_reads_completed;
2108     uint64_t num_reads_merged;
2109     uint64_t num_sectors_read;
2110     uint64_t milliseconds_reading;
2111     uint64_t num_writes_completed;
2112     uint64_t num_writes_merged;
2113     uint64_t num_sectors_written;
2114     uint64_t milliseconds_writing;
2115     uint64_t num_ios_in_progress;
2116     uint64_t milliseconds_io;
2117     uint64_t weighted_milliseconds_io;
2118 } pmix_disk_stats_t;
2119 
2120 #define PMIX_DISK_STATS_STATIC_INIT     \
2121 {                                       \
2122     .disk = NULL,                       \
2123     .num_reads_completed = 0,           \
2124     .num_reads_merged = 0,              \
2125     .num_sectors_read = 0,              \
2126     .milliseconds_reading = 0,          \
2127     .num_writes_completed = 0,          \
2128     .num_writes_merged = 0,             \
2129     .num_sectors_written = 0,           \
2130     .milliseconds_writing = 0,          \
2131     .num_ios_in_progress = 0,           \
2132     .milliseconds_io = 0,               \
2133     .weighted_milliseconds_io = 0       \
2134 }
2135 
2136 
2137 typedef struct {
2138     char *net_interface;
2139     uint64_t num_bytes_recvd;
2140     uint64_t num_packets_recvd;
2141     uint64_t num_recv_errs;
2142     uint64_t num_bytes_sent;
2143     uint64_t num_packets_sent;
2144     uint64_t num_send_errs;
2145 } pmix_net_stats_t;
2146 
2147 #define PMIX_NET_STATS_STATIC_INIT  \
2148 {                                   \
2149     .net_interface = NULL,          \
2150     .num_bytes_recvd = 0,           \
2151     .num_packets_recvd = 0,         \
2152     .num_recv_errs = 0,             \
2153     .num_bytes_sent = 0,            \
2154     .num_packets_sent = 0,          \
2155     .num_send_errs = 0              \
2156 }
2157 
2158 
2159 typedef struct {
2160     char *node;
2161     /* node-level load averages */
2162     float la;
2163     float la5;
2164     float la15;
2165     /* memory usage */
2166     float total_mem;  /* in MBytes */
2167     float free_mem;  /* in MBytes */
2168     float buffers;  /* in MBytes */
2169     float cached;   /* in MBytes */
2170     float swap_cached;  /* in MBytes */
2171     float swap_total;   /* in MBytes */
2172     float swap_free;    /* in MBytes */
2173     float mapped;       /* in MBytes */
2174     /* time at which sample was taken */
2175     struct timeval sample_time;
2176     /* array of disk stats, one per disk */
2177     pmix_disk_stats_t *diskstats;
2178     size_t ndiskstats;
2179     /* array of net stats, one per interface */
2180     pmix_net_stats_t *netstats;
2181     size_t nnetstats;
2182 } pmix_node_stats_t;
2183 
2184 #define PMIX_NODE_STATS_STATIC_INIT     \
2185 {                                       \
2186     .node = NULL,                       \
2187     .la = 0,                            \
2188     .la5 = 0,                           \
2189     .la15 = 0,                          \
2190     .total_mem = 0.0,                   \
2191     .free_mem = 0.0,                    \
2192     .buffers = 0.0,                     \
2193     .cached = 0.0,                      \
2194     .swap_cached = 0.0,                 \
2195     .swap_total = 0.0,                  \
2196     .swap_free = 0.0,                   \
2197     .mapped = 0.0,                      \
2198     .sample_time = {0, 0},              \
2199     .diskstats = NULL,                  \
2200     .ndiskstats = 0,                    \
2201     .netstats = NULL,                   \
2202     .nnetstats = 0                      \
2203 }
2204 
2205 
2206 /****    PMIX VALUE STRUCT    ****/
2207 
2208 /* NOTE: operations can supply a collection of values under
2209  * a single key by passing a pmix_value_t containing a
2210  * data array of type PMIX_INFO, with each array element
2211  * containing its own pmix_info_t object */
2212 
2213 typedef struct pmix_value {
2214     pmix_data_type_t type;
2215     union {
2216         bool flag;
2217         uint8_t byte;
2218         char *string;
2219         size_t size;
2220         pid_t pid;
2221         int integer;
2222         int8_t int8;
2223         int16_t int16;
2224         int32_t int32;
2225         int64_t int64;
2226         unsigned int uint;
2227         uint8_t uint8;
2228         uint16_t uint16;
2229         uint32_t uint32;
2230         uint64_t uint64;
2231         float fval;
2232         double dval;
2233         struct timeval tv;
2234         time_t time;
2235         pmix_status_t status;
2236         pmix_rank_t rank;
2237         pmix_nspace_t *nspace;
2238         pmix_proc_t *proc;
2239         pmix_byte_object_t bo;
2240         pmix_persistence_t persist;
2241         pmix_scope_t scope;
2242         pmix_data_range_t range;
2243         pmix_proc_state_t state;
2244         pmix_proc_info_t *pinfo;
2245         pmix_data_array_t *darray;
2246         void *ptr;
2247         pmix_alloc_directive_t adir;
2248         pmix_envar_t envar;
2249         pmix_coord_t *coord;
2250         pmix_link_state_t linkstate;
2251         pmix_job_state_t jstate;
2252         pmix_topology_t *topo;
2253         pmix_cpuset_t *cpuset;
2254         pmix_locality_t locality;
2255         pmix_geometry_t *geometry;
2256         pmix_device_type_t devtype;
2257         pmix_device_distance_t *devdist;
2258         pmix_endpoint_t *endpoint;
2259         pmix_data_buffer_t *dbuf;
2260         pmix_proc_stats_t *pstats;
2261         pmix_disk_stats_t *dkstats;
2262         pmix_net_stats_t *netstats;
2263         pmix_node_stats_t *ndstats;
2264     } data;
2265 } pmix_value_t;
2266 
2267 #define PMIX_VALUE_STATIC_INIT  \
2268 {                               \
2269     .type = PMIX_UNDEF,         \
2270     .data.ptr = NULL            \
2271 }
2272 
2273 #define PMIX_VALUE_GET_NUMBER(s, m, n, t)               \
2274     do {                                                \
2275         (s) = PMIX_SUCCESS;                             \
2276         if (PMIX_SIZE == (m)->type) {                   \
2277             (n) = (t)((m)->data.size);                  \
2278         } else if (PMIX_INT == (m)->type) {             \
2279             (n) = (t)((m)->data.integer);               \
2280         } else if (PMIX_INT8 == (m)->type) {            \
2281             (n) = (t)((m)->data.int8);                  \
2282         } else if (PMIX_INT16 == (m)->type) {           \
2283             (n) = (t)((m)->data.int16);                 \
2284         } else if (PMIX_INT32 == (m)->type) {           \
2285             (n) = (t)((m)->data.int32);                 \
2286         } else if (PMIX_INT64 == (m)->type) {           \
2287             (n) = (t)((m)->data.int64);                 \
2288         } else if (PMIX_UINT == (m)->type) {            \
2289             (n) = (t)((m)->data.uint);                  \
2290         } else if (PMIX_UINT8 == (m)->type) {           \
2291             (n) = (t)((m)->data.uint8);                 \
2292         } else if (PMIX_UINT16 == (m)->type) {          \
2293             (n) = (t)((m)->data.uint16);                \
2294         } else if (PMIX_UINT32 == (m)->type) {          \
2295             (n) = (t)((m)->data.uint32);                \
2296         } else if (PMIX_UINT64 == (m)->type) {          \
2297             (n) = (t)((m)->data.uint64);                \
2298         } else if (PMIX_FLOAT == (m)->type) {           \
2299             (n) = (t)((m)->data.fval);                  \
2300         } else if (PMIX_DOUBLE == (m)->type) {          \
2301             (n) = (t)((m)->data.dval);                  \
2302         } else if (PMIX_PID == (m)->type) {             \
2303             (n) = (t)((m)->data.pid);                   \
2304         } else if (PMIX_PROC_RANK == (m)->type) {       \
2305             (n) = (t)((m)->data.rank);                  \
2306         } else if (PMIX_STATUS == (m)->type) {          \
2307             (n) = (t)((m)->data.status);                \
2308         } else {                                        \
2309             (s) = PMIX_ERR_BAD_PARAM;                   \
2310         }                                               \
2311     } while(0)
2312 
2313 /****    PMIX INFO STRUCT    ****/
2314 typedef struct pmix_info {
2315     pmix_key_t key;
2316     pmix_info_directives_t flags;   // bit-mask of flags
2317     pmix_value_t value;
2318 } pmix_info_t;
2319 
2320 #define PMIX_INFO_STATIC_INIT       \
2321 {                                   \
2322     .key = {0},                     \
2323     .flags = 0,                     \
2324     .value = PMIX_VALUE_STATIC_INIT \
2325 }
2326 
2327 
2328 typedef enum {
2329     PMIX_BOOL_TRUE,
2330     PMIX_BOOL_FALSE,
2331     PMIX_NON_BOOL
2332 } pmix_boolean_t;
2333 
2334 
2335 /****    PMIX LOOKUP RETURN STRUCT    ****/
2336 typedef struct pmix_pdata {
2337     pmix_proc_t proc;
2338     pmix_key_t key;
2339     pmix_value_t value;
2340 } pmix_pdata_t;
2341 
2342 #define PMIX_LOOKUP_STATIC_INIT     \
2343 {                                   \
2344     .proc = PMIX_PROC_STATIC_INIT,  \
2345     .key = {0},                     \
2346     .value = PMIX_VALUE_STATIC_INIT \
2347 }
2348 
2349 
2350 
2351 /****    PMIX APP STRUCT    ****/
2352 typedef struct pmix_app {
2353     char *cmd;
2354     char **argv;
2355     char **env;
2356     char *cwd;
2357     int maxprocs;
2358     pmix_info_t *info;
2359     size_t ninfo;
2360 } pmix_app_t;
2361 
2362 #define PMIX_APP_STATIC_INIT    \
2363 {                               \
2364     .cmd = NULL,                \
2365     .argv = NULL,               \
2366     .env = NULL,                \
2367     .cwd = NULL,                \
2368     .maxprocs = 0,              \
2369     .info = NULL,               \
2370     .ninfo = 0                  \
2371 }
2372 
2373 
2374 /****    PMIX QUERY STRUCT    ****/
2375 typedef struct pmix_query {
2376     char **keys;
2377     pmix_info_t *qualifiers;
2378     size_t nqual;
2379 } pmix_query_t;
2380 
2381 #define PMIX_QUERY_STATIC_INIT  \
2382 {                               \
2383     .keys = NULL,               \
2384     .qualifiers = NULL,         \
2385     .nqual = 0                  \
2386 }
2387 
2388 
2389 /****    ATTRIBUTE REGISTRATION STRUCT   ****/
2390 typedef struct pmix_regattr_t {
2391     char *name;
2392     pmix_key_t string;
2393     pmix_data_type_t type;
2394     char **description;
2395 } pmix_regattr_t;
2396 
2397 #define PMIX_REGATTR_STATIC_INIT    \
2398 {                                   \
2399     .name = NULL,                   \
2400     .string = {0},                  \
2401     .type = PMIX_UNDEF,             \
2402     .description = NULL             \
2403 }
2404 
2405 
2406 /****    FABRIC STRUCT    ****/
2407 /* Define a pmix_fabric_t struct for
2408  * interacting with fabric-related interfaces */
2409 typedef struct pmix_fabric_s {
2410     /* user-supplied name for this fabric */
2411     char *name;
2412     /* a PMIx-supplied index identifying this registration object */
2413     size_t index;
2414     /* array containing information (provided by the PMIx library)
2415      * about the fabric */
2416     pmix_info_t *info;
2417     size_t ninfo;
2418     /* object pointer for use by the PMIx library */
2419     void *module;
2420 } pmix_fabric_t;
2421 
2422 #define PMIX_FABRIC_STATIC_INIT \
2423 {                               \
2424     .name = NULL,               \
2425     .index = 0,                 \
2426     .info = NULL,               \
2427     .ninfo = 0,                 \
2428     .module = NULL              \
2429 }
2430 
2431 /* convenience macros to support pmix_fabric_t */
2432 #define PMIX_FABRIC_CONSTRUCT(x) \
2433     memset(x, 0, sizeof(pmix_fabric_t))
2434 
2435 typedef enum {
2436     PMIX_FABRIC_REQUEST_INFO,
2437     PMIX_FABRIC_UPDATE_INFO
2438 } pmix_fabric_operation_t;
2439 
2440 
2441 /****    CALLBACK FUNCTIONS FOR NON-BLOCKING OPERATIONS    ****/
2442 
2443 typedef void (*pmix_release_cbfunc_t)(void *cbdata);
2444 
2445 /* define a callback function that is solely used by servers, and
2446  * not clients, to return modex data in response to "fence" and "get"
2447  * operations. The returned blob contains the data collected from each
2448  * server participating in the operation.
2449  *
2450  * As the data is "owned" by the host server, provide a secondary
2451  * callback function to notify the host server that we are done
2452  * with the data so it can be released */
2453 typedef void (*pmix_modex_cbfunc_t)(pmix_status_t status,
2454                                     const char *data, size_t ndata,
2455                                     void *cbdata,
2456                                     pmix_release_cbfunc_t release_fn,
2457                                     void *release_cbdata);
2458 
2459 /* define a callback function for calls to PMIx_Spawn_nb - the function
2460  * will be called upon completion of the spawn command. The status
2461  * will indicate whether or not the spawn succeeded. The nspace
2462  * of the spawned processes will be returned, along with any provided
2463  * callback data. Note that the returned nspace value will be
2464  * released by the library upon return from the callback function, so
2465  * the receiver must copy it if it needs to be retained */
2466 typedef void (*pmix_spawn_cbfunc_t)(pmix_status_t status,
2467                                     pmix_nspace_t nspace, void *cbdata);
2468 
2469 /* define a callback for common operations that simply return
2470  * a status. Examples include the non-blocking versions of
2471  * Fence, Connect, and Disconnect */
2472 typedef void (*pmix_op_cbfunc_t)(pmix_status_t status, void *cbdata);
2473 
2474 /* define a callback function for calls to PMIx_Lookup_nb - the
2475  * function will be called upon completion of the command with the
2476  * status indicating the success of failure of the request. Any
2477  * retrieved data will be returned in an array of pmix_pdata_t structs.
2478  * The nspace/rank of the process that provided each data element is
2479  * also returned.
2480  *
2481  * Note that these structures will be released upon return from
2482  * the callback function, so the receiver must copy/protect the
2483  * data prior to returning if it needs to be retained */
2484 
2485 typedef void (*pmix_lookup_cbfunc_t)(pmix_status_t status,
2486                                      pmix_pdata_t data[], size_t ndata,
2487                                      void *cbdata);
2488 
2489 /* define a callback by which an event handler can notify the PMIx library
2490  * that it has completed its response to the notification. The handler
2491  * is _required_ to execute this callback so the library can determine
2492  * if additional handlers need to be called. The handler shall return
2493  * PMIX_SUCCESS if no further action is required. The return status
2494  * of each event handler and any returned pmix_info_t structures
2495  * will be added to the array of pmix_info_t passed to any subsequent
2496  * event handlers to help guide their operation.
2497  *
2498  * If non-NULL, the provided callback function will be called to allow
2499  * the event handler to release the provided info array.
2500  */
2501 typedef void (*pmix_event_notification_cbfunc_fn_t)(pmix_status_t status,
2502                                                     pmix_info_t *results, size_t nresults,
2503                                                     pmix_op_cbfunc_t cbfunc, void *thiscbdata,
2504                                                     void *notification_cbdata);
2505 
2506 /* define a callback function for the event handler. Upon receipt of an
2507  * event notification, PMIx will execute the specified notification
2508  * callback function, providing:
2509  *
2510  * evhdlr_registration_id - the returned registration number of
2511  *                          the event handler being called
2512  * status - the event that occurred
2513  * source - the nspace and rank of the process that generated
2514  *          the event. If the source is the resource manager,
2515  *          then the nspace will be empty and the rank will
2516  *          be PMIX_RANK_UNDEF
2517  * info - any additional info provided regarding the event.
2518  * ninfo - the number of info objects in the info array
2519  * results - any provided results from event handlers called
2520  *           prior to this one.
2521  * nresults - number of info objects in the results array
2522  * cbfunc - the function to be called upon completion of the handler
2523  * cbdata - pointer to be returned in the completion cbfunc
2524  *
2525  * Note that different resource managers may provide differing levels
2526  * of support for event notification to application processes. Thus, the
2527  * info array may be NULL or may contain detailed information of the event.
2528  * It is the responsibility of the application to parse any provided info array
2529  * for defined key-values if it so desires.
2530  *
2531  * Possible uses of the pmix_info_t object include:
2532  *
2533  * - for the RM to alert the process as to planned actions, such as
2534  *   to abort the session, in response to the reported event
2535  *
2536  * - provide a timeout for alternative action to occur, such as for
2537  *   the application to request an alternate response to the event
2538  *
2539  * For example, the RM might alert the application to the failure of
2540  * a node that resulted in termination of several processes, and indicate
2541  * that the overall session will be aborted unless the application
2542  * requests an alternative behavior in the next 5 seconds. The application
2543  * then has time to respond with a checkpoint request, or a request to
2544  * recover from the failure by obtaining replacement nodes and restarting
2545  * from some earlier checkpoint.
2546  *
2547  * Support for these options is left to the discretion of the host RM. Info
2548  * keys are included in the common definions above, but also may be augmented
2549  * on a per-RM basis.
2550  *
2551  * On the server side, the notification function is used to inform the host
2552  * server of a detected event in the PMIx subsystem and/or client
2553  */
2554 typedef void (*pmix_notification_fn_t)(size_t evhdlr_registration_id,
2555                                        pmix_status_t status,
2556                                        const pmix_proc_t *source,
2557                                        pmix_info_t info[], size_t ninfo,
2558                                        pmix_info_t *results, size_t nresults,
2559                                        pmix_event_notification_cbfunc_fn_t cbfunc,
2560                                        void *cbdata);
2561 
2562 /* define a callback function for calls to register handlers, e.g., event
2563  * notification and IOF requests
2564  *
2565  * status - PMIX_SUCCESS or an appropriate error constant
2566  *
2567  * refid - reference identifier assigned to the handler by PMIx,
2568  *         used to deregister the handler
2569  *
2570  * cbdata - object provided to the registration call
2571  */
2572 typedef void (*pmix_hdlr_reg_cbfunc_t)(pmix_status_t status,
2573                                        size_t refid,
2574                                        void *cbdata);
2575 /* retain the deprecated form */
2576 typedef void (*pmix_evhdlr_reg_cbfunc_t)(pmix_status_t status,
2577                                          size_t refid,
2578                                          void *cbdata);
2579 
2580 /* define a callback function for calls to PMIx_Get_nb. The status
2581  * indicates if the requested data was found or not - a pointer to the
2582  * pmix_value_t structure containing the found data is returned. The
2583  * pointer will be NULL if the requested data was not found. */
2584 typedef void (*pmix_value_cbfunc_t)(pmix_status_t status,
2585                                     pmix_value_t *kv, void *cbdata);
2586 
2587 /* define a callback function for calls to PMIx_Query. The status
2588  * indicates if requested data was found or not - an array of
2589  * pmix_info_t will contain the key/value pairs. */
2590 typedef void (*pmix_info_cbfunc_t)(pmix_status_t status,
2591                                    pmix_info_t *info, size_t ninfo,
2592                                    void *cbdata,
2593                                    pmix_release_cbfunc_t release_fn,
2594                                    void *release_cbdata);
2595 
2596 /* Define a callback function to return a requested security credential.
2597  * Returned values include:
2598  *
2599  * status - PMIX_SUCCESS if a credential could be assigned as requested, or
2600  *          else an appropriate error code indicating the problem
2601  *
2602  * credential - pointer to an allocated pmix_byte_object_t containing the
2603  *              credential (as a opaque blob) and its size. Ownership of
2604  *              the credential is transferred to the receiving function - thus,
2605  *              responsibility for releasing the memory lies outside the
2606  *              PMIx library.
2607  *
2608  * info - an array of pmix_info_t structures provided by the system to pass
2609  *        any additional information about the credential - e.g., the identity
2610  *        of the issuing agent. The info array is owned by the PMIx library
2611  *        and is not to be released or altered by the receiving party. Note that
2612  *        this array is not related to the pmix_info_t structures possibly
2613  *        provided in the call to PMIx_Get_credential.
2614  *
2615  *        Information provided by the issuing agent can subsequently be used
2616  *        by the application for a variety of purposes. Examples include:
2617  *            - checking identified authorizations to determine what
2618  *              requests/operations are feasible as a means to steering
2619  *              workflows
2620  *            - compare the credential type to that of the local SMS for
2621  *              compatibility
2622  *
2623  * ninfo - number of elements in the info array
2624  *
2625  * cbdata - the caller's provided void* object
2626  *
2627  * NOTE: the credential is opaque and therefore understandable only by
2628  *       a service compatible with the issuer.
2629  */
2630 typedef void (*pmix_credential_cbfunc_t)(pmix_status_t status,
2631                                          pmix_byte_object_t *credential,
2632                                          pmix_info_t info[], size_t ninfo,
2633                                          void *cbdata);
2634 
2635 
2636 /* Define a validation callback function to indicate if a provided
2637  * credential is valid, and any corresponding information regarding
2638  * authorizations and other security matters
2639  * Returned values include:
2640  *
2641  * status - PMIX_SUCCESS if the provided credential is valid. An appropriate
2642  *          error code indicating the issue if the credential is rejected.
2643  *
2644  * info - an array of pmix_info_t structures provided by the system to pass
2645  *        any additional information about the authentication - e.g., the
2646  *        effective userid and group id of the certificate holder, and any
2647  *        related authorizations. The info array is owned by the PMIx library
2648  *        and is not to be released or altered by the receiving party. Note that
2649  *        this array is not related to the pmix_info_t structures possibly
2650  *        provided in the call to PMIx_Validate_credential.
2651  *
2652  *        The precise contents of the array will depend on the host SMS and
2653  *        its associated security system. At the minimum, it is expected (but
2654  *        not required) that the array will contain entries for the PMIX_USERID
2655  *        and PMIX_GROUPID of the client described in the credential.
2656  *
2657  * ninfo - number of elements in the info array
2658  *
2659  * cbdata - the caller's provided void* object
2660  */
2661 typedef void (*pmix_validation_cbfunc_t)(pmix_status_t status,
2662                                          pmix_info_t info[], size_t ninfo,
2663                                          void *cbdata);
2664 
2665 /* Define a callback function to return device distance arrays
2666  */
2667 typedef void (*pmix_device_dist_cbfunc_t)(pmix_status_t status,
2668                                           pmix_device_distance_t *dist,
2669                                           size_t ndist,
2670                                           void *cbdata,
2671                                           pmix_release_cbfunc_t release_fn,
2672                                           void *release_cbdata);
2673 
2674 
2675 
2676 
2677 #include <pmix_deprecated.h>
2678 
2679 #if defined(c_plusplus) || defined(__cplusplus)
2680 }
2681 #endif
2682 
2683 #endif