Overview
Comment: | Added generic pool of cpus to batchsim |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
fb5d8213b7715e71cfe3846f08828f0f |
User & Date: | matt on 2015-05-11 05:13:27 |
Other Links: | branch diff | manifest | tags |
Context
2015-05-21
| ||
01:28 | cherrypicked a064 check-in: 50cc57039a user: matt tags: v1.60 | |
2015-05-11
| ||
17:06 | Fixed ezstep command execution where system default shell is tcsh check-in: 9b7efa961f user: mrwellan tags: v1.60_ezsteps_tcsh_fix | |
05:13 | Added generic pool of cpus to batchsim check-in: fb5d8213b7 user: matt tags: v1.60 | |
2015-05-07
| ||
18:09 | Capture missing fix check-in: a9aad76712 user: mrwellan tags: v1.60 | |
Changes
Modified batchsim/Makefile from [cb23d858e9] to [23dda389e9].
|
Modified batchsim/batchsim.scm from [5b100bed93] to [d5cdd008ec].
︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | 300 ;; start-y 300 ;; delta-y how far to next queue 15 ;; height 400 ;; length )) (define *use-log* #f) (define *job-log-scale* 10) ;;====================================================================== ;; CPU ;;====================================================================== (define-record cpu name num-cores mem job x y) ;;====================================================================== ;; CPU Pool ;;====================================================================== (define-record pool name x y w h gap boxw cpus delta nrows ncols cpunum) (define (new-pool name x y nrows ncols gap boxw) (let* ((delta (+ gap boxw)) ;; (nrows (quotient h (+ gap delta))) ;; (ncols (quotient w (+ gap delta))) (w (+ gap (* nrows delta))) (h (+ gap (* ncols delta))) (cpus (make-vector (* nrows ncols) #f)) (npool (make-pool name x y w h gap boxw cpus delta nrows ncols 0))) npool)) (define (pool:add-cpu pool name num-cores mem) (let* ((cpu (make-cpu name num-cores mem #f #f #f))) (vector-set! (pool-cpus pool)(pool-cpunum pool) cpu) (pool-cpunum-set! pool (+ 1 (pool-cpunum pool))) cpu)) (define (pool:draw ezx pool) (let ((nrows (pool-nrows pool)) (ncols (pool-ncols pool)) (x (pool-x pool)) (y (pool-y pool)) (w (pool-w pool)) (h (pool-h pool)) (gap (pool-gap pool)) (boxw (pool-boxw pool)) (delta (pool-delta pool)) (cpus (pool-cpus pool))) (ezx-select-layer ezx 1) ;(ezx-wipe-layer ezx 1) ;; draw time at upper right (ezx-str-2d ezx x y (pool-name pool) *black*) (ezx-rect-2d ezx x y (+ x w)(+ y h) *black* 1) (let loop ((row 0) (col 0) (cpunum 0)) (let* ((cpu (vector-ref cpus cpunum)) (xval (+ x gap (* row delta))) (yval (+ y gap (* col delta)))) (if cpu (begin (cpu-x-set! cpu xval) (cpu-y-set! cpu yval)) (vector-set! cpus cpunum (make-cpu (conc cpunum) 1 1 #f xval yval))) ;; (print "box at " xval ", " yval) (ezx-rect-2d ezx xval yval (+ xval boxw) (+ yval boxw) *grey* 1) (if (< col (- ncols 1)) (loop row (+ col 1)(+ cpunum 1)) (if (< row (- nrows 1)) (loop (+ row 1) 0 (+ cpunum 1)))))) (ezx-redraw ezx))) ;;====================================================================== ;; Users ;;====================================================================== (define *user-colors* (make-hash-table)) |
︙ |
Modified batchsim/default.scm from [9a8a9b1e46] to [6d3b9494d2].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | + + + + + + + + | ;; run sim for four hours ;; (define *end-time* (* 60 50)) ;; create the cpus ;; (let loop ((count 200)) (add-cpu (conc "cpu_" count) 1 1) (if (>= count 0)(loop (- count 1)))) (draw-cpus) (define *pool1* (new-pool "generic" 100 100 100 100 2 10)) (let loop ((count 10)) (pool:add-cpu *pool1* (conc count) 1 1) (if (> count 0) (loop (- count 1)))) (pool:draw *ezx* *pool1*) ;; init the queues ;; (hash-table-set! *queues* "normal" '()) (hash-table-set! *queues* "quick" '()) (draw-queues) |
︙ |
Added batchsim/testing.scm version [c6005591aa].