Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Parallella, Supercomputing, and Ruby (Kenya)

Parallella, Supercomputing, and Ruby (Kenya)

Presented at RubyConf Kenya 2016. Updated to include information on FPGAs, the Porcupine expansion board, and the Raspberry Pi camera.

Ray Hightower

May 06, 2016
Tweet

More Decks by Ray Hightower

Other Decks in Technology

Transcript

  1. What can we do now that we could not do

    before?
 How do we show the difference visually?
  2. What can we do in parallel that we cannot do

    serially?
 How do we show the difference visually? Parallel: So what?
  3. If one ox could not do the job they did

    not try to grow a bigger ox, but used two oxen. When we need greater computer power, the answer is not to get a bigger computer, but to build systems of computers and operate them in parallel. -Grace Hopper
  4. Concurrency At least two threads are making progress. Parallelism At

    least two threads are executing simultaneously. Oracle Multithreaded Programming Guide http://docs.oracle.com/cd/E19455-01/806-5257/6je9h032b/index.html vs.
  5. 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4

    #include <time.h> 5 6 #define DEFAULT_MAX_TESTS 16000000 7 8 inline int isprime(unsigned long number) 9 { 10 unsigned long i; 11 unsigned long s = sqrt(number); 12 for(i=3;i<=s;i+=2) 13 { 14 if(number % i == 0) 15 return 0; 16 } 17 return 1; 18 } /* Copyright (c) Adapteva, contributed by M. Thompson with modifications by T. Malthouse. */
  6. 8 inline int isprime(unsigned long number) 9 { 10 unsigned

    long i; 11 unsigned long s = sqrt(number); 12 for(i=3;i<=s;i+=2) 13 { 14 if(number % i == 0) 15 return 0; 16 } 17 return 1; 18 } /* Copyright (c) Adapteva, contributed by M. Thompson with modifications by T. Malthouse. */
  7. 27 #include <e-hal.h> 28 29 // Default max number of

    prime tests per core 30 // Used if a limit it not provided in argv[1] 31 #define DEFAULT_MAX_TESTS 500000 32 33 int main(int argc, char *argv[]) 34 { 35 unsigned row, col, coreid, i, j; 36 e_platform_t platform; 37 e_epiphany_t dev; 38 /* Copyright (c) Adapteva, contributed by M. Thompson with modifications by T. Malthouse.*/
  8. Summary: Finding Primes 0" 50" 100" 150" 200" 250" Parallel

    Parallella Serial Mac Serial Parallella 18.6 sec 14.4 sec 237.1 sec ($2,000.00 Apple MacBook Pro) ($150.00 Parallella)
  9. •Finance: High-freq trading •Routers •Health care: MRIs, CAT scanners •Cell

    phone towers •Anything with lots of connections •HDMI interface on Parallella. FPGA Uses…
  10. Pine64 vs Parallella 4K video 4 cores 2GB RAM 2.5

    watts Full-size ports no FPGA $15 - $29 HDMI 18 cores (2 + 16) 1GB RAM 5 watts Micro-ports FPGA $99 - $150
  11. Pine64 vs Parallella 4K video 4 cores 2GB RAM 2.5

    watts Full-size ports Larger board $15 - $29 HDMI 18 cores (2 + 16) 1GB RAM 5 watts Micro-ports Smaller board $99 - $150 Winner? Depends on design goals.