你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 15:27:57 +08:00
Fix receivers not always output in the same order
This happened when receivers were recombined on rank 0 when using MPI. Need to ensure consistancy in the regression tests when comparing serial and MPI implementations.
这个提交包含在:
@@ -136,6 +136,10 @@ def write_hd5_data(basegrp, grid, is_subgrid=False):
|
|||||||
basegrp["tls/tl" + str(tlindex + 1) + "/Vtotal"] = tl.Vtotal
|
basegrp["tls/tl" + str(tlindex + 1) + "/Vtotal"] = tl.Vtotal
|
||||||
basegrp["tls/tl" + str(tlindex + 1) + "/Itotal"] = tl.Itotal
|
basegrp["tls/tl" + str(tlindex + 1) + "/Itotal"] = tl.Itotal
|
||||||
|
|
||||||
|
# Ensure the order of receivers is always consistent (Needed for
|
||||||
|
# consistancy when using MPI with multiple receivers)
|
||||||
|
grid.rxs.sort(key=lambda rx: rx.ID)
|
||||||
|
|
||||||
# Create group, add positional data and write field component arrays for receivers
|
# Create group, add positional data and write field component arrays for receivers
|
||||||
for rxindex, rx in enumerate(grid.rxs):
|
for rxindex, rx in enumerate(grid.rxs):
|
||||||
grp = basegrp.create_group("rxs/rx" + str(rxindex + 1))
|
grp = basegrp.create_group("rxs/rx" + str(rxindex + 1))
|
||||||
|
在新工单中引用
屏蔽一个用户