Skip to content

Commit

Permalink
One more fix
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <[email protected]>
  • Loading branch information
YarShev committed Nov 7, 2023
1 parent 390d0b4 commit 2e8e146
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions unidist/core/backends/mpi/core/shared_object_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,20 @@ def _allocate_shared_memory(self):

if self.shared_memory_size > allowed_memory_size:
raise ValueError(
"Memory for shared object storage cannot be allocated " +
"because the value set to `MpiSharedObjectStoreMemory` exceeds the available memory."
"Memory for shared object storage cannot be allocated "
+ "because the value set to `MpiSharedObjectStoreMemory` exceeds the available memory."
)

if self.service_memory_size > allowed_memory_size:
raise ValueError(
"Memory for shared service storage cannot be allocated " +
"because the value set to `MpiSharedServiceMemory` exceeds the available memory."
"Memory for shared service storage cannot be allocated "
+ "because the value set to `MpiSharedServiceMemory` exceeds the available memory."
)

if self.shared_memory_size + self.service_memory_size > allowed_memory_size:
raise ValueError(
"The sum of the `MpiSharedObjectStoreMemory` and `MpiSharedServiceMemory` values is greater " +
"than the available amount of memory."
"The sum of the `MpiSharedObjectStoreMemory` and `MpiSharedServiceMemory` values is greater "
+ "than the available amount of memory."
)

# Shared memory is allocated only once by the monitor process.
Expand All @@ -239,10 +239,10 @@ def _allocate_shared_memory(self):
self.shared_buffer, _ = self.win.Shared_query(communication.MPIRank.MONITOR)

self.service_info_max_count = self.service_memory_size // (
self.INFO_SIZE * MPI.BYTE.size
) * self.INFO_SIZE
self.INFO_SIZE * MPI.LONG.size
)
self.service_win = MPI.Win.Allocate_shared(
self.service_memory_size
self.service_info_max_count * MPI.LONG.size
if mpi_state.is_monitor_process()
else 0,
MPI.LONG.size,
Expand Down

0 comments on commit 2e8e146

Please sign in to comment.