diff options
| author | Mac Mollison <mollison@cs.unc.edu> | 2010-03-26 17:43:16 -0400 |
|---|---|---|
| committer | Mac Mollison <mollison@cs.unc.edu> | 2010-03-26 17:43:16 -0400 |
| commit | 7b18c0df5d1948a5910fc81bdfe874c2da143e76 (patch) | |
| tree | 22568f99a46a08c1482f720359bfdba01f06ee01 | |
| parent | 0dbfae10940c1c44bcf741e0cd096b1bfb761dc9 (diff) | |
Non-eligible job error message
| -rw-r--r-- | unit_trace/gedf_test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/unit_trace/gedf_test.py b/unit_trace/gedf_test.py index f3088ac..cf66142 100644 --- a/unit_trace/gedf_test.py +++ b/unit_trace/gedf_test.py | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | ############################################################################### | 9 | ############################################################################### |
| 10 | 10 | ||
| 11 | import copy | 11 | import copy |
| 12 | import sys | ||
| 12 | 13 | ||
| 13 | 14 | ||
| 14 | ############################################################################### | 15 | ############################################################################### |
| @@ -58,7 +59,13 @@ def gedf_test(stream): | |||
| 58 | # Move a Job from the eligible queue to on_cpu | 59 | # Move a Job from the eligible queue to on_cpu |
| 59 | elif record.type_name == 'switch_to': | 60 | elif record.type_name == 'switch_to': |
| 60 | pos = _find_job(record,eligible) | 61 | pos = _find_job(record,eligible) |
| 61 | job = eligible[pos] | 62 | try: |
| 63 | job = eligible[pos] | ||
| 64 | except TypeError: | ||
| 65 | msg = "Event %d tried to switch to a job that was not eligible\n" | ||
| 66 | msg = msg % (record.id) | ||
| 67 | sys.stderr.write(msg) | ||
| 68 | exit() | ||
| 62 | del eligible[pos] | 69 | del eligible[pos] |
| 63 | on_cpu.append(job) | 70 | on_cpu.append(job) |
| 64 | 71 | ||
