Skip to content
Snippets Groups Projects
Commit 97917f17 authored by Morris Jette's avatar Morris Jette
Browse files

Merge branch 'slurm-2.3'

parents 1b17bb1a 2ca7416a
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,22 @@ if {[test_cray]} { ...@@ -52,6 +52,22 @@ if {[test_cray]} {
exit $exit_code exit $exit_code
} }
log_user 0
set job_mem_opt "--comment=no_mem"
set step_mem_opt "--comment=no_mem"
spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectTypeParameters"
expect {
-re "MEMORY" {
set job_mem_opt "--mem-per-cpu=32"
set step_mem_opt "--mem-per-cpu=1"
exp_continue
}
eof {
wait
}
}
log_user 1
# #
# Delete left-over input script plus stdout/err files # Delete left-over input script plus stdout/err files
# Build input script file # Build input script file
...@@ -65,7 +81,7 @@ exec $bin_rm -f $file_in $file_out $file_err ...@@ -65,7 +81,7 @@ exec $bin_rm -f $file_in $file_out $file_err
make_bash_script $file_in " make_bash_script $file_in "
for ((i = 0; i < $steps_started; i++)); do for ((i = 0; i < $steps_started; i++)); do
j=`expr $steps_started + 15 - \$i` j=`expr $steps_started + 15 - \$i`
$srun -N1 -n1 --mem-per-cpu=1 $bin_sleep \$j & $srun -N1 -n1 $step_mem_opt $bin_sleep \$j &
$bin_sleep 1 $bin_sleep 1
done done
$bin_sleep 2 $bin_sleep 2
...@@ -77,15 +93,18 @@ make_bash_script $file_in " ...@@ -77,15 +93,18 @@ make_bash_script $file_in "
# Spawn a srun batch job that uses stdout/err and confirm their contents # Spawn a srun batch job that uses stdout/err and confirm their contents
# #
set timeout $max_job_delay set timeout $max_job_delay
if { [test_xcpu] } { if { [test_xcpu] } {
set node_cnt 1-1 set node_cnt 1-1
} else { } else {
set node_cnt 1-4 set node_cnt 1-4
} }
set srun_pid [spawn $sbatch -N$node_cnt --output=$file_out --error=$file_err -t1 $file_in] set srun_pid [spawn $sbatch -N$node_cnt --output=$file_out --error=$file_err -t1 $job_mem_opt $file_in]
expect { expect {
-re "Requested node configuration is not available" {
send_user "\nFAILURE: Memory is allocated, but your nodes don't have even 32MB configured\n"
set exit_code 1
}
-re "Submitted batch job ($number)" { -re "Submitted batch job ($number)" {
set job_id $expect_out(1,string) set job_id $expect_out(1,string)
exp_continue exp_continue
......
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