Coverage for gpaw/benchmark/niflheim-myqueue.py: 38%

13 statements  

« prev     ^ index     » next       coverage.py v7.7.1, created at 2025-07-14 00:18 +0000

1from gpaw.benchmark import benchmark_main, get_benchmarks 

2from pathlib import Path 

3from os import getcwd 

4 

5platforms = [('xeon24el8_test', 24, 24, 0, '10m'), 

6 ('a100', 8, 1, 1, '1h'), 

7 ('a100', 128, 4, 4, '1h'), 

8 ('sm3090el8', 8, 1, 1, '1h'), 

9 ('epyc96', 96, 96, 0, '2h'), 

10 ('epyc96', 96 * 2, 96 * 2, 0, '4h')] 

11 

12 

13def workflow(): 

14 from myqueue.workflow import run 

15 path = Path(getcwd()) 

16 for partition, ncores, nprocs, ngpus, time in platforms: 

17 for benchmark in get_benchmarks( 

18 cores=nprocs, memory='10000G', gpus=ngpus): 

19 (path / f'{partition}-{nprocs}').mkdir(exist_ok=True) 

20 run(function=benchmark_main, args=(benchmark,), 

21 nodename=partition, cores=ncores, processes=nprocs, 

22 gpus=ngpus, tmax=time, 

23 name=f'{benchmark}-{partition}-{nprocs}', 

24 folder=f'{partition}-{nprocs}') 

25 if ngpus == 0: 

26 run(function=benchmark_main, args=(f'{benchmark}#old',), 

27 nodename=partition, cores=ncores, processes=nprocs, 

28 gpus=ngpus, tmax=time, 

29 name=f'{benchmark}-{partition}-{nprocs}-old', 

30 folder=f'{partition}-{nprocs}')