Docsity

A Parallel Approach to Circuit Satisfiability: CS 475 FA08, Study notes of Computer Science

Partial preview of the text

Download A Parallel Approach to Circuit Satisfiability: CS 475 FA08 and more Study notes Computer Science in PDF only on Docsity!

The First (pleasantly) Parallel

Program

Kaustubh Gadkari CS 475 FA

The Problem

โ— For what combination of inputs, is the output 1?

Partitioning

โ— Where is the parallelism? โ— In this problem, the parallelism is natural. โ— One task => one set of inputs. โ— All tasks are independent. โ— Therefore, all tasks can be performed in parallel.

Partitioning (contd.)

โ— Pleasantly parallel!

  • (^) No channels between tasks.

Cyclic Mapping

โ— Assume p processes. โ— Each process gets every p th piece of work.

  • (^) For n pieces of work (0,1, .. ,n1) to be assigned to p processes (0,p, .. ,p1), the k th piece of work is assigned to process k modulo p.

Cyclic Mapping (contd.)

  • For example, n = 20 and p = โ—
    • โ€“ P0: 0, 6, 12,
    • โ€“ P1: 1, 7, 13,
    • โ€“ P2: 2, 8,
    • โ€“ P3: 3, 9,
    • โ€“ P4: 4, 10,
    • โ€“ P5: 5, 11,

Tasks

โ— Login to bassi.nersc.gov. โ— Try running the first pleasantly parallel program.