Skip to content

Commit d89426a

Browse files
committed
Update core reduction logic test for MP
1 parent 80a3129 commit d89426a

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

arc/job/adapters/molpro_test.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ def setUpClass(cls):
6464
job_memory_gb=64,
6565
)
6666

67+
cls.job_5 = MolproAdapter(execution_type='queue',
68+
job_type='opt',
69+
level=Level(method='CCSD(T)', basis='cc-pVQZ'),
70+
project='test',
71+
project_directory=os.path.join(ARC_PATH, 'arc', 'testing', 'test_MolproAdapter_2'),
72+
species=[ARCSpecies(label='spc1', xyz=['O 0 0 1'])],
73+
testing=True,
74+
ess_trsh_methods=['memory','cpu', 'molpro_memory: 2800 '],
75+
job_memory_gb=64,
76+
)
77+
6778
def test_set_cpu_and_mem(self):
6879
"""Test assigning number of cpu's and memory"""
6980
self.job_1.cpu_cores = 48
@@ -165,12 +176,13 @@ def test_write_input_file(self):
165176
self.assertEqual(content_2, job_2_expected_input_file)
166177

167178
def test_core_reduction_logic(self):
168-
"""_summary_test_core_reduction_logic"""
179+
"""Test the core reduction logic"""
169180

170-
# Reactive Job 3 again to trigger the condition of the core reduction logic
171-
self.job_3.set_input_file_memory()
172-
self.assertEqual(self.job_3.input_file_memory, 4296)
173-
self.assertEqual(self.job_3.cpu_cores, 2)
181+
# Job 5 again to trigger the condition of the core reduction logic
182+
# Job 5 technically would be 3 CPUs prior to the reactive setting the input file memory.
183+
self.job_5.set_input_file_memory()
184+
self.assertEqual(self.job_5.input_file_memory, 4296)
185+
self.assertEqual(self.job_5.cpu_cores, 2)
174186

175187
def test_set_files(self):
176188
"""Test setting files"""

0 commit comments

Comments
 (0)