Parallel programming using OpenMP

Similar documents
HPC Practical Course Part 3.1 Open Multi-Processing (OpenMP)

Advanced C Programming Winter Term 2008/09. Guest Lecture by Markus Thiele

Lecture 4: OpenMP Open Multi-Processing

OpenMP 2. CSCI 4850/5850 High-Performance Computing Spring 2018

Introduction to. Slides prepared by : Farzana Rahman 1

Parallel and Distributed Programming. OpenMP

Q6B8xqZ8n8bwjGdzBJ25X2utwnoEG

Data Environment: Default storage attributes

EPL372 Lab Exercise 5: Introduction to OpenMP

Introduction to OpenMP.

COSC 6374 Parallel Computation. Introduction to OpenMP. Some slides based on material by Barbara Chapman (UH) and Tim Mattson (Intel)

OPENMP OPEN MULTI-PROCESSING

Programming with Shared Memory PART II. HPC Fall 2012 Prof. Robert van Engelen

OpenMP Introduction. CS 590: High Performance Computing. OpenMP. A standard for shared-memory parallel programming. MP = multiprocessing

Introduction to OpenMP

Distributed Systems + Middleware Concurrent Programming with OpenMP

Shared Memory Parallelism - OpenMP

by system default usually a thread per CPU or core using the environment variable OMP_NUM_THREADS from within the program by using function call

OpenMP C and C++ Application Program Interface Version 1.0 October Document Number

Programming with Shared Memory PART II. HPC Fall 2007 Prof. Robert van Engelen

HPCSE - I. «OpenMP Programming Model - Part I» Panos Hadjidoukas

Multithreading in C with OpenMP

Multi-core Architecture and Programming

OpenMP. OpenMP. Portable programming of shared memory systems. It is a quasi-standard. OpenMP-Forum API for Fortran and C/C++

Lecture 2 A Hand-on Introduction to OpenMP

CS 5220: Shared memory programming. David Bindel

OpenMP Algoritmi e Calcolo Parallelo. Daniele Loiacono

Shared Memory Parallelism using OpenMP

Introduction to OpenMP

Shared Memory Programming Paradigm!

Mango DSP Top manufacturer of multiprocessing video & imaging solutions.

1 of 6 Lecture 7: March 4. CISC 879 Software Support for Multicore Architectures Spring Lecture 7: March 4, 2008

COMP4300/8300: The OpenMP Programming Model. Alistair Rendell. Specifications maintained by OpenMP Architecture Review Board (ARB)

COMP4300/8300: The OpenMP Programming Model. Alistair Rendell

OpenMP Tutorial. Rudi Eigenmann of Purdue, Sanjiv Shah of Intel and others too numerous to name have contributed content for this tutorial.

Parallel Programming in C with MPI and OpenMP

OpenMP I. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS16/17. HPAC, RWTH Aachen

Introduction to OpenMP

OpenMP - II. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16. HPAC, RWTH Aachen

OpenMP. António Abreu. Instituto Politécnico de Setúbal. 1 de Março de 2013

Parallel Programming. OpenMP Parallel programming for multiprocessors for loops

Topics. Introduction. Shared Memory Parallelization. Example. Lecture 11. OpenMP Execution Model Fork-Join model 5/15/2012. Introduction OpenMP

Introduction to OpenMP

Session 4: Parallel Programming with OpenMP

Massimo Bernaschi Istituto Applicazioni del Calcolo Consiglio Nazionale delle Ricerche.

Shared Memory Programming Model

ECE 574 Cluster Computing Lecture 10

Review. Tasking. 34a.cpp. Lecture 14. Work Tasking 5/31/2011. Structured block. Parallel construct. Working-Sharing contructs.

High Performance Computing: Tools and Applications

OpenMP on Ranger and Stampede (with Labs)

Lecture 2 A Hand-on Introduction to OpenMP

Parallel Programming with OpenMP. CS240A, T. Yang

OpenMP 4. CSCI 4850/5850 High-Performance Computing Spring 2018

Overview: The OpenMP Programming Model

COSC 6374 Parallel Computation. Introduction to OpenMP(I) Some slides based on material by Barbara Chapman (UH) and Tim Mattson (Intel)

