Update backend to use provided MPI communicator during library initialization (#79)
* Update backend to use provided MPI communicator during library initialization, default to `MPI_COMM_WORLD`
* Update `rocshmem_my_pe` and `rocshmem_n_pes` host APIs
- Return values from backend if initialized; otherwise, fallback to MPI_Singleton.
[ROCm/rocshmem commit: 05755847f5]
This commit is contained in:
کامیت شده توسط
GitHub
والد
a3a211a677
کامیت
be35f3ef93
@@ -45,7 +45,7 @@ namespace rocshmem {
|
||||
extern rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
|
||||
|
||||
ROBackend::ROBackend(MPI_Comm comm)
|
||||
: Backend() {
|
||||
: Backend(comm) {
|
||||
type = BackendType::RO_BACKEND;
|
||||
|
||||
if (auto maximum_num_contexts_str = getenv("ROCSHMEM_MAX_NUM_CONTEXTS")) {
|
||||
@@ -78,7 +78,7 @@ ROBackend::ROBackend(MPI_Comm comm)
|
||||
|
||||
queue_ = Queue(maximum_num_contexts_, queue_size_);
|
||||
|
||||
transport_ = new MPITransport(comm, &queue_);
|
||||
transport_ = new MPITransport(backend_comm, &queue_);
|
||||
num_pes = transport_->getNumPes();
|
||||
my_pe = transport_->getMyPe();
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user