Parallel Computing in the Computer Science Curriculum > Workshops > CCSC:MW 2014 OpenMP

CCSC:MW 2014 OpenMP

Teaching Shared Memory Parallel Concepts with OpenMP

Sept 19, 2014 (4:15-5:45pm), Olivet Nazarene University

Instructors: Joel Adams (Calvin College), Dick Brown (St. Olaf College), and Libby Shoop (Macalester College)

Abstract: Curriculum 2013 brings parallelism into the CS curricular mainstream. This hands-on workshop is intended for faculty with little or no background in parallel computing. OpenMP is a platform independent, industry-standard library for shared-memory parallel programming supported by all modern C and C++ compilers. The workshop introduces the basics of OpenMP multithreading using parallel patterns, including single program multiple data (SPMD) execution, fork-join threading, and pragmas for parallel for loops, parallel blocks, mutual exclusion, etc. The workshop includes: (i) an overview of OpenMP, (ii) self-paced hands-on experimentation with the OpenMP programs, and (iii) a discussion of how these may be used to achieve the goals of Curriculum 2013. Workshop materials will be distributed from Participants will receive and explore 15 short programs designed to help students understand multithreading concepts, plus longer programs that use OpenMP to solve significant problems. A participant may explore these programs on their own laptop, provided it has installed a C/C++ compiler that supports OpenMP (e.g., gcc 4.2 or later; Visual Studio 2008 or later). Those comfortable with the command line may explore the programs on our remote servers using a laptop or tablet with a suitable SSH client. Laptop recommended.


4:15 - 4:35 PM:

Introduction (Joel), 10 minutes


shared-memory parallelism and OpenMP (Acrobat (PDF) 1.8MB Sep16 14)

PDC in Curriculum 2013 (Acrobat (PDF) 1.2MB Mar7 14) (to look at after the workshop)

Introduction to the OpenMP patternlets (Libby), 10 minutes

Module: Patternlets in Parallel Programming

4:35 - 5:15:

Self-paced, hands-on exploration of OpenMP patternlets (see links below for patternlets and exemplars)

Once you have logged into your account given to you on paper:

mkdir [your_name]
cd [your_name]
cp -r ~csinparallel/workshop/shared/CCSC-MW_OpenMP/ .
tar -zxvf openMP.tgz

Then the dir called openMP contains the patternlet code in subdirectories underneath. vim and emacs and nano are available for editing at the terminal. (We like an editor that will enable remote editing from your machine, such as komodo edit community edition.)

In another browser window, you could follow the html page for the module directly as you look through the code for each example.

Note that after the workshop you could explore some of the other code that we have for other modules in our collection. These are all located in ~csinparallel/workshop/shared/. Copy over others and try them if you like.


Introduction to OpenMP exemplars (Libby)
Working through some of the exemplars after the workshop


Attendance: Please sign in and indicate your interest in hearing more from us (or not).

We are planning a longer workshop in the Chicago area during summer of 2015 – we will let you know about the details.

Discussion: Where to teach students about shared-memory parallelism? (Joel)

Assessment: please fill out Our CSinParallel Project Survey for this Workshop. We appreciate your help in evaluating our NSF-funded project.

Course Modules for you to try that use OpenMP


Patternlets in Parallel Programming


Intro/Year 2 level

Multicore Programming with OpenMP

Monte Carlo Simulations: Parallelism in CS1/Cs2

Junior/Senior level

Drug Design Exemplar

Pandemic Exemplar

Materials to download

Source code archives can be found within the above Course Modules. However, for the Drug Design Exemplar you may wish to get this complete archive:

Code for Drug Design Exemplar (gzip Archive 5kB Mar7 14)


If you are interested, you can find more information about the rest of our modules from the modules link on the left menu of this page.