From d004f64d81f27285b5f58ac8ef244d00e2695283 Mon Sep 17 00:00:00 2001 From: nmannall Date: Thu, 23 May 2024 11:18:44 +0100 Subject: [PATCH] Check SimulationConfig.args has attribute subgrid Subgrid attribute won't exist when gprMax is called from the commandline --- gprMax/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gprMax/config.py b/gprMax/config.py index d1d5385c..2daacca8 100644 --- a/gprMax/config.py +++ b/gprMax/config.py @@ -225,7 +225,7 @@ class SimulationConfig: logger.exception("You cannot use both CUDA and OpenCl simultaneously.") 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.") raise ValueError