From 726bd13365c71efea2edfa2c63353b7710a6b461 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 28 Aug 2026 16:36:46 -0700 Subject: [PATCH 1/4] rfc13: cite MPICH wire protocol definitions Problem: RFC 13 does not cite the (new?) MPICH wire protocol definition files. Add citations. Assisted-by: Claude:claude-opus-4.8 --- spec_13.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec_13.rst b/spec_13.rst index 097cbff..d16077b 100644 --- a/spec_13.rst +++ b/spec_13.rst @@ -557,6 +557,7 @@ Notes: - The barrier operation MUST be usable as a generic synchronization mechanism, without requiring KVS data to be queued for exchange. + .. function:: int PMI_KVS_Create (char kvsname[], int length) .. function:: int PMI_KVS_Destroy (const char kvsname[]); .. function:: int PMI_KVS_Iter_first (const char kvsname[], char key[], int key_len, char val[], int val_len) @@ -650,7 +651,8 @@ Wire Protocol ************* The reference implementation of the PMI-1.1 wire protocol is the MPICH -Hydra [#f4]_ process manager. +Hydra [#f4]_ process manager. The individual message formats are defined +by the MPICH PMI-1.1 [#f7]_ and PMI-1.2 [#f8]_ protocol definition files. The protocol is comprised of request and response messages. All messages SHALL be terminated with a newline. @@ -910,3 +912,7 @@ References .. [#f5] `SLURM PMI-1 implementation `__ .. [#f6] `PMI: A Scalable Parallel Process-Management Interface for Extreme-Scale Systems `__, P. Balaji et al, EuroMPI Proceedings, 2010. + +.. [#f7] `MPICH PMI-1.1 wire protocol definition `__ + +.. [#f8] `MPICH PMI-1.2 wire protocol definition `__ From f611fce785711e366aa46f34b29129af7c98a587 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 28 Aug 2026 16:37:19 -0700 Subject: [PATCH 2/4] rfc13: fix abort wire protocol ABNF Problem: the RFC 13 abort ABNF disagrees with the MPICH wire protocol definition files on three points: 1. it fails to define the required abort "exitcode" attribute 2. it fails to define the optional abort "message" attribute 3. it defines an abort response that should not exist Fix the abort ABNF. Assisted-by: Claude:claude-opus-4.8 --- spec_13.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec_13.rst b/spec_13.rst index d16077b..7a2b0a3 100644 --- a/spec_13.rst +++ b/spec_13.rst @@ -729,7 +729,7 @@ Protocol Definition PMI1 = C:init S:init / C:maxes S:maxes - / C:abort S:abort + / C:abort / C:finalize S:finalize / C:universe S:universe / C:appnum S:appnum @@ -756,8 +756,10 @@ Protocol Definition [SP "kvsname_max=" uint SP "keylen_max=" uint SP "vallen_max=" uint] LF - C:abort = "cmd=abort" LF - S:abort = LF + C:abort = "cmd=abort" SP "exitcode=" int + [SP "message=" string] + LF + ; abort has no server response C:finalize = "cmd=finalize" LF S:finalize = "cmd=finalize_ack" From ca8927b61394a3c4b6638c2bd44d1fee461f53f7 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 28 Aug 2026 16:38:41 -0700 Subject: [PATCH 3/4] rfc13: fix get_result wire protocol ABNF Problem: the RFC 13 get_result ABNF (the response to the KVS get) omits an optional "found" attribute described by the MPICH protocol definition files. Update ABNF and add some description to the Error Handling section. Assisted-by: Claude:claude-opus-4.8 --- spec_13.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec_13.rst b/spec_13.rst index 7a2b0a3..0d264dd 100644 --- a/spec_13.rst +++ b/spec_13.rst @@ -708,6 +708,10 @@ Some responses MAY include a "msg" key. On error, the "msg" key MAY be set to an error message. On success, the "msg" key MAY be set to "success", or it may be omitted. +The get_result response MAY include a "found" key. +On error, the "found" key, if set, MAY be be set to either "TRUE" or "FALSE". +On success, the "found" key, if set, SHALL be set to "TRUE". + If a protocol error occurs, the detecting side SHALL immediately close the connection and abort the program. IT SHOULD log the message so that the problem can be tracked down. @@ -801,6 +805,7 @@ Protocol Definition C:get = "cmd=get" SP "kvsname=" word SP "key=" word LF S:get = "cmd=get_result" [SP "rc=" int] + [SP "found=" boolean] ; OPTIONAL, default TRUE [SP "value=" string] LF @@ -848,6 +853,7 @@ Protocol Definition string = 1*(SP HTAB VCHAR) ; visible char plus tab, space int = *1("+" "-") uint ; signed integer uint = 1*DIGIT ; unsigned integer + boolean = "TRUE" / "FALSE" ; case-sensitive Back Compatibility ================== From 17ccf24f56ef15e20faf50c5152e01583d8380f3 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 28 Aug 2026 16:39:14 -0700 Subject: [PATCH 4/4] rfc13: fix put/get wire protocol ABNF Problem: RFC 13 requires the kvsname key on put and get, but the MPICH protocol definition files show it as optional. Make kvsname optional. Assisted-by: Claude:claude-opus-4.8 --- spec_13.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec_13.rst b/spec_13.rst index 0d264dd..6995284 100644 --- a/spec_13.rst +++ b/spec_13.rst @@ -786,7 +786,7 @@ Protocol Definition ; Key Value Store - C:put = "cmd=put" SP "kvsname=" word SP "key=" word SP "value=" string LF + C:put = "cmd=put" [SP "kvsname=" word] SP "key=" word SP "value=" string LF S:put = "cmd=put_result" [SP "rc=" int] LF @@ -802,7 +802,7 @@ Protocol Definition [SP "rc=" int] LF - C:get = "cmd=get" SP "kvsname=" word SP "key=" word LF + C:get = "cmd=get" [SP "kvsname=" word] SP "key=" word LF S:get = "cmd=get_result" [SP "rc=" int] [SP "found=" boolean] ; OPTIONAL, default TRUE