Programming with OpenMP*

Department of Informatics V. HPC-Lab. Session 2: OpenMP M. Bader, A. Breuer. Alex Breuer

CS691/SC791: Parallel & Distributed Computing

Parallel Programming in C with MPI and OpenMP

Shared memory parallel computing

OpenMP Fundamentals Fork-join model and data environment

Programming Shared Address Space Platforms using OpenMP

DPHPC: Introduction to OpenMP Recitation session

Parallel Programming. Exploring local computational resources OpenMP Parallel programming for multiprocessors for loops

Parallelising Scientific Codes Using OpenMP. Wadud Miah Research Computing Group

Data Handling in OpenMP

DPHPC: Introduction to OpenMP Recitation session

OpenMP Application Program Interface

CMSC 714 Lecture 4 OpenMP and UPC. Chau-Wen Tseng (from A. Sussman)

Alfio Lazzaro: Introduction to OpenMP

Parallel Programming using OpenMP

In-Class Guerrilla Development of MPI Examples

Parallel Programming using OpenMP

OpenMP - III. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS15/16. HPAC, RWTH Aachen

Introduction [1] 1. Directives [2] 7

Masterpraktikum - High Performance Computing

OpenMP. Diego Fabregat-Traver and Prof. Paolo Bientinesi WS16/17. HPAC, RWTH Aachen

Introduction to OpenMP. Martin Čuma Center for High Performance Computing University of Utah

Parallel Programming in C with MPI and OpenMP

CSL 860: Modern Parallel

Multicore Computing. Arash Tavakkol. Instructor: Department of Computer Engineering Sharif University of Technology Spring 2016

Introduction to Programming with OpenMP

OpenMP programming. Thomas Hauser Director Research Computing Research CU-Boulder

CS 470 Spring Mike Lam, Professor. OpenMP

Introduction to OpenMP. Martin Čuma Center for High Performance Computing University of Utah

Introduction to OpenMP

CS 470 Spring Mike Lam, Professor. OpenMP

Cluster Computing 2008

OpenMP examples. Sergeev Efim. Singularis Lab, Ltd. Senior software engineer

Shared Memory Programming Models I

OpenMP Language Features

15-418, Spring 2008 OpenMP: A Short Introduction

More Advanced OpenMP. Saturday, January 30, 16

PC to HPC. Xiaoge Wang ICER Jan 27, 2016

Shared Memory Programming with OpenMP

CS4961 Parallel Programming. Lecture 9: Task Parallelism in OpenMP 9/22/09. Administrative. Mary Hall September 22, 2009.

Chip Multiprocessors COMP Lecture 9 - OpenMP & MPI


How to use OpenMP within TiViPE

Introduction to OpenMP. Motivation

Transcription:

Parallel programming using OpenMP Computer Architecture J. Daniel García Sánchez (coordinator) David Expósito Singh Francisco Javier García Blas ARCOS Group Computer Science and Engineering Department University Carlos III of Madrid cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 1/49

Introduction 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 2/49

Introduction What is OpenMP? It is an language extension for expressing parallel applications in shared memory systems. Components: Compiler directives. Library functions. Environment variables. Simplifies the way of writing parallel programs. Mappings for FORTRAN, C and C++. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 3/49

Introduction Constructs Directives: #pragma omp directive [clause] Example: Setup the number of threads. #pragma omp parallel num_threads(4) Library functions: #include <omp.h> // Include to call OpenMP API functions Example: Get the number of threads in use. int n = omp_get_num_threads(); cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 4/49

Introduction Exercise 1: Sequential ex1seq.cpp #include <iostream> int main() { using namespace std; int id = 0; cout << "Hello(" << id << ") " ; cout << "World(" << id << ")" ; return 0; Print to standard output. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 5/49

Introduction Exercise 1: Parallel ex1par.cpp #include <iostream> #include <omp.h> int main() { using namespace std; #pragma omp parallel { int id = omp_get_thread_num(); cout << "Hola(" << id << ") " ; cout << "Mundo(" << id << ")"; Compiler flags: gcc: -fopenmp Intel Linux: -openmp Intel Windows: /Qopenmp Microsoft Visual Studio: /openmp return 0; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 6/49

