Skip to content

Commit

Permalink
Manually set buffer for pickled message in mpi4py, and then remove wa…
Browse files Browse the repository at this point in the history
…rning for global adaptivity
  • Loading branch information
IshaanDesai committed Aug 28, 2023
1 parent ead937e commit a88d08b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion micro_manager/adaptivity/global_adaptivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ def _p2p_comm(self, assoc_active_ids: list, data: list) -> list:
recv_reqs = []
for global_id, recv_rank in recv_map.items():
tag = self._create_tag(global_id, recv_rank, self._rank)
req = self._comm.irecv(source=recv_rank, tag=tag)
bufsize = 1 << 30 # allocate and use a temporary 1 MiB buffer size https://github.com/mpi4py/mpi4py/issues/389
req = self._comm.irecv(bufsize, source=recv_rank, tag=tag)
recv_reqs.append(req)

# Wait for all non-blocking communication to complete
Expand Down
2 changes: 0 additions & 2 deletions micro_manager/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ def read_json(self, config_filename):
self._adaptivity_type = "local"
elif data["simulation_params"]["adaptivity"]["type"] == "global":
self._adaptivity_type = "global"
self._logger.warning(
"Global adaptivity is still experimental. We recommend using it for small (<50 macro vertices) cases only.")
else:
raise Exception("Adaptivity type can be either local or global.")

Expand Down

0 comments on commit a88d08b

Please sign in to comment.