lect05-omp-upc

lect05-omp-upc - Notes ! MPI project due next Wed., Sept....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CMSC 714 Lecture 5 OpenMP and UPC Alan Sussman 2 Notes ! MPI project due next Wed., Sept. 28 – note 1: some changes to environment setup in .cshrc file – note 2: board coordinates start at 0 – can ssh to brood00 through openlab.umiacs.umd.edu – Use new version of OpenMPI on cluster, to get fast communication ! Additional readings posted – don’t forget to send questions by 6PM day before ! For Thursday, guest lecturer – I’m out of town rest of week, but will be reading email 3 CMSC 714 - Alan Sussman & Jeffrey K. Hollingsworth OpenMP ! Support Parallelism for SMPs – provide a simple portable model – allows both shared and private data – provides parallel do loops ! Includes – automatic support for fork/join parallelism – reduction variables – atomic statement • one process executes at a time – single statement • only one process runs this code (first thread to reach it) 4 CMSC 714 - Alan Sussman & Jeffrey K. Hollingsworth OpenMP ! Characteristics – Both local & shared memory (depending on directives) – Parallelism : directives for parallel loops, functions – Compilers convert programs into multi-threaded (i.e. pthreads) – Not available on clusters ! Example #pragma omp parallel for private(i) for (i=0; i<NUPDATE; i++) { int ran = random(); table[ ran & (TABSIZE-1) ] ^= stable[ ran >> (64-LSTSIZE) ]; }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5 CMSC 714 - Alan Sussman & Jeffrey K. Hollingsworth More on OpenMP
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

lect05-omp-upc - Notes ! MPI project due next Wed., Sept....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online