Skip to content
Snippets Groups Projects
Commit cdc92fa2 authored by Michael Hinton's avatar Michael Hinton Committed by Morris Jette
Browse files

gres.conf ignore lines now only need Name and File fields

Update GRES docs regarding ignore records and links.
Update tests to get rid of extra fields for GRES ignores lines.
Add tests to check for improved ignore syntax.
Test the gres.conf examples.
Add mps to regression slurm.conf, to test mps record parsing.

Bug 5520
parent e6318e30
No related branches found
No related tags found
No related merge requests found
......@@ -23,10 +23,11 @@ of the command "scontrol reconfigure" unless otherwise noted.
.LP
For "GresTypes=gpu", by default Slurm will use all GPUs detected on the system
at slurmd daemon startup. To ignore specific GPUs, simply specify a GRES gpu line with
\fBIgnore=true\fR. Alternatively, you can choose to specify only the explicit
GPUs you want to use. If you do this, other lines with "Ignore=true" are of no
effect.
at slurmd daemon startup. To ignore specific GPUs, simply specify
\fBIgnore=true\fR along with \fBName\fR (=gpu) and \fBFile\fR.
Alternatively, you can choose to specify only the explicit
GPUs you want to use. If you do this, other lines with \fBIgnore=true\fR are of
no effect.
.LP
CUDA Multi-Process Service (MPS) provides a mechanism where GPUs can be
......@@ -219,11 +220,11 @@ Name=mps Count=100 File=/dev/nvidia1 COREs=2,3
.br
##################################################################
.br
Name=gpu Type=gtx560 File=/dev/nvidia0 COREs=0,1 Ignore=true Links=\-1,2,0
Name=gpu File=/dev/nvidia0 Ignore=true
.br
Name=gpu Type=tesla File=/dev/nvidia1 COREs=2,3 Ignore=true Links=2,\-1,1
Name=gpu File=/dev/nvidia1 Ignore=true
.br
Name=gpu Type=tesla File=/dev/nvidia2 COREs=2,3 Ignore=true Links=0,1,\-1
Name=gpu File=/dev/nvidia2 Ignore=true
.LP
.br
......@@ -250,7 +251,7 @@ Name=gpu Type=tesla File=/dev/nvidia3 COREs=2,3
.br
# Slurm's Generic Resource (GRES) configuration file
.br
## Use a single gres.conf file for all compute nodes
## Use a single gres.conf file for all compute nodes \- positive method
.br
##################################################################
.br
......@@ -266,16 +267,26 @@ NodeName=tux3 Name=gpu File=/dev/nvidia[0,2\-3]
.br
NodeName=tux[4\-15] Name=gpu File=/dev/nvidia[0\-3]
.br
.LP
.br
##################################################################
.br
# Slurm's Generic Resource (GRES) configuration file
.br
## Use a single gres.conf file for all compute nodes \- negative method
.br
##################################################################
.br
## Ignore select system-detected devices on nodes tux16-tux31
## Ignore select system-detected devices on nodes tux0\-tux15
.br
NodeName=tux18 Name=gpu File=/dev/nvidia[1\-2] Ignore=true
NodeName=tux0 Name=gpu File=/dev/nvidia[1\-2] Ignore=true
.br
NodeName=tux[19,25,28] Name=gpu File=/dev/nvidia3 Ignore=true
NodeName=tux[4,9,12] Name=gpu File=/dev/nvidia3 Ignore=true
.br
NodeName=tux29 Name=gpu File=/dev/nvidia[0,4] Ignore=true
NodeName=tux13 Name=gpu File=/dev/nvidia[0,4] Ignore=true
.br
NodeName=tux31 Name=gpu File=/dev/nvidia0 Ignore=true
NodeName=tux15 Name=gpu File=/dev/nvidia0 Ignore=true
.br
......
......@@ -1465,9 +1465,12 @@ static void _merge_device_into_list(List gres_list, gres_slurmd_conf_t *device)
}
/*
* Add GRES record and device to list out only if it doesn't exist already in
* list_out.
* Add GRES record and device to gres_list_out only if it doesn't exist already
* in gres_list_out.
* Also, only adds records that are NOT ignored
*
* gres_list_out (OUT) The list to add to
* gres_record (IN) The record to add
*/
static void _add_unique_gres_to_list(List gres_list_out,
gres_slurmd_conf_t *gres_record)
......@@ -1505,43 +1508,50 @@ static void _add_unique_gres_to_list(List gres_list_out,
}
/*
* Add all unique, unignored devices specified by the GRES records in list in
* only if they don't already exist in list out.
* Also checks to make sure list in doesn't add any records to list out that are
* specifically ignored in list compare.
* Add all unique, unignored devices specified by the GRES records in
* gres_list_in only if they don't already exist in gres_list_out.
* Also checks to make sure gres_list_in doesn't add any records to
* gres_list_out that are specifically ignored in gres_list_ignore.
* I.e.:
* gres_list_out = gres_list_in & (~gres_list_ignore)
*
* gres_list_out (OUT) The output GRES list
* gres_list_ignore (IN) A list of GRES ignore records that will apply
* against gres_list_in
* gres_list_in (IN) A list of GRES records to add
*/
static void _add_unique_gres_list_to_list_compare(List gres_list_out,
List gres_list_compare,
List gres_list_in)
static void _add_unique_gres_list_to_list_ignore(List gres_list_out,
List gres_list_ignore,
List gres_list_in)
{
ListIterator itr;
gres_slurmd_conf_t *gres_record;
gres_slurmd_conf_t *gres_compare;
gres_slurmd_conf_t *gres_in;
gres_slurmd_conf_t *gres_ignore;
if (!gres_list_in || list_is_empty(gres_list_in))
return;
itr = list_iterator_create(gres_list_in);
while ((gres_record = list_next(itr))) {
while ((gres_in = list_next(itr))) {
// Make sure current device isn't ignored in list compare
gres_compare = _device_exists_in_list(gres_list_compare,
gres_record);
if (gres_compare && gres_compare->ignore) {
gres_ignore = _device_file_exists_in_list(gres_list_ignore,
gres_in);
if (gres_ignore && gres_ignore->ignore) {
debug3("This GRES device:");
_print_gres_conf(gres_record, LOG_LEVEL_DEBUG3);
_print_gres_conf(gres_in, LOG_LEVEL_DEBUG3);
debug3("is ignored by this record:");
_print_gres_conf(gres_compare, LOG_LEVEL_DEBUG3);
_print_gres_conf(gres_ignore, LOG_LEVEL_DEBUG3);
continue;
}
_add_unique_gres_to_list(gres_list_out, gres_record);
_add_unique_gres_to_list(gres_list_out, gres_in);
}
list_iterator_destroy(itr);
}
/*
* Add all unique, unignored devices specified by the GRES records in list in
* only if they don't already exist in list out.
* Add all unique, unignored devices specified by the GRES records in
* gres_list_in only if they don't already exist in gres_list_out.
*/
static void _add_unique_gres_list_to_list(List gres_list_out,
List gres_list_in)
......@@ -1571,8 +1581,6 @@ static void _add_unique_gres_list_to_list(List gres_list_out,
* NOTES:
* gres_list_conf_single: Same as gres_list_conf, except broken down so each
* GRES record has only one device file.
* gres_list_final: The final normalized and compressed gres.conf list to be
* returned in the gres_list_conf list pointer.
*
* Remember, this code is run for each node on the cluster
* The records need to be unique, keyed off of:
......@@ -1584,7 +1592,7 @@ static void _normalize_gres_conf(List gres_list_conf, List gres_list_system)
{
ListIterator itr_conf, itr_single, itr_system;
gres_slurmd_conf_t *gres_record;
List gres_list_conf_single, gres_list_final, non_gpu_list;
List gres_list_conf_single, gres_list_gpu, gres_list_non_gpu;
bool use_system_detected = true;
bool log_zero = true;
......@@ -1595,8 +1603,8 @@ static void _normalize_gres_conf(List gres_list_conf, List gres_list_system)
}
gres_list_conf_single = list_create(_delete_gres_list);
gres_list_final = list_create(_delete_gres_list);
non_gpu_list = list_create(_delete_gres_list);
gres_list_gpu = list_create(_delete_gres_list);
gres_list_non_gpu = list_create(_delete_gres_list);
debug2("gres_list_conf:");
_print_gres_list(gres_list_conf, LOG_LEVEL_DEBUG2);
......@@ -1612,7 +1620,7 @@ static void _normalize_gres_conf(List gres_list_conf, List gres_list_system)
if (xstrcasecmp(gres_record->name, "gpu")) {
debug2("%s: preserving original `%s` GRES record",
__func__, gres_record->name);
_add_gres_to_list(non_gpu_list,
_add_gres_to_list(gres_list_non_gpu,
gres_record->name,
gres_record->count,
gres_record->cpu_cnt,
......@@ -1729,37 +1737,38 @@ static void _normalize_gres_conf(List gres_list_conf, List gres_list_system)
}
// Combine single device records into multiple device records
debug2("Adding unique unignored USER-SPECIFIED devices:");
_add_unique_gres_list_to_list(gres_list_final, gres_list_conf_single);
debug2("Adding unique USER-SPECIFIED devices:");
_add_unique_gres_list_to_list(gres_list_gpu, gres_list_conf_single);
// If gres.conf is empty or only ignored devices, fill with system info
if (use_system_detected) {
debug2("Adding unique unignored SYSTEM-DETECTED devices:");
_add_unique_gres_list_to_list_compare(gres_list_final,
gres_list_conf_single,
gres_list_system);
// gres_list_conf_single only contains ignore records here
_add_unique_gres_list_to_list_ignore(gres_list_gpu,
gres_list_conf_single,
gres_list_system);
}
debug2("gres_list_final:");
_print_gres_list(gres_list_final, LOG_LEVEL_DEBUG2);
debug2("gres_list_gpu:");
_print_gres_list(gres_list_gpu, LOG_LEVEL_DEBUG2);
/*
* Free old records in gres_list_conf
* Replace gres_list_conf with gres_list_final
* Replace gres_list_conf with gres_list_gpu
* Note: list_transfer won't work because lists don't have same delFunc
* Note: list_append_list won't work because delFunc is non-null
*/
list_flush(gres_list_conf);
while ((gres_record = list_pop(gres_list_final))) {
while ((gres_record = list_pop(gres_list_gpu))) {
list_append(gres_list_conf, gres_record);
}
while ((gres_record = list_pop(non_gpu_list))) {
while ((gres_record = list_pop(gres_list_non_gpu))) {
list_append(gres_list_conf, gres_record);
}
FREE_NULL_LIST(gres_list_conf_single);
FREE_NULL_LIST(gres_list_final);
FREE_NULL_LIST(non_gpu_list);
FREE_NULL_LIST(gres_list_gpu);
FREE_NULL_LIST(gres_list_non_gpu);
}
#ifdef HAVE_NVML
......
......@@ -35,8 +35,9 @@ set exit_code 0
set test_prog "test$test_id.prog"
set cfgdir "test${test_id}_configs"
set cfgpath "[pwd]/$cfgdir"
set nodename "test_node"
set nodename1 "different_node"
set nodename_base "tux"
set nodename "${nodename_base}0"
set nodename_diff "${nodename_base}1"
set test_ulong_prog "test$test_id.ulong"
# Assume unsigned long is 64 bits unless overwritten
set ulong_bits 64
......@@ -67,7 +68,7 @@ set slurm_conf "
# This file was autogenerated by test$test_id
ControlMachine=test_machine
ClusterName=test_cluster
GresTypes=gpu,nic,mic,tmpdisk
GresTypes=gpu,mps,nic,mic,tmpdisk
"
mkdir $cfgpath
......@@ -231,12 +232,12 @@ GRES_PARSABLE\[gpu\](2):tesla|4|2-3|(null)|${dev}\[3-4\]|
check_configuration 0 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 1 - Single ignore file in gres.conf;
# # Test 1 - Single ignore line in gres.conf
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=tesla File=${dev}\[3-4\] Cores=2-3 Ignore=true
Name=gpu File=${dev}\[3-4\] Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -272,6 +273,42 @@ GRES_PARSABLE\[gpu\](2):tesla|4|2-3|(null)|${dev}\[3-4\]|
"
check_configuration 2 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 3 - Test that ignore lines only care about Name and File
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
# Should be ignored, even with mismatching fields other than Name and File
Name=gpu File=${dev}1 Cores=0-1 Ignore=true
Name=gpu File=${dev}2 Links=-1,0 Ignore=true
Name=gpu File=${dev}3 Ignore=true
Name=gpu File=${dev}4 Cores=0-1 Links=-1,0 Ignore=true
Name=gpu File=${dev}7 Links=-1,1 Ignore=true
# Should be ignored with only Name and File
Name=gpu File=${dev}5 Ignore=true
# Should be ignored, even with matching fields
Name=gpu File=${dev}8 Cores=2-3 Links=0,-1 Ignore=true
# Device 6 and 0 will not be ignored
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
(null)|4|2-3|(null)|${dev}1
(null)|4|2-3|(null)|${dev}2
(null)|4|2-3|(null)|${dev}3
(null)|4|2-3|(null)|${dev}4
(null)|4|2-3|(null)|${dev}5
(null)|4|2-3|(null)|${dev}6
(null)|4|2-3|-1,0|${dev}7
(null)|4|2-3|0,-1|${dev}8
(null)|4|2-3|(null)|${dev}0
"
set expected_output "
GRES_PARSABLE\[gpu\](2):(null)|4|2-3|(null)|${dev}\[6,0\]|
"
check_configuration 3 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 4 - Different system devices detected; single devices merged
# ##############################################################################
......@@ -395,10 +432,10 @@ check_configuration 103 $gres_conf $fake_gpus_conf $expected_output
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=tesla File=${dev}1 Cores=0-3 Ignore=true
Name=tmpdisk Type=tesla File=${dev}2 Cores=0-3 Ignore=true
Name=nic Type=tesla File=${dev}3 Cores=0-3 Ignore=true
Name=mic Type=tesla File=${dev}4 Cores=0-3 Ignore=true
Name=gpu File=${dev}1 Ignore=true
Name=tmpdisk File=${dev}2 Ignore=true
Name=nic File=${dev}3 Ignore=true
Name=mic File=${dev}4 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -409,9 +446,9 @@ tesla|4|0-3|(null)|${dev}4
"
set expected_output "
GRES_PARSABLE\[gpu\](3):tesla|4|0-3|(null)|${dev}\[2-4\]|
GRES_PARSABLE\[tmpdisk\](1):tesla|4|0-3|(null)|${dev}2|IGNORE
GRES_PARSABLE\[nic\](1):tesla|4|0-3|(null)|${dev}3|IGNORE
GRES_PARSABLE\[mic\](1):tesla|4|0-3|(null)|${dev}4|IGNORE
GRES_PARSABLE\[tmpdisk\](1):(null)|4|(null)|(null)|${dev}2|IGNORE
GRES_PARSABLE\[nic\](1):(null)|4|(null)|(null)|${dev}3|IGNORE
GRES_PARSABLE\[mic\](1):(null)|4|(null)|(null)|${dev}4|IGNORE
"
check_configuration 104 $gres_conf $fake_gpus_conf $expected_output
......@@ -432,13 +469,13 @@ check_configuration 105 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 106 - Test ignore with NodeName when Name isn't specified
# # Test 106 - Test ignore with NodeName when Name is and isn't specified
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
NodeName=$nodename Name=gpu Type=tesla File=${dev}1 Cores=0-3 Ignore=true
NodeName=$nodename Type=tesla File=${dev}2 Cores=0-3 Ignore=true
NodeName=$nodename Name=gpu File=${dev}1 Ignore=true
NodeName=$nodename File=${dev}2 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -501,7 +538,7 @@ check_configuration 6 $gres_conf $fake_gpus_conf $expected_output
set gres_conf "
# This file was autogenerated by test$test_id
NodeName=$nodename1 Name=gpu Type=tesla File=${dev}1 Cores=0-3 Ignore=true
NodeName=$nodename_diff Name=gpu File=${dev}1 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -522,7 +559,7 @@ check_configuration 7 $gres_conf $fake_gpus_conf $expected_output
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=tesla File=${dev}\[1-4\] Cores=0-3
Name=gpu Type=tesla File=${dev}2 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}2 Ignore=true
"
set fake_gpus_conf ""
set expected_output "
......@@ -575,8 +612,8 @@ check_configuration 10 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf "
Name=gpu Type=tesla File=${dev}3 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}5 Cores=0-3 Ignore=true
Name=gpu File=${dev}3 Ignore=true
Name=gpu File=${dev}5 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -600,7 +637,7 @@ check_configuration 11 $gres_conf $fake_gpus_conf $expected_output
set gres_conf "
# This file was autogenerated by test$test_id
NodeName=$nodename Name=gpu Type=tesla File=${dev}2 Cores=0-3 Ignore=true
NodeName=$nodename Name=gpu File=${dev}2 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -620,11 +657,11 @@ check_configuration 12 $gres_conf $fake_gpus_conf $expected_output
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=tesla File=${dev}3 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}3 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}4 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}4 Cores=0-3 Ignore=true
Name=gpu Type=tesla File=${dev}\[3-4\] Cores=0-3 Ignore=true
Name=gpu File=${dev}3 Ignore=true
Name=gpu File=${dev}3 Ignore=true
Name=gpu File=${dev}4 Ignore=true
Name=gpu File=${dev}4 Ignore=true
Name=gpu File=${dev}\[3-4\] Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
......@@ -903,7 +940,8 @@ check_configuration 203 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf ""
set fake_gpus_conf "# This file was autogenerated by test$test_id
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|0|~zero|(null)|${dev}1
"
set expected_output "
......@@ -917,7 +955,8 @@ check_configuration 204 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf ""
set fake_gpus_conf "# This file was autogenerated by test$test_id
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|16|~one|(null)|${dev}1
"
set expected_output "
......@@ -931,7 +970,8 @@ check_configuration 205 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf ""
set fake_gpus_conf "# This file was autogenerated by test$test_id
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|4|~three|(null)|${dev}1
"
set expected_output "
......@@ -945,7 +985,8 @@ check_configuration 206 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf ""
set fake_gpus_conf "# This file was autogenerated by test$test_id
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|16|~half|(null)|${dev}1
"
set expected_output "
......@@ -958,8 +999,9 @@ check_configuration 207 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
set gres_conf ""
set fake_gpus_conf "# This file was autogenerated by test$test_id
# Special character to trigger testing bubble sort tests
set fake_gpus_conf "
# This file was autogenerated by test$test_id
# `b` is a special character to trigger testing bubble sort tests
b
"
set expected_output "
......@@ -968,8 +1010,6 @@ GRES_PARSABLE:succeeded
check_configuration 300 $gres_conf $fake_gpus_conf $expected_output
# TODO: What other tests should we add?
# Test more ignore scenarios
# Test more merge scenarios
# Make sure current gres.conf files still work as expected
# Test to make sure CPU affinity is correct? Machine vs abstract?
# Invalid CPU counts
......@@ -977,6 +1017,112 @@ check_configuration 300 $gres_conf $fake_gpus_conf $expected_output
# log_user 1
# ##############################################################################
# # Test 400 - Test examples in gres.conf docs
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=gtx560 File=${dev}0 COREs=0,1
Name=gpu Type=tesla File=${dev}1 COREs=2,3
Name=mps Count=100 File=${dev}0 COREs=0,1
Name=mps Count=100 File=${dev}1 COREs=2,3
"
set fake_gpus_conf ""
set expected_output "
GRES_PARSABLE\[gpu\](1):gtx560|4|0,1|(null)|${dev}0|
GRES_PARSABLE\[gpu\](1):tesla|4|2,3|(null)|${dev}1|
GRES_PARSABLE\[mps\](100):(null)|4|0,1|(null)|${dev}0|
GRES_PARSABLE\[mps\](100):(null)|4|2,3|(null)|${dev}1|
"
check_configuration 400 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 401 - Test examples in gres.conf docs
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu File=${dev}0 Ignore=true
Name=gpu File=${dev}1 Ignore=true
Name=gpu File=${dev}2 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|4|2,3|(null)|${dev}0
tesla|4|2,3|(null)|${dev}1
tesla|4|2,3|(null)|${dev}2
tesla|4|2,3|(null)|${dev}3
"
set expected_output "
GRES_PARSABLE\[gpu\](1):tesla|4|2,3|(null)|${dev}3|
"
check_configuration 401 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 402 - Test examples in gres.conf docs
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
Name=gpu Type=tesla File=${dev}\[0-1\] COREs=0,1
# NOTE: nvidia2 device is out of service
# Name=gpu Type=tesla File=${dev}\[2-3\] COREs=2,3
Name=gpu Type=tesla File=${dev}3 COREs=2,3
"
set fake_gpus_conf ""
set expected_output "
GRES_PARSABLE\[gpu\](2):tesla|4|0,1|(null)|${dev}\[0-1\]|
GRES_PARSABLE\[gpu\](1):tesla|4|2,3|(null)|${dev}3|
"
check_configuration 402 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 403 - Test examples in gres.conf docs
# # Note: ${nodename_base}0 == $nodename, so only that node 0's GRES
# # definitions will apply
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
## Explicitly specify devices on nodes ${nodename_base}0-${nodename_base}15
# NodeName=${nodename_base}\[0-15\] Name=gpu File=${dev}\[0-3\]
# NOTE: ${nodename_base}3 ${dev}1 device is out of service
NodeName=${nodename_base}\[0-2\] Name=gpu File=${dev}\[0-3\]
NodeName=${nodename_base}3 Name=gpu File=${dev}\[0,2-3\]
NodeName=${nodename_base}\[4-15\] Name=gpu File=${dev}\[0-3\]
"
set fake_gpus_conf ""
set expected_output "
GRES_PARSABLE\[gpu\](4):(null)|4|(null)|(null)|${dev}\[0-3\]|
"
check_configuration 403 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Test 404 - Test examples in gres.conf docs
# # Note: ${nodename_base}0 == $nodename, so only that node 0's GRES
# # definitions will apply
# ##############################################################################
set gres_conf "
# This file was autogenerated by test$test_id
## Ignore select system-detected devices on nodes ${nodename_base}0-${nodename_base}15
NodeName=${nodename_base}0 Name=gpu File=${dev}\[1-2\] Ignore=true
NodeName=${nodename_base}\[4,9,12\] Name=gpu File=${dev}3 Ignore=true
NodeName=${nodename_base}13 Name=gpu File=${dev}\[0,4\] Ignore=true
NodeName=${nodename_base}15 Name=gpu File=${dev}0 Ignore=true
"
set fake_gpus_conf "
# This file was autogenerated by test$test_id
tesla|4|(null)|(null)|${dev}0
tesla|4|(null)|(null)|${dev}3
"
set expected_output "
GRES_PARSABLE\[gpu\](2):tesla|4|(null)|(null)|${dev}\[0,3\]|
"
check_configuration 404 $gres_conf $fake_gpus_conf $expected_output
# ##############################################################################
# # Tests for expected failures
# ##############################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment