At Fri, 5 Oct 2018 17:55:47 +0200, Paulo Matos wrote:
> Matthew, Sam, do you understand why this is happening?

I still think it's probably allocation, and probably specifically
content on the process's page table. Do you see different behavior with
a non-allocating variant (via `--no-alloc` below)?

We should certainly update the documentation with information about the
limits of parallelism via places.


#lang racket

(define (go n alloc?)
  (place/context p
                 (let ([v (vector (if alloc? 0.0 0))]
                       [inc (if alloc? 1.0 1)])
           (let loop ([i 3000000000])
             (unless (zero? i)
               (vector-set! v 0 (+ (vector-ref v 0) inc))
               (loop (sub1 i)))))
         (printf "Place ~a done~n" n)

(module+ main
  (define alloc? #t)
  (define cores
     [("--no-alloc") "Non-allocating variant" (set! alloc? #f)]
     #:args (cores)
     (string->number cores)))

   (map place-wait
        (for/list ([i (in-range cores)])
          (printf "Starting core ~a~n" i)
          (go i alloc?)))))

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

Reply via email to