Skip to content

Commit

Permalink
process check_pending_get_requests only if the objectStore has the da…
Browse files Browse the repository at this point in the history
…ta_id
  • Loading branch information
arunjose696 committed Mar 6, 2023
1 parent 93204b2 commit 9edb5b7
Show file tree
Hide file tree
Showing 4 changed files with 1,605 additions and 0 deletions.
1 change: 1 addition & 0 deletions unidist/core/backends/mpi/core/controller/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def choose_destination_rank(data_ids):
int
A rank number.
"""
#If none of the workers have any data the next rank is chosen by following a round robin.
if not data_ids:
chosen_rank = RoundRobin.get_instance().schedule_rank()
return chosen_rank
Expand Down
3 changes: 3 additions & 0 deletions unidist/core/backends/mpi/core/worker/request_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def check_pending_get_requests(self, data_ids):
"""

def check_request(data_id):
#Dont process the get request if data ID still not available.
if not ObjectStore.get_instance().contains(data_id):
return
# Check non-blocking data requests for one of the workers
if data_id in self._data_request:
ranks_with_get_request = self._data_request[data_id]
Expand Down
Loading

0 comments on commit 9edb5b7

Please sign in to comment.