Revamp the uniqueId code to support subgroups of processes (#80)

* add code for bootstrapping

the bootstrapping code has been extracted from the MSCCLPP library,
which in parts is based on the code from NVIDIA. The code has been
modified to match the specific requirements of the rocSHMEM library.

* add code to use the new uniqueId bootstrapping

* adjust init_attr example

extend the rocshmem_init_attr example to use two disjoint groups
of processe, in order to trigger the new code path.

* add env variable for bootstrap timeout

* Update examples/rocshmem_init_attr_test.cc

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>

* Update src/rocshmem.cpp

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>

---------

Co-authored-by: Aurelien Bouteiller <Aurelien.bouteiller@gmail.com>
This commit is contained in:
Edgar Gabriel
2025-04-14 12:02:09 -05:00
committed by GitHub
parent 05755847f5
commit b5830a623b
13 changed files with 2184 additions and 42 deletions
+5 -7
View File
@@ -128,13 +128,11 @@ const rocshmem_team_t ROCSHMEM_TEAM_INVALID = nullptr;
/**
* @brief Data structure defining the unqiueId
*/
constexpr int ROCSHMEM_HOSTNAME_LEN = 20;
struct rocshmem_uniqueid_t {
uint64_t random;
char hostname[ROCSHMEM_HOSTNAME_LEN];
uint32_t pid;
};
typedef struct rocshmem_uniqueid_t rocshmem_unique_id_t;
/// Unique ID for a process. This is a ROCSHMEM_UNIQUE_ID_BYTES byte array that uniquely identifies a process.
#define ROCSHMEM_UNIQUE_ID_BYTES 128
using rocshmem_uniqueid_t = std::array<uint8_t, ROCSHMEM_UNIQUE_ID_BYTES>;
/**
* @brief Data structure used for attribute based