Introduction Exercise 1 Goal: Verify you have a working environment. Activities: 1 Compile sequential version and run. 2 Compile parallel version and run. 3 Add a call to function omp_get_num_threads() to print the number of threads: a) Before the pragma. b) Just after pragma. c) Within the block. d) Before exiting the program, but outside the block. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 7/49

Introduction Observations A model for multi-threaded shared memory. Communication through shared variables. Accidental sharing race conditions. Result depending on threads scheduling. Avoiding race conditions. Synchronize to avoid conflicts. Cost of synchronizations. Modify access pattern. Minimize needed synchronizations. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 8/49

Threads in OpenMP 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 9/49

Threads in OpenMP Fork-join parallelism Sequential application with parallel sections: Master thread: Started with main program. A parallel section starts a thread set. Parallelism can be nested. A parallel region is a block marked with the parallel directive. #pragma omp parallel cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 10/49

Threads in OpenMP Selecting the number of threads Example Invoking a library function. //... omp_set_num_threads(4); #pragma omp parallel { // Parallel region Example OpenMP directive. //... #pragma omp parallel num_threads(4) { // Parallel region cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 11/49

Threads in OpenMP Exercise 2: Computing π Computing π. π = 1 0 Approximation: 4 1 + x 2 dx π N F(x i ) x i=0 Adding area of N rectangles: Base: x. Height: F(x i ). cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 12/49

Threads in OpenMP Exercise 2: Sequential version Computing π (I) #include <iostream> #include <iomanip> #include <chrono> int main() { using namespace std; using namespace std::chrono; constexpr long nsteps = 10000000; double step = 1.0 / double(nsteps); using clk = high_resolution_clock; auto t1 = clk :: now(); Computing π (II) double sum = 0.0; for (int i=0;i<nsteps; ++i) { double x = (i+0.5) step; sum += 4.0 / (1.0 + x x); double pi = step sum; auto t2 = clk :: now(); auto diff = duration_cast<microseconds>(t2 t1); cout << "PI= " << setprecision(10) << pi << endl; cout << "Tiempo= " << diff.count() << "us" << endl; return 0; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 13/49

Threads in OpenMP Measuring time in C++11 include files: #include <chrono> Clock type: using clk = chrono::high_resolution_clock; Get a time point: auto t1 = clk :: now(); Time difference (time unit can be specified). auto diff = duration_cast<microseconds>(t2 t1); Get difference value. cout << diff.count(); cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 14/49

Threads in OpenMP Time measurement example Example #include <chrono> void f () { using namespace std; using namespace std::chrono; using clk = chrono::high_resolution_clock; auto t1 = clk :: now(); g() ; auto t2 = clk :: now(); auto diff = duration_cast<microseconds>(t2 t1); cout << "Time= " << diff.count << "microseconds" << endl; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 15/49

Threads in OpenMP Time measurement in OpenMP Time point: double t1 = omp_get_wtime(); Time difference: double t1 = omp_get_wtime(); double t2 = omp_get_wtime(); double diff = t2 t1; Time difference between two successive ticks: double tick = omp_get_wtick(); cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 16/49

Threads in OpenMP Exercise 2 Create a parallel version from the π sequential version using a parallel clause. Observations: Include time measurements. Print the number of threads in use. Take special care with shared variables. Idea: Use an array and accumulate partial sum for each thread in the parallel region. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 17/49

Synchronization 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 18/49

Synchronization Synchronization mechanisms Synchronization: Mechanism used to establish constraints on the access order to shared variables. Goal: Avoid data races. Alternatives: High level: critical, atomic, barrier, ordered. Low level: flush, lock. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 19/49

Synchronization critical Guarantees mutual exclusion. Only a thread at a time can enter the critical region. Example #pragma omp parallel { for ( int i=0;i<max;++i) { x = f ( i ) ; #pragma omp critical g(x); Calls to f() are performed in parallel. Only a thread can enter function g() at a time. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 20/49

Synchronization atomic Guarantees atomic update of a single memory location. Avoid data races in variable update. Example #pragma omp parallel { for ( int i=0;i<max;++i) { x = f ( i ) ; #pragma omp atomic s += g(x) Calls to f() performed in parallel. Updates to s are thread-safe. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 21/49

