你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-04 11:36:52 +08:00
Fix deadlock bug when some ranks finish early
- When some ranks finish quicker than others, if the ranks one of the ranks still running encounters an error it will attempt to call MPI.Abort. As some ranks will have already exited, this was causing deadlock without the error actually appearing.
这个提交包含在:
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015-2025: The University of Edinburgh, United Kingdom
|
||||
# Authors: Craig Warren, Antonis Giannopoulos, John Hartley,
|
||||
# Authors: Craig Warren, Antonis Giannopoulos, John Hartley,
|
||||
# and Nathan Mannall
|
||||
#
|
||||
# This file is part of gprMax.
|
||||
@@ -187,7 +187,11 @@ class MPIContext(Context):
|
||||
|
||||
def run(self) -> Dict:
|
||||
try:
|
||||
return super().run()
|
||||
result = super().run()
|
||||
logger.debug("Waiting for all ranks to finish.")
|
||||
self.comm.Barrier()
|
||||
logger.debug("Completed.")
|
||||
return result
|
||||
except:
|
||||
logger.exception(f"Rank {self.rank} encountered an error. Aborting...")
|
||||
self.comm.Abort()
|
||||
|
在新工单中引用
屏蔽一个用户