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)
         n))

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

  (time
   (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 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to