Skip to content

Commit

Permalink
Merge branch 'jgfouca/make_pea_work_without_mpi_serial' (PR #647)
Browse files Browse the repository at this point in the history
PEA should not always fail on machines without mpi-serial

Test suite: Pylint (PEA not currently tested)
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes [CIME Github issue #]

User interface changes?: No

Code review: jedwards

* jgfouca/make_pea_work_without_mpi_serial:
  PEA should not always fail on machines without mpi-serial

Conflicts:
	utils/python/CIME/SystemTests/pea.py
  • Loading branch information
jgfouca committed Oct 14, 2016
2 parents edb5a25 + 2a73760 commit 5f9299d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils/python/CIME/SystemTests/pea.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.case_setup import case_setup
from CIME.XML.machines import Machines

logger = logging.getLogger(__name__)

Expand All @@ -29,12 +30,17 @@ def _common_setup(self):
self._case.set_value("NTHRDS_%s"%comp, 1)
self._case.set_value("ROOTPE_%s"%comp, 0)


def _case_one_setup(self):
case_setup(self._case, reset=True, test_mode=True)

def _case_two_setup(self):
self._case.set_value("MPILIB","mpi-serial")
mach_name = self._case.get_value("MACH")
mach_obj = Machines(machine=mach_name)
if mach_obj.is_valid_MPIlib("mpi-serial"):
self._case.set_value("MPILIB","mpi-serial")
else:
logger.warning("mpi-serial is not supported on machine '%s', so we have to fall back to default MPI and therefore very little is being tested" % mach_name)

if os.path.isfile("Macros"):
os.remove("Macros")
case_setup(self._case, reset=True, test_mode=True)

0 comments on commit 5f9299d

Please sign in to comment.