From 3be3ecff672cb1bd26eb84dc06b42664c801351a Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:14:26 -0700 Subject: [PATCH 1/7] t/data/resource/expected: override gitignore of *.out files .out is the suffix of the files contained in this data directory --- t/data/resource/expected/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 t/data/resource/expected/.gitignore diff --git a/t/data/resource/expected/.gitignore b/t/data/resource/expected/.gitignore new file mode 100644 index 000000000..7dd3260a6 --- /dev/null +++ b/t/data/resource/expected/.gitignore @@ -0,0 +1,2 @@ +# override ignore of *.out in top-level .gitignore +!*.out From 8d7c9352bde01665db9585e43542a32464392d9e Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:11:00 -0700 Subject: [PATCH 2/7] t/mt-storage: add storage-constrained tests for node-local storage Problem: previous multi-tier storage tests allocated compute and storage in the exact same ratio as found in the cluster. It is conceivable that these tests would pass under a scheduler that only respected compute constraints while ignoring IO constraints. Solution: add tests with jobspecs that request 2x storage of the existing tests to exhaust the storage resources before the compute ones Note: the node-local storage case is known in the tests as L0 --- .../L0/cmds-ssd-constrained-alloc-orelse.in | 13 + .../L0/cmds-ssd-constrained-alloc.in | 11 + .../resource/expected/mt-storage/L0/005.R.out | 152 +++++++++ .../resource/expected/mt-storage/L0/006.R.out | 296 ++++++++++++++++++ .../resource/expected/mt-storage/L0/007.R.out | 152 +++++++++ .../resource/expected/mt-storage/L0/008.R.out | 296 ++++++++++++++++++ .../mt-storage/L0/storage-constrained.yaml | 30 ++ t/t3018-resource-mtl0.t | 32 ++ 8 files changed, 982 insertions(+) create mode 100644 t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc-orelse.in create mode 100644 t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc.in create mode 100644 t/data/resource/expected/mt-storage/L0/005.R.out create mode 100644 t/data/resource/expected/mt-storage/L0/006.R.out create mode 100644 t/data/resource/expected/mt-storage/L0/007.R.out create mode 100644 t/data/resource/expected/mt-storage/L0/008.R.out create mode 100644 t/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml diff --git a/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc-orelse.in b/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc-orelse.in new file mode 100644 index 000000000..26a2c2777 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc-orelse.in @@ -0,0 +1,13 @@ +# 8x node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# ->ssd[2048] +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc.in b/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc.in new file mode 100644 index 000000000..9be25e227 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L0/cmds-ssd-constrained-alloc.in @@ -0,0 +1,11 @@ +# 5x node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# ->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml +quit diff --git a/t/data/resource/expected/mt-storage/L0/005.R.out b/t/data/resource/expected/mt-storage/L0/005.R.out new file mode 100644 index 000000000..f3a4dc7ff --- /dev/null +++ b/t/data/resource/expected/mt-storage/L0/005.R.out @@ -0,0 +1,152 @@ + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L0/006.R.out b/t/data/resource/expected/mt-storage/L0/006.R.out new file mode 100644 index 000000000..d7e81dfba --- /dev/null +++ b/t/data/resource/expected/mt-storage/L0/006.R.out @@ -0,0 +1,296 @@ + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L0/007.R.out b/t/data/resource/expected/mt-storage/L0/007.R.out new file mode 100644 index 000000000..a183fd902 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L0/007.R.out @@ -0,0 +1,152 @@ + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L0/008.R.out b/t/data/resource/expected/mt-storage/L0/008.R.out new file mode 100644 index 000000000..8bc46d8f6 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L0/008.R.out @@ -0,0 +1,296 @@ + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl0-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml b/t/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml new file mode 100644 index 000000000..2f2ff4ef2 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L0/storage-constrained.yaml @@ -0,0 +1,30 @@ +version: 1 +resources: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: ssd + count: 2048 + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/t3018-resource-mtl0.t b/t/t3018-resource-mtl0.t index 49e9c0120..aab716c66 100755 --- a/t/t3018-resource-mtl0.t +++ b/t/t3018-resource-mtl0.t @@ -41,4 +41,36 @@ test_expect_success "${test004_desc}" ' test_cmp 004.R.out ${exp_dir}/004.R.out ' +cmds005="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test005_desc="match allocate 5 jobs with 2TB L0 ssds - last one fails (pol=hi)" +test_expect_success "${test005_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds005} > cmds005 && + ${query} -L ${grugs} -S CA -P high -t 005.R.out < cmds005 && + test_cmp 005.R.out ${exp_dir}/005.R.out +' + +cmds006="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test006_desc="match allocate_orelse_reserve works with MTS L0 (pol=hi)" +test_expect_success "${test006_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds006} > cmds006 && + ${query} -L ${grugs} -S CA -P high -t 006.R.out < cmds006 && + test_cmp 006.R.out ${exp_dir}/006.R.out +' + +cmds007="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test007_desc="match allocate 5 jobs with 2TB L0 ssds - last one fails (pol=low)" +test_expect_success "${test007_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds007} > cmds007 && + ${query} -L ${grugs} -S CA -P low -t 007.R.out < cmds007 && + test_cmp 007.R.out ${exp_dir}/007.R.out +' + +cmds008="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test008_desc="match allocate_orelse_reserve works with MTS L0 (pol=low)" +test_expect_success "${test008_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds008} > cmds008 && + ${query} -L ${grugs} -S CA -P low -t 008.R.out < cmds008 && + test_cmp 008.R.out ${exp_dir}/008.R.out +' + test_done From 76b8b497bedb53fbf4c53b215b980a7a1dea4f21 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:15:49 -0700 Subject: [PATCH 3/7] t/mt-storage: add storage-constrained tests for rack-local storage Add storage-constrained tests -- tests with jobspecs that request 2x storage of the existing tests to exhaust the storage resources before the compute ones -- for the rack-local storage case, known in the tests as L1. --- .../L1/cmds-ssd-constrained-alloc-orelse.in | 13 + .../L1/cmds-ssd-constrained-alloc.in | 11 + .../resource/expected/mt-storage/L1/005.R.out | 158 +++++++++ .../resource/expected/mt-storage/L1/006.R.out | 308 ++++++++++++++++++ .../resource/expected/mt-storage/L1/007.R.out | 158 +++++++++ .../resource/expected/mt-storage/L1/008.R.out | 308 ++++++++++++++++++ .../mt-storage/L1/storage-constrained.yaml | 34 ++ t/t3019-resource-mtl1.t | 32 ++ 8 files changed, 1022 insertions(+) create mode 100644 t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc-orelse.in create mode 100644 t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc.in create mode 100644 t/data/resource/expected/mt-storage/L1/005.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/006.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/007.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/008.R.out create mode 100644 t/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml diff --git a/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc-orelse.in b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc-orelse.in new file mode 100644 index 000000000..b63702aae --- /dev/null +++ b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc-orelse.in @@ -0,0 +1,13 @@ +# 8x node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc.in b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc.in new file mode 100644 index 000000000..13f4a8cbf --- /dev/null +++ b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-alloc.in @@ -0,0 +1,11 @@ +# 5x node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml +quit diff --git a/t/data/resource/expected/mt-storage/L1/005.R.out b/t/data/resource/expected/mt-storage/L1/005.R.out new file mode 100644 index 000000000..d089418d6 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/005.R.out @@ -0,0 +1,158 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/006.R.out b/t/data/resource/expected/mt-storage/L1/006.R.out new file mode 100644 index 000000000..eb08821cb --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/006.R.out @@ -0,0 +1,308 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ------rack0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/007.R.out b/t/data/resource/expected/mt-storage/L1/007.R.out new file mode 100644 index 000000000..30cf5f2e2 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/007.R.out @@ -0,0 +1,158 @@ + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/008.R.out b/t/data/resource/expected/mt-storage/L1/008.R.out new file mode 100644 index 000000000..01de733bf --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/008.R.out @@ -0,0 +1,308 @@ + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml b/t/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml new file mode 100644 index 000000000..83d52fdb1 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L1/storage-constrained.yaml @@ -0,0 +1,34 @@ +version: 1 +resources: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: mtl1unit + count: 1 + with: + - type: ssd + count: 2048 + exclusive: true + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/t3019-resource-mtl1.t b/t/t3019-resource-mtl1.t index 865f3f814..251e62198 100755 --- a/t/t3019-resource-mtl1.t +++ b/t/t3019-resource-mtl1.t @@ -41,4 +41,36 @@ test_expect_success "${test004_desc}" ' test_cmp 004.R.out ${exp_dir}/004.R.out ' +cmds005="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test005_desc="match allocate 5 jobs with 2TB L1 ssds - last one fails (pol=hi)" +test_expect_success "${test005_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds005} > cmds005 && + ${query} -L ${grugs} -S CA -P high -t 005.R.out < cmds005 && + test_cmp 005.R.out ${exp_dir}/005.R.out +' + +cmds006="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test006_desc="match allocate_orelse_reserve works with MTS L1 (pol=hi)" +test_expect_success "${test006_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds006} > cmds006 && + ${query} -L ${grugs} -S CA -P high -t 006.R.out < cmds006 && + test_cmp 006.R.out ${exp_dir}/006.R.out +' + +cmds007="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test007_desc="match allocate 5 jobs with 2TB L1 ssds - last one fails (pol=low)" +test_expect_success "${test007_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds007} > cmds007 && + ${query} -L ${grugs} -S CA -P low -t 007.R.out < cmds007 && + test_cmp 007.R.out ${exp_dir}/007.R.out +' + +cmds008="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test008_desc="match allocate_orelse_reserve works with MTS L1 (pol=low)" +test_expect_success "${test008_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds008} > cmds008 && + ${query} -L ${grugs} -S CA -P low -t 008.R.out < cmds008 && + test_cmp 008.R.out ${exp_dir}/008.R.out +' + test_done From b370a7613d086a9803d1d930f2dc428e2e52bd43 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:17:28 -0700 Subject: [PATCH 4/7] t/mt-storage: add rack-locality tests for rack-local storage These tests explicity request that the rack-local SSDs and the compute nodes allocated to the job share the same rack. Previous tests allowed the SSDs and nodes to be on different racks. --- ...-ssd-constrained-same-rack-alloc-orelse.in | 13 + .../cmds-ssd-constrained-same-rack-alloc.in | 11 + .../resource/expected/mt-storage/L1/009.R.out | 156 +++++++++ .../resource/expected/mt-storage/L1/010.R.out | 304 ++++++++++++++++++ .../resource/expected/mt-storage/L1/011.R.out | 156 +++++++++ .../resource/expected/mt-storage/L1/012.R.out | 304 ++++++++++++++++++ .../L1/storage-constrained-same-rack.yaml | 37 +++ t/t3019-resource-mtl1.t | 34 ++ 8 files changed, 1015 insertions(+) create mode 100644 t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc-orelse.in create mode 100644 t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc.in create mode 100644 t/data/resource/expected/mt-storage/L1/009.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/010.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/011.R.out create mode 100644 t/data/resource/expected/mt-storage/L1/012.R.out create mode 100644 t/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml diff --git a/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc-orelse.in b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc-orelse.in new file mode 100644 index 000000000..0a4e99bdc --- /dev/null +++ b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc-orelse.in @@ -0,0 +1,13 @@ +# 8x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc.in b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc.in new file mode 100644 index 000000000..0dabea471 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L1/cmds-ssd-constrained-same-rack-alloc.in @@ -0,0 +1,11 @@ +# 5x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml +quit diff --git a/t/data/resource/expected/mt-storage/L1/009.R.out b/t/data/resource/expected/mt-storage/L1/009.R.out new file mode 100644 index 000000000..fd9b04b80 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/009.R.out @@ -0,0 +1,156 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/010.R.out b/t/data/resource/expected/mt-storage/L1/010.R.out new file mode 100644 index 000000000..e764423b7 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/010.R.out @@ -0,0 +1,304 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/011.R.out b/t/data/resource/expected/mt-storage/L1/011.R.out new file mode 100644 index 000000000..44fbf9955 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/011.R.out @@ -0,0 +1,156 @@ + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L1/012.R.out b/t/data/resource/expected/mt-storage/L1/012.R.out new file mode 100644 index 000000000..4412401bc --- /dev/null +++ b/t/data/resource/expected/mt-storage/L1/012.R.out @@ -0,0 +1,304 @@ + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---mtl1-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml b/t/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml new file mode 100644 index 000000000..8673f12e0 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L1/storage-constrained-same-rack.yaml @@ -0,0 +1,37 @@ +version: 1 +resources: + - type: rack + count: 1 + with: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: mtl1unit + count: 1 + with: + - type: ssd + count: 2048 + exclusive: true + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/t3019-resource-mtl1.t b/t/t3019-resource-mtl1.t index 251e62198..3a59cdc44 100755 --- a/t/t3019-resource-mtl1.t +++ b/t/t3019-resource-mtl1.t @@ -73,4 +73,38 @@ test_expect_success "${test008_desc}" ' test_cmp 008.R.out ${exp_dir}/008.R.out ' +cmds009="${cmd_dir}/cmds-ssd-constrained-same-rack-alloc.in" +test009_desc="match allocate 5 jobs with 2TB L1 ssds in same rack \ +- last one fails (pol=hi)" +test_expect_success "${test009_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds009} > cmds009 && + ${query} -L ${grugs} -S CA -P high -t 009.R.out < cmds009 && + test_cmp 009.R.out ${exp_dir}/009.R.out +' + +cmds010="${cmd_dir}/cmds-ssd-constrained-same-rack-alloc-orelse.in" +test010_desc="match allocate_orelse_reserve works with MTS L1 (pol=hi)" +test_expect_success "${test010_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds010} > cmds010 && + ${query} -L ${grugs} -S CA -P high -t 010.R.out < cmds010 && + test_cmp 010.R.out ${exp_dir}/010.R.out +' + +cmds011="${cmd_dir}/cmds-ssd-constrained-same-rack-alloc.in" +test011_desc="match allocate 5 jobs with 2TB L1 ssds in same rack \ +- last one fails (pol=low)" +test_expect_success "${test011_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds011} > cmds011 && + ${query} -L ${grugs} -S CA -P low -t 011.R.out < cmds011 && + test_cmp 011.R.out ${exp_dir}/011.R.out +' + +cmds012="${cmd_dir}/cmds-ssd-constrained-same-rack-alloc-orelse.in" +test012_desc="match allocate_orelse_reserve works with MTS L1 (pol=low)" +test_expect_success "${test012_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds012} > cmds012 && + ${query} -L ${grugs} -S CA -P low -t 012.R.out < cmds012 && + test_cmp 012.R.out ${exp_dir}/012.R.out +' + test_done From f668ca9455c999c7da19c525bccc70df16a4720e Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:15:49 -0700 Subject: [PATCH 5/7] t/mt-storage: add storage-constrained tests for global storage Add storage-constrained tests -- tests with jobspecs that request 2x storage of the existing tests to exhaust the storage resources before the compute ones -- for the global storage case, known in the tests as L2. --- .../L2/cmds-ssd-constrained-alloc-orelse.in | 13 + .../L2/cmds-ssd-constrained-alloc.in | 11 + .../resource/expected/mt-storage/L2/005.R.out | 156 +++++++++ .../resource/expected/mt-storage/L2/006.R.out | 304 ++++++++++++++++++ .../resource/expected/mt-storage/L2/007.R.out | 156 +++++++++ .../resource/expected/mt-storage/L2/008.R.out | 304 ++++++++++++++++++ .../mt-storage/L2/storage-constrained.yaml | 37 +++ t/t3020-resource-mtl2.t | 32 ++ 8 files changed, 1013 insertions(+) create mode 100644 t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc-orelse.in create mode 100644 t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc.in create mode 100644 t/data/resource/expected/mt-storage/L2/005.R.out create mode 100644 t/data/resource/expected/mt-storage/L2/006.R.out create mode 100644 t/data/resource/expected/mt-storage/L2/007.R.out create mode 100644 t/data/resource/expected/mt-storage/L2/008.R.out create mode 100644 t/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml diff --git a/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc-orelse.in b/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc-orelse.in new file mode 100644 index 000000000..6db172dc4 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc-orelse.in @@ -0,0 +1,13 @@ +# 8x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl2unit[1]->ssd[2048] +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc.in b/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc.in new file mode 100644 index 000000000..c789b8315 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L2/cmds-ssd-constrained-alloc.in @@ -0,0 +1,11 @@ +# 5x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl2unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml +quit diff --git a/t/data/resource/expected/mt-storage/L2/005.R.out b/t/data/resource/expected/mt-storage/L2/005.R.out new file mode 100644 index 000000000..30e201680 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L2/005.R.out @@ -0,0 +1,156 @@ + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L2/006.R.out b/t/data/resource/expected/mt-storage/L2/006.R.out new file mode 100644 index 000000000..3f664636b --- /dev/null +++ b/t/data/resource/expected/mt-storage/L2/006.R.out @@ -0,0 +1,304 @@ + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L2/007.R.out b/t/data/resource/expected/mt-storage/L2/007.R.out new file mode 100644 index 000000000..3d40e42b3 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L2/007.R.out @@ -0,0 +1,156 @@ + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L2/008.R.out b/t/data/resource/expected/mt-storage/L2/008.R.out new file mode 100644 index 000000000..609c9aa3b --- /dev/null +++ b/t/data/resource/expected/mt-storage/L2/008.R.out @@ -0,0 +1,304 @@ + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd0[512:x] + ---------ssd1[512:x] + ---------ssd2[512:x] + ---------ssd3[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=5 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node0[1:s] + ------rack0[1:s] + ---------ssd4[512:x] + ---------ssd5[512:x] + ---------ssd6[512:x] + ---------ssd7[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=6 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd8[512:x] + ---------ssd9[512:x] + ---------ssd10[512:x] + ---------ssd11[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=7 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---------ssd12[512:x] + ---------ssd13[512:x] + ---------ssd14[512:x] + ---------ssd15[512:x] + ------mtl2unit0[1:s] + ---mtl2-test0[1:s] +INFO: ============================= +INFO: JOBID=8 +INFO: RESOURCES=RESERVED +INFO: SCHEDULED AT=57600 +INFO: ============================= diff --git a/t/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml b/t/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml new file mode 100644 index 000000000..0cfeb9a45 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L2/storage-constrained.yaml @@ -0,0 +1,37 @@ +version: 1 +resources: + - type: rack + count: 1 + with: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: mtl2unit + count: 1 + with: + - type: ssd + count: 2048 + exclusive: true + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/t3020-resource-mtl2.t b/t/t3020-resource-mtl2.t index fdb3b1e13..0d33dfe7f 100755 --- a/t/t3020-resource-mtl2.t +++ b/t/t3020-resource-mtl2.t @@ -41,4 +41,36 @@ test_expect_success "${test004_desc}" ' test_cmp 004.R.out ${exp_dir}/004.R.out ' +cmds005="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test005_desc="match allocate 5 jobs with 2TB L1 ssds - last one fails (pol=hi)" +test_expect_success "${test005_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds005} > cmds005 && + ${query} -L ${grugs} -S CA -P high -t 005.R.out < cmds005 && + test_cmp 005.R.out ${exp_dir}/005.R.out +' + +cmds006="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test006_desc="match allocate_orelse_reserve works with MTS L1 (pol=hi)" +test_expect_success "${test006_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds006} > cmds006 && + ${query} -L ${grugs} -S CA -P high -t 006.R.out < cmds006 && + test_cmp 006.R.out ${exp_dir}/006.R.out +' + +cmds007="${cmd_dir}/cmds-ssd-constrained-alloc.in" +test007_desc="match allocate 5 jobs with 2TB L1 ssds - last one fails (pol=low)" +test_expect_success "${test007_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds007} > cmds007 && + ${query} -L ${grugs} -S CA -P low -t 007.R.out < cmds007 && + test_cmp 007.R.out ${exp_dir}/007.R.out +' + +cmds008="${cmd_dir}/cmds-ssd-constrained-alloc-orelse.in" +test008_desc="match allocate_orelse_reserve works with MTS L1 (pol=low)" +test_expect_success "${test008_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds008} > cmds008 && + ${query} -L ${grugs} -S CA -P low -t 008.R.out < cmds008 && + test_cmp 008.R.out ${exp_dir}/008.R.out +' + test_done From ac8e0f78dd617b6062c74394f167b867e7c3c2d2 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 18:15:49 -0700 Subject: [PATCH 6/7] t/mt-storage: add storage-constrained tests for hybrid storage Add storage-constrained tests -- tests with jobspecs that request 2x storage of the existing tests to exhaust the storage resources before the compute ones -- for the hybrid storage case, known in the tests as L3. --- .../L3/storage-constrained-global.in | 11 ++ .../mt-storage/L3/storage-constrained-mix.in | 16 ++ .../L3/storage-constrained-same-rack.in | 11 ++ .../resource/expected/mt-storage/L3/007.R.out | 156 +++++++++++++++++ .../resource/expected/mt-storage/L3/008.R.out | 160 ++++++++++++++++++ .../resource/expected/mt-storage/L3/009.R.out | 158 +++++++++++++++++ .../L3/storage-constrained-global.yaml | 40 +++++ .../L3/storage-constrained-same-rack.yaml | 37 ++++ t/t3021-resource-mtl3.t | 27 +++ 9 files changed, 616 insertions(+) create mode 100644 t/data/resource/commands/mt-storage/L3/storage-constrained-global.in create mode 100644 t/data/resource/commands/mt-storage/L3/storage-constrained-mix.in create mode 100644 t/data/resource/commands/mt-storage/L3/storage-constrained-same-rack.in create mode 100644 t/data/resource/expected/mt-storage/L3/007.R.out create mode 100644 t/data/resource/expected/mt-storage/L3/008.R.out create mode 100644 t/data/resource/expected/mt-storage/L3/009.R.out create mode 100644 t/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml create mode 100644 t/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml diff --git a/t/data/resource/commands/mt-storage/L3/storage-constrained-global.in b/t/data/resource/commands/mt-storage/L3/storage-constrained-global.in new file mode 100644 index 000000000..b893931f3 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L3/storage-constrained-global.in @@ -0,0 +1,11 @@ +# 5x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl2unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L3/storage-constrained-mix.in b/t/data/resource/commands/mt-storage/L3/storage-constrained-mix.in new file mode 100644 index 000000000..726a11a2f --- /dev/null +++ b/t/data/resource/commands/mt-storage/L3/storage-constrained-mix.in @@ -0,0 +1,16 @@ +# 3x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +# +# 2x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl2unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +quit diff --git a/t/data/resource/commands/mt-storage/L3/storage-constrained-same-rack.in b/t/data/resource/commands/mt-storage/L3/storage-constrained-same-rack.in new file mode 100644 index 000000000..8a1d5d0d5 --- /dev/null +++ b/t/data/resource/commands/mt-storage/L3/storage-constrained-same-rack.in @@ -0,0 +1,11 @@ +# 5x rack[1]->node[1]->slot[1]->socket[1]->core[18] +# ->gpu[2] +# ->memory[128] +# mtl1unit[1]->ssd[2048] +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +# this must fail to match +match allocate @TEST_SRCDIR@/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml +quit diff --git a/t/data/resource/expected/mt-storage/L3/007.R.out b/t/data/resource/expected/mt-storage/L3/007.R.out new file mode 100644 index 000000000..128a189aa --- /dev/null +++ b/t/data/resource/expected/mt-storage/L3/007.R.out @@ -0,0 +1,156 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L3/008.R.out b/t/data/resource/expected/mt-storage/L3/008.R.out new file mode 100644 index 000000000..caac48035 --- /dev/null +++ b/t/data/resource/expected/mt-storage/L3/008.R.out @@ -0,0 +1,160 @@ + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node2[1:s] + ------rack1[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/expected/mt-storage/L3/009.R.out b/t/data/resource/expected/mt-storage/L3/009.R.out new file mode 100644 index 000000000..ea066f3bf --- /dev/null +++ b/t/data/resource/expected/mt-storage/L3/009.R.out @@ -0,0 +1,158 @@ + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit1[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node3[1:s] + ------rack1[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=1 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core0[1:x] + ---------------core1[1:x] + ---------------core2[1:x] + ---------------core3[1:x] + ---------------core4[1:x] + ---------------core5[1:x] + ---------------core6[1:x] + ---------------core7[1:x] + ---------------core8[1:x] + ---------------core9[1:x] + ---------------core10[1:x] + ---------------core11[1:x] + ---------------core12[1:x] + ---------------core13[1:x] + ---------------core14[1:x] + ---------------core15[1:x] + ---------------core16[1:x] + ---------------core17[1:x] + ---------------gpu0[1:x] + ---------------gpu1[1:x] + ---------------memory0[32:x] + ---------------memory1[32:x] + ---------------memory2[32:x] + ---------------memory3[32:x] + ------------socket0[1:x] + ---------node3[1:s] + ------rack1[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit1[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=2 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ------------ssd4[512:x] + ------------ssd5[512:x] + ------------ssd6[512:x] + ------------ssd7[512:x] + ---------mtl1unit0[1:s] + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node1[1:s] + ------rack0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=3 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= + ---------------core18[1:x] + ---------------core19[1:x] + ---------------core20[1:x] + ---------------core21[1:x] + ---------------core22[1:x] + ---------------core23[1:x] + ---------------core24[1:x] + ---------------core25[1:x] + ---------------core26[1:x] + ---------------core27[1:x] + ---------------core28[1:x] + ---------------core29[1:x] + ---------------core30[1:x] + ---------------core31[1:x] + ---------------core32[1:x] + ---------------core33[1:x] + ---------------core34[1:x] + ---------------core35[1:x] + ---------------gpu2[1:x] + ---------------gpu3[1:x] + ---------------memory4[32:x] + ---------------memory5[32:x] + ---------------memory6[32:x] + ---------------memory7[32:x] + ------------socket1[1:x] + ---------node2[1:s] + ------rack1[1:s] + ------------ssd0[512:x] + ------------ssd1[512:x] + ------------ssd2[512:x] + ------------ssd3[512:x] + ---------mtl1unit0[1:s] + ------mtl2unit0[1:s] + ---mtl3-test0[1:s] +INFO: ============================= +INFO: JOBID=4 +INFO: RESOURCES=ALLOCATED +INFO: SCHEDULED AT=Now +INFO: ============================= +INFO: ============================= +INFO: No matching resources found +INFO: JOBID=5 +INFO: ============================= diff --git a/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml b/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml new file mode 100644 index 000000000..8b179ba35 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-global.yaml @@ -0,0 +1,40 @@ +version: 1 +resources: + - type: rack + count: 1 + with: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: mtl2unit + count: 1 + with: + - type: mtl1unit + count: 1 + with: + - type: ssd + count: 2048 + exclusive: true + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml b/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml new file mode 100644 index 000000000..681fe5e34 --- /dev/null +++ b/t/data/resource/jobspecs/mt-storage/L3/storage-constrained-same-rack.yaml @@ -0,0 +1,37 @@ +version: 1 +resources: + - type: rack + count: 1 + with: + - type: node + count: 1 + with: + - type: slot + label: default + count: 1 + with: + - type: socket + count: 1 + with: + - type: core + count: 18 + - type: gpu + count: 2 + - type: memory + count: 128 + - type: mtl1unit + count: 1 + with: + - type: ssd + count: 2048 + exclusive: true + +# a comment +attributes: + system: + duration: 57600 +tasks: + - command: [ "default" ] + slot: default + count: + per_slot: 1 diff --git a/t/t3021-resource-mtl3.t b/t/t3021-resource-mtl3.t index a218822cd..d57836022 100755 --- a/t/t3021-resource-mtl3.t +++ b/t/t3021-resource-mtl3.t @@ -57,4 +57,31 @@ test_expect_success "${test006_desc}" ' test_cmp 006.R.out ${exp_dir}/006.R.out ' +cmds007="${cmd_dir}/storage-constrained-same-rack.in" +test007_desc="match allocate 4 L1 storage-constrained jobs \ +- last one fails (pol=hi)" +test_expect_success "${test007_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds007} > cmds007 && + ${query} -L ${grugs} -S CA -P high -t 007.R.out < cmds007 && + test_cmp 007.R.out ${exp_dir}/007.R.out +' + +cmds008="${cmd_dir}/storage-constrained-global.in" +test008_desc="match allocate 4 L2 storage-constrained jobs \ +- last one fails (pol=hi)" +test_expect_success "${test008_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds008} > cmds008 && + ${query} -L ${grugs} -S CA -P high -t 008.R.out < cmds008 && + test_cmp 008.R.out ${exp_dir}/008.R.out +' + +cmds009="${cmd_dir}/storage-constrained-mix.in" +test009_desc="match allocate 4 L1+L2 storage-constrained jobs \ +- last one fails (pol=hi)" +test_expect_success "${test009_desc}" ' + sed "s~@TEST_SRCDIR@~${SHARNESS_TEST_SRCDIR}~g" ${cmds009} > cmds009 && + ${query} -L ${grugs} -S CA -P high -t 009.R.out < cmds009 && + test_cmp 009.R.out ${exp_dir}/009.R.out +' + test_done From fd805d078637ccaac3305b709c4e58f343e6c246 Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 21:06:40 -0700 Subject: [PATCH 7/7] configure: use newer tar format to support longer filenames Problem: when running `make distcheck`, the creation of a tarball fails due to filenames that are too long. This is because autotools defaults to the oldest, most compatible tar format (v7) which limits filename length to 99 characters. Solution: switch to a newer tar format (which is honestly still quite old - defined in the 1988 POSIX Standard) called `ustar` that supports filenames up to 256 characters in length. If this becomes a problem in the future, we can switch to `pax` which has no limits. Additionally, set the filename-length-max option so that the entire build fails rather than the tar silently failing to be created. Further Reading: - https://www.gnu.org/software/tar/manual/html_section/tar_67.html - https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html - https://noiselabs.io/tar-file-name-is-too-long-max-99/ --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 29da84521..face2a3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) -AM_INIT_AUTOMAKE([subdir-objects]) +AM_INIT_AUTOMAKE([subdir-objects tar-ustar filename-length-max=256]) AM_SILENT_RULES([yes]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE([enable])