Synchronization Exercise 3 Modify program from exercise 2. Evaluate: a) Critical section. b) Atomic access. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 22/49

Parallel loops 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 23/49

Parallel loops Parallel for Loop work-sharing: Splits iterations from a loop among available threads. Syntax #pragma omp parallel { #pragma omp for for ( i=0; i<n; ++i) { f ( i ) ; omp for For loop work-sharing. A private copy of i is generated for each thread. Can also be done with private(i) cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 24/49

Parallel loops Example Sequential code for ( i=0;i<max;++i) { u[ i ] = v[ i ] + w[i ]; Parallel region #pragma omp parallel { int id = omp_get_thread_num(); int nthreads = omp_get_num_threads(); int istart = id max / nthreads; int iend = ( id==nthreads 1)? (( id + 1) max / nthreads):max; for ( int i= istart ; i<iend;++i) { u[ i ] = v[ i ] + w[i ]; Parallel region + parallel loop #pragma omp parallel #pragma omp for for ( i=0;i<max;++i) { u[ i ] = v[ i ] + w[i ]; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 25/49

Parallel loops Combined construct An abbreviated form can be used by combining both directives. Two directives vector<double> vec(max); #pragma omp parallel { #pragma omp for for ( i=0; i<max; ++i) { vec[i ] = generate(i) ; Combined directive vector<double> vec(max); #pragma omp parallel for for ( i=0; i<max; ++i) { vec[i ] = generate(i) ; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 26/49

Parallel loops Reductions Example double sum = 0.0; vector<double> v(max); for ( int i=0; i<max; ++i) { sum += v[i]; A reduction performs a reduction on the variables that appear in its list in a parallelized loop. Reduction clause: reduction (op1:var1, op2:var2) Effects: Private copy for each variable. Local copy updated in each iteration. Local copies combined at the end. Example double sum = 0.0; vector<double> v(max); #pragma omp parallel for reduction(+:sum) for ( int i=0; i<max; ++i) { sum += v[i]; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 27/49

Parallel loops Reduction operation Associative operations. (a b) c = a (b c) Initial value defined by the operation. Basic operators: + (initial value: 0). * (initial value: 1). - (initial value: 0). Advanced operators: & (initial value: 0). (initial value: 0). ˆ (initial value: 0). && (initial value: 1). (initial value: 0). cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 28/49

Parallel loops Exercise 4 Modify the π computation program. Transform the program for obtaining a similar version to the original sequential program. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 29/49

Synchronize with master 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 30/49

Synchronize with master Barriers Example Allows to synchronize all threads in a point. Wait until all threads arrive to the barriers. #pragma omp parallel { int id = omp_get_thread_num(); v[id ] = f (id) ; #pragma omp barrier #pragma omp for for (int i=0;i<max;++i) { w[i ] = g(i ) ; // Implicit barrier #pragma omp for nowait for (int i=0;i<max;++i) { w[i ] = g(i ) ; // nowait > No implicit barrier v[ i ] = h(i ) ; // Implicit barrier cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 31/49

Synchronize with master Single execution: master The master clause marks a block that is only executed in the master thread. Example #pragma omp parallel { f () ; // In all threads #pragma omp master { g() ; // Only in master h() ; // Only in master i () ; // In all threads cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 32/49

Synchronize with master Single execution: single The single clause marks a block that is only executed in one thread. Does not need to be the master thread. Example #pragma omp parallel { f () ; // In all threads #pragma omp single { g() ; // Only in one thread h() ; // Only in one thread i () ; // In all threads cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 33/49

Synchronize with master Ordering Example An ordered region is executed in sequential order. #pragma omp parallel { #pragma omp for ordered reduction(+:res) for ( int i=0;i<max;++i) { double tmp = f(i) ; #pragma ordered res += g(tmp); cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 34/49

Synchronize with master Simple locks Example Locks in the OpenMP library. Also nested locks. omp_lock_t l; omp_init_lock(&l); #pragma omp parallel { int id = omp_get_thread_num(); double x = f( i ) ; omp_set_lock(&l); cout << "ID=" << id << " tmp= " << tmp << endl; omp_unset_lock(&l); omp_destroy_lock(&l); cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 35/49

Synchronize with master Other library functions Nested locks: omp_init_nest_lock(), omp_set_nest_lock(), omp_unset_nest_lock(), omp_test_next_lock(), omp_destroy_nest_lock(). Processor query: omp_num_procs(). Number of threads: omp_set_num_threads(), omp_get_num_threads(), omp_get_thread_num(), omp_get_max_threads(). Test for parallel region: omp_in_parallel(). Dynamic selection of number of threads: omp_set_dynamic(), omp_get_dynamic(). cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 36/49

Synchronize with master Environment variables Default number of threads: OMP_NUM_THREADS Scheduling mode: OMP_SCHEDULE cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 37/49

Data sharing 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 38/49

Data sharing Storage attributes Programming model in shared memory: Shared variables. Private variables. Shared: Global variables (file scope and name space) static variables. Objects in dynamic memory (malloc() and new). Private: Local variables in functions invoked from a parallel region. Local variables defined within a block. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 39/49

Data sharing Modifying storage attributes Attributes in parallel clauses: shared. private. firstprivate. private creates a new local copy per thread. Value of copies is not initialized. Example void f () { int x = 17; #pragma omp parallel for private(x) for ( int i=0;i<max;++i) { x += i ; // x not initialized cout << x << endl; // x==17 cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 40/49

Data sharing firstprivate Particular case of private. Each private copy is initialized with the value of the variable of the master thread. Example void f () { int x = 17; #pragma omp parallel for firstprivate (x) for (long i=0;i<maxval;++i) { x += i ; // x is initially 17 std :: cout << x << std :: endl; // x==17 cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 41/49

Data sharing lastprivate Pass the value of the private variable of the last sequential iteration to the global variable. Example void f () { int x = 17; #pragma omp parallel for firstprivate (x) lastprivate (x) for (long i=0;i<maxval;++i) { x += i ; // x is initially 17 std :: cout << x << std :: endl; // x value in iteration i==maxval 1 cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 42/49

Sections and scheduling 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 43/49

Sections and scheduling Sections Defines a set of code sections. Each section is passed to a different thread. Implicit barrier at the end of the section block. Example #pragma omp parallel { #pragma omp sections { #pragma omp section f () ; #pragma omp section g() ; #pragma omp section h() ; cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 44/49

Sections and scheduling Loop scheduling schedule(static) schedule(static,n): Schedules iteration blocks (size n) for each thread. schedule(dynamic) schedule(dynamic,n): Each thread takes a block of n iterations from a queue until all have been processed. schedule(guided) schedule(guided,n): Each thread takes an iteration block until all have been processed. Starts with a large block size and it is decreased until size n is reached. schedule(runtime) schedule(runtime,n): Uses scheduling specified by OMP_SCHEDULE or the runtime library. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 45/49

Conclusion 1 Introduction 2 Threads in OpenMP 3 Synchronization 4 Parallel loops 5 Synchronize with master 6 Data sharing 7 Sections and scheduling 8 Conclusion cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 46/49

Conclusion Summary OpenMP allows to annotate sequential code to make use of fork-join parallelism. Based in the concept of parallel region. Synchronization mechanisms may be high level or low level. Parallel loops combined with reductions allow to preserve original code for many algorithms. Storage attributes allow to control copies and data sharing in parallel regions. OpenMP offers multiple scheduling approaches. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 47/49

Conclusion References Books: An Introduction to Parallel Programming. P. Pacheco. Morgan Kaufmann, 2011. (Cap 5). Multicore and GPU Programming. G. Barlas. Morgan Kaufmann. 2014. (Cap 4). Web: OpenMP: http://www.openmp.org. Lawrence Livermore National Laboratory Tutorial: https: //computing.llnl.gov/tutorials/openmp/. cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 48/49

Conclusion Parallel programming using OpenMP Computer Architecture J. Daniel García Sánchez (coordinator) David Expósito Singh Francisco Javier García Blas ARCOS Group Computer Science and Engineering Department University Carlos III of Madrid cbed Computer Architecture ARCOS Group http://www.arcos.inf.uc3m.es 49/49