你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Turn on parallel build for multi use commands
这个提交包含在:
@@ -512,13 +512,6 @@ class MPIGrid(FDTDGrid):
|
||||
Global properties/objects are broadcast to all ranks whereas
|
||||
local properties/objects are scattered to the relevant ranks.
|
||||
"""
|
||||
self.materials = self.comm.bcast(self.materials, root=self.COORDINATOR_RANK)
|
||||
self.rxs = self.scatter_coord_objects(self.rxs)
|
||||
self.voltagesources = self.scatter_coord_objects(self.voltagesources)
|
||||
self.magneticdipoles = self.scatter_coord_objects(self.magneticdipoles)
|
||||
self.hertziandipoles = self.scatter_coord_objects(self.hertziandipoles)
|
||||
self.transmissionlines = self.scatter_coord_objects(self.transmissionlines)
|
||||
|
||||
self.scatter_snapshots()
|
||||
|
||||
if not self.is_coordinator():
|
||||
|
@@ -60,16 +60,10 @@ class MPIModel(Model):
|
||||
self.G.calculate_local_extents()
|
||||
|
||||
def build_geometry(self):
|
||||
self._broadcast_model()
|
||||
|
||||
super().build_geometry()
|
||||
|
||||
self._filter_geometry_objects()
|
||||
|
||||
def _broadcast_model(self):
|
||||
model_config = config.get_model_config()
|
||||
model_config.materials["maxpoles"] = self.comm.bcast(model_config.materials["maxpoles"])
|
||||
|
||||
def _filter_geometry_objects(self):
|
||||
objects = self.comm.bcast(self.geometryobjects)
|
||||
self.geometryobjects = []
|
||||
|
@@ -175,14 +175,14 @@ class Scene:
|
||||
# Process commands that can only have a single instance
|
||||
self.process_single_use_objects(model)
|
||||
|
||||
# Process multiple commands
|
||||
self.process_multi_use_objects(model)
|
||||
|
||||
if (
|
||||
isinstance(model, MPIModel)
|
||||
and model.is_coordinator()
|
||||
or not isinstance(model, MPIModel)
|
||||
):
|
||||
# Process multiple commands
|
||||
self.process_multi_use_objects(model)
|
||||
|
||||
# Initialise geometry arrays for main and subgrids
|
||||
for grid in [model.G] + model.subgrids:
|
||||
grid.initialise_geometry_arrays()
|
||||
|
在新工单中引用
屏蔽一个用户