diff --git a/utils/python/CIME/SystemTests/pea.py b/utils/python/CIME/SystemTests/pea.py index 286be7da1b11..b98ea1a09884 100644 --- a/utils/python/CIME/SystemTests/pea.py +++ b/utils/python/CIME/SystemTests/pea.py @@ -35,7 +35,8 @@ def build_phase(self, sharedlib_only=False, model_only=False): self._case.set_value("MPILIB",mpilib) self._case.flush() # We need to explicitly remove the Macros file for this test - os.remove("Macros") + if os.path.isfile("Macros"): + os.remove("Macros") case_setup(self._case, reset=True) self.clean_build() self.build_indv(sharedlib_only=sharedlib_only, model_only=model_only)