Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
fa95b493
Commit
fa95b493
authored
18 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Tweak code to determine CPU count on node.
parent
081d91a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/expect/test1.84
+11
-2
11 additions, 2 deletions
testsuite/expect/test1.84
testsuite/expect/test18.29
+2
-1
2 additions, 1 deletion
testsuite/expect/test18.29
with
13 additions
and
3 deletions
testsuite/expect/test1.84
+
11
−
2
View file @
fa95b493
...
@@ -53,7 +53,7 @@ if {[test_multiple_slurmd] != 0} {
...
@@ -53,7 +53,7 @@ if {[test_multiple_slurmd] != 0} {
}
}
make_bash_script $file_in "
make_bash_script $file_in "
env | grep SLURM_
JOB_
CPUS_
PER
_NODE
env | grep SLURM_CPUS_
ON
_NODE
$bin_hostname"
$bin_hostname"
#
#
...
@@ -67,12 +67,16 @@ set timeout $max_job_delay
...
@@ -67,12 +67,16 @@ set timeout $max_job_delay
set node_cnt 1
set node_cnt 1
set task_cnt 1
set task_cnt 1
spawn $srun -N$node_cnt --cpus-per-task=$task_cnt -l -t1 $
bin_hostname
spawn $srun -N$node_cnt --cpus-per-task=$task_cnt -l -t1 $
file_in
expect {
expect {
-re "Granted job allocation ($number)" {
-re "Granted job allocation ($number)" {
set job_id $expect_out(1,string)
set job_id $expect_out(1,string)
exp_continue
exp_continue
}
}
-re "SLURM_CPUS_ON_NODE=($number)" {
set cpus_per_node $expect_out(1,string)
exp_continue
}
-re "($number): ($alpha_numeric)" {
-re "($number): ($alpha_numeric)" {
set task $expect_out(1,string)
set task $expect_out(1,string)
set host $expect_out(2,string)
set host $expect_out(2,string)
...
@@ -108,6 +112,11 @@ if {[string compare $host ""] == 0} {
...
@@ -108,6 +112,11 @@ if {[string compare $host ""] == 0} {
send_user "\nFAILURE: Did not get hostname\n"
send_user "\nFAILURE: Did not get hostname\n"
exit 1
exit 1
}
}
if {$cpus_per_node != $cpu_count} {
send_user "FAILURE: should have run $cpus_per_node tasks (one per CPU) "
send_user "instead of $cpu_count tasks\n"
exit 1
}
if {$cpu_count < 2} {
if {$cpu_count < 2} {
send_user "\nWARNING: The node only has one CPU\n"
send_user "\nWARNING: The node only has one CPU\n"
exit $exit_code
exit $exit_code
...
...
This diff is collapsed.
Click to expand it.
testsuite/expect/test18.29
+
2
−
1
View file @
fa95b493
...
@@ -118,7 +118,8 @@ if {[string compare $host ""] == 0} {
...
@@ -118,7 +118,8 @@ if {[string compare $host ""] == 0} {
exit 1
exit 1
}
}
if {$cpus_per_node != $cpu_count} {
if {$cpus_per_node != $cpu_count} {
send_user "FAILURE: should have run $cpus_per_node tasks (one per CPU) instead of $cpu_count tasks\n"
send_user "FAILURE: should have run $cpus_per_node tasks (one per CPU) "
send_user "instead of $cpu_count tasks\n"
exit 1
exit 1
}
}
if {$cpus_per_node < 2} {
if {$cpus_per_node < 2} {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment