From 552df251dee2ee6fbea07e1447f1137822d40e5a Mon Sep 17 00:00:00 2001 From: anton-seaice Date: Wed, 4 Sep 2024 09:42:04 +1000 Subject: [PATCH] PEP --- test/models/access-om3/test_access_om3.py | 62 +++++++++++------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/test/models/access-om3/test_access_om3.py b/test/models/access-om3/test_access_om3.py index f42ebf83..610b238e 100644 --- a/test/models/access-om3/test_access_om3.py +++ b/test/models/access-om3/test_access_om3.py @@ -98,17 +98,17 @@ def get(self, section, variable, value=None): @pytest.mark.parametrize("ncpu, moc_ntasks, moc_nthreads, moc_pestride, moc_rootpe", [ - (1, 1, 1, 1, 0), #min - (4, 4, 1, 1, 0), #min tasks - (4, 2, 2, 2, 0), #min tasks * threads - (4, 2, 1, 1, 2), #min tasks + rootpe - (4, 1, 2, 2, 2), #min threads + rootpe - (4, 1, 1, 1, 3), #max rootpe - (5, 2, 1, 4, 0), #max stride - (13, 4, 1, 3, 1), #odd ncpu - (13, 2, 3, 3, 1), #odd ncpu - (100000, 50000, 1, 2, 0), #max cpu - (100000, 1, 1, 1, 99999), #max cpu + (1, 1, 1, 1, 0), # min + (4, 4, 1, 1, 0), # min tasks + (4, 2, 2, 2, 0), # min tasks * threads + (4, 2, 1, 1, 2), # min tasks + rootpe + (4, 1, 2, 2, 2), # min threads + rootpe + (4, 1, 1, 1, 3), # max rootpe + (5, 2, 1, 4, 0), # max stride + (13, 4, 1, 3, 1), # odd ncpu + (13, 2, 3, 3, 1), # odd ncpu + (100000, 50000, 1, 2, 0), # max cpu + (100000, 1, 1, 1, 99999), # max cpu ]) def test__setup_checks_npes(ncpu, moc_ntasks, moc_nthreads, moc_pestride, moc_rootpe): @@ -137,16 +137,16 @@ def test__setup_checks_npes(ncpu, moc_ntasks, moc_nthreads, moc_pestride, moc_ro @pytest.mark.parametrize("ncpu, moc_ntasks, moc_nthreads, moc_pestride, moc_rootpe", [ - (1, 1, 1, 1, 1), #min - (4, 5, 1, 1, 0), #min tasks - (4, 2, 2, 2, 1), #min tasks * threads - (2, 1, 2, 1, 1), #threads > strides - (4, 1, 3, 1, 2), #min threads + rootpe - (4, 1, 1, 1, 4), #max rootpe - (13, 4, 1, 4, 1), #odd ncpu - (13, 2, 7, 7, 0), #odd ncpu - (100000, 50001, 1, 2, 0), #max cpu - (100000, 1, 1, 1, 100000), #max cpu + (1, 1, 1, 1, 1), # min + (4, 5, 1, 1, 0), # min tasks + (4, 2, 2, 2, 1), # min tasks * threads + (2, 1, 2, 1, 1), # threads > strides + (4, 1, 3, 1, 2), # min threads + rootpe + (4, 1, 1, 1, 4), # max rootpe + (13, 4, 1, 4, 1), # odd ncpu + (13, 2, 7, 7, 0), # odd ncpu + (100000, 50001, 1, 2, 0), # max cpu + (100000, 1, 1, 1, 100000), # max cpu ]) def test__setup_checks_too_many_pes(ncpu, moc_ntasks, moc_nthreads, moc_pestride, moc_rootpe): @@ -176,12 +176,12 @@ def test__setup_checks_too_many_pes(ncpu, moc_ntasks, moc_nthreads, moc_pestride @pytest.mark.parametrize("ncpu, pio_numiotasks, pio_stride, pio_root, pio_typename", [ - (1, 1, 1, 0, "netcdf"), #min - (2, 1, 1, 1, "netcdf"), #max root - (2, 2, 1, 0, "netcdf4p"), #min tasks + rootpe - (2, 1, 1, 1, "netcdf4p"), #max rootpe + (1, 1, 1, 0, "netcdf"), # min + (2, 1, 1, 1, "netcdf"), # max root + (2, 2, 1, 0, "netcdf4p"), # min tasks + rootpe + (2, 1, 1, 1, "netcdf4p"), # max rootpe (5, 3, 2, 0, "netcdf4p"), - (100000, 50001, 1, 2, "netcdf4p"), #odd ncpu + (100000, 50001, 1, 2, "netcdf4p"), # odd ncpu ]) def test__setup_checks_io(ncpu, pio_numiotasks, pio_stride, pio_root, pio_typename): @@ -214,11 +214,11 @@ def test__setup_checks_io(ncpu, pio_numiotasks, pio_stride, pio_root, pio_typena @pytest.mark.parametrize("ncpu, pio_numiotasks, pio_stride, pio_root, pio_typename", [ (1, 1, 1, 0, "netcdf4c"), - (2, 1, 1, 2, "netcdf"), #root too big - (2, 3, 1, 0, "netcdf4p"), #too manu tasks - (2, 2, 2, 0, "netcdf4p"), #stride too big - (5, 2, 2, 3, "netcdf4p"), #stride too big - (100000, 50000, 2, 2, "netcdf4p"), #odd ncpu + (2, 1, 1, 2, "netcdf"), # root too big + (2, 3, 1, 0, "netcdf4p"), # too manu tasks + (2, 2, 2, 0, "netcdf4p"), # stride too big + (5, 2, 2, 3, "netcdf4p"), # stride too big + (100000, 50000, 2, 2, "netcdf4p"), # odd ncpu ]) def test__setup_checks_bad_io(ncpu, pio_numiotasks, pio_stride, pio_root, pio_typename):