I want to parallelize some program using places, so actually using multiple
To parallelize as much as possible on any given machine, I'd like to know how
many cores + effect of hyperthreading there are.
For example I have a CPU with 2 cores, but it supports hyperthreading, so that
I can run 4 processes concurrently. The desired result would then be 4 instead
At the moment I have the following code, but don't know if this code is at all
reliable or a good practice:
(define (find-siblings remaining-core-info)
(cond [(empty? remaining-core-info) empty]
[(equal? (car (first remaining-core-info)) 'siblings)
(string->number (cdr (first remaining-core-info)))]
(displayln (car (first remaining-core-info)))
(find-siblings (rest remaining-core-info))]))
(find-siblings (car (get-cpuinfo))))
Then with the number of possible maximum number of concurrent processes, I want
to dynamically create places:
;; dynamically create places
([places (for/list ([i (in-range PLACES-COUNT)])
(dynamic-place "place-worker.rkt" 'place-main))]
[chunk-size (/ MAX PLACES-COUNT)])
;; give places work to do ...
So what is the best and most reliable way to figure out how many processes can
run concurrently? (I assume that is the same number as "How many places are
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.