update readme; add smp parameter

This commit is contained in:
xenia 2020-11-16 18:38:49 -05:00
parent bb3a422a57
commit d00abe5db9
2 changed files with 22 additions and 14 deletions

View File

@ -26,9 +26,9 @@ takes the difficulty out of creating custom brute force jobs
### base ### base
- 🚧 input space manipulation functions - 🚧 input space manipulation functions
- ✅ data types: interval, iset (interval set), pattern (vector of interval set) - ✅ data types: using data/integer-set, pattern (vector of integer-set)
- ✅ pos->iset-pos, iset-count, pattern-count - ✅ basic manipulation functions
- 🚧 partitioning functions - ✅ representation of input space as a flat integer
- 🚧 #lang for configuration/definitions - 🚧 #lang for configuration/definitions
- (input) mode - (input) mode
- stdio: user program gets input by stdio, integers separated by space, one per line - stdio: user program gets input by stdio, integers separated by space, one per line
@ -38,17 +38,17 @@ takes the difficulty out of creating custom brute force jobs
- SMP: performed by crossfire or performed by the user code - SMP: performed by crossfire or performed by the user code
- "performed by user code" can also mean GPU, for example - "performed by user code" can also mean GPU, for example
- 🚧 codegen for input generator (in C) - 🚧 codegen for input generator (in C)
- 🚧 stdio mode - stdio mode
- 🚧 callback mode - 🚧 callback mode
- success reporting mechanism - success reporting mechanism
- low priority: configurable "character" type -- currently a "character" is a uint64\_t - low priority: configurable "character" type -- currently a "character" is a uint64\_t
### server: distribute jobs to workers ### server: distribute jobs to workers
- base definitions of input classes and how to divide them - base definitions of input classes and how to divide them
- dynamic slicing and scheduling based on agents' reported work rate - dynamic slicing and scheduling based on agents' reported work rate
- low priority: randomized input space distribution - low priority: randomized input space distribution
- ability to compile input generator with different parameters and distribute to agents - accept submitted projects (with client-compiled input generator) and distribute to agents
- low priority: support for multiple architectures - low priority: support for multiple architectures
- ✅ agent authentication - ✅ agent authentication
- ✅ client authentication - ✅ client authentication
@ -66,6 +66,9 @@ takes the difficulty out of creating custom brute force jobs
- `crossfire new`: create new crossfire project - `crossfire new`: create new crossfire project
- `crossfire test`: test project locally, replicates configuration of server with single local - `crossfire test`: test project locally, replicates configuration of server with single local
agent to debug issues agent to debug issues
- low priority: `crossfire node-test`: submit a mini-task to a node that has the necessary
resources to debug issues
- `crossfire submit`: submit task to server - `crossfire submit`: submit task to server
- `crossfire cancel`: cancels submitted task
- `crossfire status`: check status of task (or network as a whole) - `crossfire status`: check status of task (or network as a whole)
- low priority: gui interface - low priority: gui interface (racket/gui & framework time)

View File

@ -40,7 +40,7 @@
;; manifest.rkt processing ;; manifest.rkt processing
(define (parse-manifest manifest-def) (define (parse-manifest manifest-def)
(struct manifest [name arch resources mode command isets pattern] #:transparent) (struct manifest [name arch resources smp mode command isets pattern] #:transparent)
(define-syntax (check-false stx) (define-syntax (check-false stx)
(syntax-case stx () (syntax-case stx ()
@ -51,12 +51,13 @@
(error "manifest attribute missing:" idsym)))])) (error "manifest attribute missing:" idsym)))]))
(define mf (define mf
(for/fold ([mf (manifest #f #f #f 'stdio #f builtin-isets #f)]) (for/fold ([mf (manifest #f '("any") '() #f 'stdio #f builtin-isets #f)])
([line (in-list manifest-def)]) ([line (in-list manifest-def)])
(match line (match line
[(list 'name name) (struct-copy manifest mf [name name])] [(list 'name name) (struct-copy manifest mf [name name])]
[(list 'arch arch ...) (struct-copy manifest mf [arch arch])] [(list 'arch arch ...) (struct-copy manifest mf [arch arch])]
[(list 'resources resources ...) (struct-copy manifest mf [resources resources])] [(list 'resources resources ...) (struct-copy manifest mf [resources resources])]
[(list 'smp smp) (struct-copy manifest mf [smp smp])]
[(list 'mode mode) (struct-copy manifest mf [mode mode])] [(list 'mode mode) (struct-copy manifest mf [mode mode])]
[(list 'command command) (struct-copy manifest mf [command command])] [(list 'command command) (struct-copy manifest mf [command command])]
[(list 'iset name val) [(list 'iset name val)
@ -87,19 +88,22 @@
[(list start end) (vector (range->integer-set start end))] [(list start end) (vector (range->integer-set start end))]
[_ (error "unrecognized pattern element in manifest" x)]))) [_ (error "unrecognized pattern element in manifest" x)])))
(values (manifest-name mf) (manifest-arch mf) (manifest-resources mf) (manifest-mode mf) (values (manifest-name mf) (manifest-arch mf) (manifest-resources mf) (manifest-smp mf)
(manifest-command mf) (apply vector-append patterns))) (manifest-mode mf) (manifest-command mf) (apply vector-append patterns)))
;; test code ;; test code
(define-values [name arch resources mode command pattern] (define-values [name arch resources smp mode command pattern]
(parse-manifest (parse-manifest
'((name "test") '((name "test")
;; supported arch triples ;; supported arch triples, or "any"
(arch "aarch64-unknown-linux-gnu" "aarch64-linux-gnu") (arch "aarch64-unknown-linux-gnu" "aarch64-linux-gnu")
;; required resources ;; required resources
(resources "hifive-board" "cuda") (resources "hifive-board" "cuda")
;; #t means crossfire will start one instance per CPU
;; #f means only one instance per node
(smp #f)
;; stdio or callback ;; stdio or callback
(mode stdio) (mode stdio)
;; command to start the brute force process ;; command to start the brute force process
@ -110,6 +114,7 @@
(pattern ?m "_?d")))) (pattern ?m "_?d"))))
(pattern-codegen pattern mode) (pattern-codegen pattern mode)
;; inclusive range
(define start (resolve-pattern-pos pattern (pos->pattern-pos pattern 10))) (define start (resolve-pattern-pos pattern (pos->pattern-pos pattern 10)))
(define end (resolve-pattern-pos pattern (pos->pattern-pos pattern 21))) (define end (resolve-pattern-pos pattern (pos->pattern-pos pattern 21)))
(printf "// args: ") (printf "// args: ")