2024-10-22 09:16:41 +02:00
|
|
|
import unittest
|
|
|
|
import logging
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
class ClusterBenchTestCase(unittest.TestCase):
|
|
|
|
|
|
|
|
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
|
|
|
|
|
def setUp(self) -> None: # pylint: disable=useless-parent-delegation
|
|
|
|
return super().setUp()
|
|
|
|
|
|
|
|
def test_clusterbench_submit(self):
|
|
|
|
logging.info('test_clusterbench_submit')
|
2024-10-22 17:32:35 +02:00
|
|
|
subprocess.run('pip list', shell=True, check=True, executable='/bin/bash')
|
2024-10-22 09:16:41 +02:00
|
|
|
command = 'clusterbench-submit --arch-regexp "intel_core.*" --benchmark-id \'mamul1\' --config \'{"compiler_id": "gfortran", "matrix_size": 1024, "num_loops":10}\' --results-dir /tmp/mamul1_out'
|
|
|
|
subprocess.run(command, shell=True, check=True, executable='/bin/bash')
|
|
|
|
|
|
|
|
# def test_clusterbench_hibench(self):
|
|
|
|
# logging.info('test_clusterbench_hibench')
|
|
|
|
# command = 'clusterbench-submit --benchmark-id \'hibench\' --config \'{"compiler_id": "gfortran", "test_id": "arch4_quick"}\' --results-dir /tmp/mamul1_out'
|
|
|
|
# subprocess.run(command, shell=True, check=True, executable='/bin/bash')
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|