def setUp(self):
     self.config = HardwareConfig(cpu_ids=[0, 1, 2, 3])
     self._default_options: cg.GenerateOptions = cg.GenerateOptions(
         generate_exhaustive_options=True, max_sims_per_gpu=4)
 def testMinimalSubset(self):
     self.maxDiff = None
     self.config.gpu_ids = [0]
     options = cg.GenerateOptions(max_sims_per_gpu=2,
                                  generate_exhaustive_options=False)
     result = cg.createRunOptionsForSingleConfig(self.config, self.version,
                                                 options)
     expected = [
         # PME = gpu cases need npme=1
         {
             **self.expected_base, "ntmpi": 4,
             "ntomp": 1,
             "nb": "gpu",
             "bonded": "gpu",
             "pme": "gpu",
             "npme": 1,
             "update": "gpu",
             "gputasks": "0000"
         },
         {
             **self.expected_base, "ntmpi": 2,
             "ntomp": 2,
             "nb": "gpu",
             "bonded": "gpu",
             "pme": "gpu",
             "npme": 1,
             "update": "gpu",
             "gputasks": "00"
         },
         # Note the double gputask even though there's only one rank
         {
             **self.expected_base, "ntmpi": 1,
             "ntomp": 4,
             "nb": "gpu",
             "bonded": "gpu",
             "pme": "gpu",
             "update": "gpu",
             "gputasks": "00"
         },
         # update = cpu cases
         {
             **self.expected_base, "ntmpi": 4,
             "ntomp": 1,
             "nb": "gpu",
             "pme": "cpu",
             "bonded": "cpu",
             "update": "cpu",
             "gputasks": "0000"
         },
         {
             **self.expected_base, "ntmpi": 2,
             "ntomp": 2,
             "nb": "gpu",
             "bonded": "cpu",
             "pme": "cpu",
             "update": "cpu",
             "gputasks": "00"
         },
         {
             **self.expected_base, "ntmpi": 1,
             "ntomp": 4,
             "nb": "gpu",
             "bonded": "cpu",
             "pme": "cpu",
             "update": "cpu",
             "gputasks": "0"
         },
     ]
     self.assertCountEqual(result, expected)
 def setUp(self) -> None:
     self._default_options: cg.GenerateOptions = cg.GenerateOptions(
         generate_exhaustive_options=True, max_sims_per_gpu=4)