Check SimulationConfig.args has attribute subgrid

Subgrid attribute won't exist when gprMax is called from the commandline
这个提交包含在:
nmannall
2024-05-23 11:18:44 +01:00
父节点 818418c952
当前提交 d004f64d81

查看文件

@@ -225,7 +225,7 @@ class SimulationConfig:
logger.exception("You cannot use both CUDA and OpenCl simultaneously.") logger.exception("You cannot use both CUDA and OpenCl simultaneously.")
raise ValueError raise ValueError
if self.mpi and self.args.subgrid: if self.mpi and hasattr(self.args, "subgrid") and self.args.subgrid:
logger.exception("You cannot use subgrids with MPI.") logger.exception("You cannot use subgrids with MPI.")
raise ValueError raise ValueError