~ubuntu-branches/ubuntu/saucy/slurm-llnl/saucy

« back to all changes in this revision

Viewing changes to testsuite/expect/test12.2

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2008-05-30 13:11:30 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080530131130-l6ko6aie7xhrlmxe
Tags: 1.3.3-1
* New upstream release
* Removed patches to src/slurmctd/controller.c src/slurmdbd/slurmdbd.c
  doc/man/man1/sacctmgr.1 included to upstream
* Edited watch file to seek for 1.3 releases
* doc/man/man1/salloc.1 doc/man/man1/sbatch.1 doc/man/man5/slurm.conf.5
  patched to improve formatting and avoid manual warnings 

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
# Copyright (C) 2005 The Regents of the University of California.
11
11
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
12
12
# Written by Morris Jette <jette1@llnl.gov>
13
 
# UCRL-CODE-226842.
 
13
# LLNL-CODE-402394.
14
14
15
15
# This file is part of SLURM, a resource management program.
16
16
# For details, see <http://www.llnl.gov/linux/slurm/>.
55
55
#
56
56
# Check if accounting is enabled
57
57
#
58
 
set supported 0
 
58
set supported_gather  0
 
59
set supported_storage 1
59
60
log_user 0
60
61
spawn $scontrol show config
61
62
expect {
62
 
        -re "JobAcctType *= jobacct/linux" {
63
 
                set supported 1
64
 
                exp_continue
65
 
        }
66
 
        -re "JobAcctType *= jobacct/aix" {
67
 
                set supported 1
 
63
        -re "AccountingStorageType *= accounting_storage/none" {
 
64
                set supported_storage 0
 
65
                exp_continue
 
66
        }
 
67
        -re "JobAcctGatherType *= jobacct_gather/linux" {
 
68
                set supported_gather 1
 
69
                exp_continue
 
70
        }
 
71
        -re "JobAcctGatherType *= jobacct_gather/aix" {
 
72
                set supported_gather 1
68
73
                set aix 1
 
74
                send_user "AIX doesn't do a great job tracking memory usage,\n"
 
75
                send_user "as long as some memory number was\n"
 
76
                send_user "returned we are ok since users are looking for\n"
 
77
                send_user "mostly abnormalities between tasks instead\n"
 
78
                send_user "of actual memory usuage.\n"
69
79
                exp_continue
70
80
        }
71
81
        eof {
73
83
        }
74
84
}
75
85
log_user 1
76
 
if {$supported == 0} {
77
 
        send_user "\nWARNING: job accounting not configured on this system\n"
 
86
if {$supported_gather == 0} {
 
87
        send_user "\nWARNING: Job accounting information not gathered on this system\n"
 
88
        exit 0
 
89
}
 
90
if {$supported_storage == 0} {
 
91
        send_user "\nWARNING: Job accounting information not stored on this system\n"
78
92
        exit 0
79
93
}
80
94
 
95
109
# Usage: test12.2.prog <exit_code> <sleep_secs> <mem_kb>
96
110
#
97
111
set timeout [expr $max_job_delay + $sleep_time]
98
 
set srun_pid [spawn $srun --batch --output=$file_out --error=$file_err -t2 $file_in]
 
112
set sbatch_pid [spawn $sbatch --output=$file_out --error=$file_err -t2 $file_in]
99
113
expect {
100
 
        -re "jobid ($number) submitted" {
 
114
        -re "Submitted batch job ($number)" {
101
115
                set job_id $expect_out(1,string)
102
116
                exp_continue
103
117
        }
104
118
        timeout {
105
119
                send_user "\nFAILURE: srun not responding\n"
106
 
                slow_kill $srun_pid
 
120
                slow_kill $sbatch_pid
107
121
                exit 1
108
122
        }
109
123
        eof {
255
269
set error_time [expr abs($diff_time)]
256
270
if {$error_time > 5} {
257
271
        send_user "\nFAILURE: sacct elapsed time discrepancy of $error_time secs\n"
258
 
        send_user "  Wanted $sleep_time secs, got $error_time secs\n"
 
272
        send_user "  Wanted $sleep_time secs, got $elapsed_time secs\n"
259
273
        set exit_code 1
260
274
} else {
261
275
        send_user "\nSUCCESS: sacct elapsed time discrepancy of $error_time secs\n"