# source:papers/edupar/pfunc.tex@88

Last change on this file since 88 was 88, checked in by pkambadu, 3 years ago

Correcting some of the problems in references

File size: 8.6 KB
Line
1\documentclass[9pt,twocolumn,letter]{article}
2
3\include{pfunc-defs}
4\include{squeeze}
5
6\lstset{language=C++,style=basic}
7
8\begin{document}
9
10\title{PFunc: A Tool for Teaching and Implementing Task Parallelism}
11
12\date{A proposal for a 1/2 hour presentation at EduPar 2011}
13
14\numberofauthors{3}
15\author{
17  \affaddr{IBM TJ Watson Research Center}\\
19  \alignauthor Anshul Gupta\\
20  \affaddr{IBM TJ Watson Research Center}\\
21  \email{anshul@us.ibm.com}
22  \alignauthor Andrew Lumsdaine\\
25  \email{lums@osl.iu.edu}
26}
27
28\maketitle
29
30\begin{abstract}
31Task parallelism is an intuitive and generic model of parallelism, which
32subsumes both the data parallel and SPMD~\cite{darema2001} models, and can be
33used to parallelize both regular and irregular applications.
34%
36Engineering curriculum is therefore essential, whether the students are
37preparing for industrial or academic careers.
38%
39In this presentation, we showcase PFunc, an open-source library for
40task parallelism that has been designed not only for practitioners,
41but also as
42a pedantic tool for writing parallel programs with ease and flexibility.
43%
44Specifically, we will focus on those aspects of PFunc that make it an ideal
45tool for hands-on
46learning of both basic and advanced topics in parallel programming.
47\end{abstract}
48
49\section{Introduction}
50% The importance of teaching hands-on parallel programming.
51\begin{center}
52\small{\textit{I hear, I know. I see, I remember. I do, I understand.'' -
53Confucius.}}
54\end{center}
55%
56Untill recently,
57the practice of parallel programming was outside the reach of many
58classrooms, particularly in relatively small colleges
60%
61However, due to the ubiquity of multi-core CPUs on commodity desktops and
62laptops, parallel programming can now be practiced by one and all.
64Of the available parallel programming models, the task parallel model is
65sufficiently high-level and generic, thereby enabling it to parallelize regular
66and irregular applications on shared, distributed, and heterogeneous
67architectures.
68%
69Therefore, it should be an essential part of undergraduate curriculum whether
70the students are preparing for an industrial or academic careers.
71
72% Languages, language extensions, library models.
73% Why is the library model practical and better for pedagogy?
75kinds: languages, language extensions and pragmas, and libraries.
76% Languages
77Many modern programming languages offer direct support for task parallelism
78(eg., X10~\cite{Charles:2005p1232}).
79%
80However, these new languages are not well suited for teaching parallel
81programming as they hide the machinery necessary for realizing task
82parallelism.
83%
84Furthermore, these new languages are not yet used either in the industry or in
85academia --- so, the exercise of teaching parallelism through new languages
86might be in vain.
87%
88Finally, forcing students to learn a new language takes focus away from
89teaching parallel programming itself and therefore might be counter-productive.
90% Language extensions
91Language extensions and pragmas such as Cilk~\cite{FrigoLeRa98} and
93keywords'' to existing stock programming languages, which makes their
94adaptation (relative to new languages) easier.
95%
96However, for pedantic purposes, they suffer from many of the shortcomings of
97new languages.
98% Libraries
99Libraries written in stock programming languages such as C/\Cpp{} have long
100been used in both industry and academia for parallelizing applications.
101%
102Well-designed task parallel libraries can offer significantly more
103flexibility in programming than any other means of realizing
104parallelism.
105%
106Furthermore, as most of the machinery is written in stock programming
107languages, essential programming tools such as debuggers, performance
108profilers, and memory checkers can be used to both develop parallel programs
109and understand some of the little details'' that affect a parallel program's
110behavior.
111
112%
113% Why should PFunc be the recommended vehicle for teaching undergraduate
114% course work? What are its benefits? Address these two questions.
115%
116% 1. Open-source with BSD-style license.
117% 2. Portable to Windows, Linux, OSX, and AIX.
118% 3. Well documented and stable.
119% 4. Works with stock C++ compiler, no tool chain necessary.
120% 5. Can be used for a follow up course or for students who are more
122% 6. Many examples to choose from (DAG scheduling, Itemset mining,
123%    BLAS, select NAS parallel benchmarks, simple examples).
124% 7. Actively supported.
125%
126\section{PFunc}
127\label{sec:pfunc}
128PFunc~\cite{kambadur09:pfunc}, short for Parallel Functions, is a library for
129task parallelism in C/\Cpp{} that has been designed not only as a fast library
130for practitioners, but also as a pedantic tool for writing parallel programs
131with ease and flexibility.
132%
133PFunc is particularly well suited for the classroom as it not only permits, but
134encourages experimentation.
135%
136The features offered by PFunc are a strict superset of the features offered by
137other solutions (languages, language extensions, and libraries) for task
138parallelism.
139
140%
141% Practical aspects. For beginners.
142%
143PFunc is an open-source software that has been released under the BSD-style
145http://www.eclipse.org/legal/epl-v10.html}
146%
147PFunc runs \textit{natively} on Windows, OSX, Linux, and AIX (x86 and
148PowerPC chips) with any standards compliant C/\Cpp{} compiler; that is, PFunc
149can be freely installed and used on any desktop or laptop.
150%
151PFunc is stable, well documented, and actively developed with detailed
152tutorials and techincal support available through its
153website.~\footnote{\texttt https://projects.coin-or.org/PFunc.}
154%
155Additional learning/teaching material is available in the form of example
156programs that demonstrate different approaches for using PFunc to achieve the
157same goal and the impact of each approach on performance.
158%
159Furthermore, several high performance programs including DAG scheduling,
160frequent pattern mining, select BLAS kernels, and select NAS parallel
161benchmarks parallelized using PFunc are also freely available.
162%
163To help understand, develop, and debug parallel programs, PFunc provides a
164production-grade exception handling mechanism that operates smoothly across
166%
167Therefore, PFunc is an excellent candidate for teaching task parallelism to
169
170%
172%
173PFunc is geared towards experimentation by allowing users to plug-and-play''
175%
176Not only can students choose from a wide variety of built-in options (eg.,
177Cilk-style, FIFO, LIFO, and priority-based scheduling), but also implement
178their own customizations with ease.
179%
180Orthogonally, PFunc also allows switching from different degrees of the
181work-sharing model to work-stealing model~\cite{Blumofe94} through its
182initialization API.
183%
184Furthermore, PFunc comes with built-in integration with PAPI~\cite{papi}, an
185open-source API for portable performance characterization of programs on a
186variety of architectures.
187%
188Hence, PFunc can also be used for teaching advanced topics in parallel
189programming such as task scheduling, work-stealing, and performance tuning.
190
191%
192% Write about TBB, TPL, PPL, and Apple's Grand Central Dispatch --- why each of
193% them is not uniquely suited for our purposes.
194%
195\section{Related Work}
196Apart from PFunc, there are several libraries that provide support for task
197parallelism.
198%
199Apple's Grand Central Dispatch~\cite{kn:gcd} (GCD) provides APIs for task
200parallelism, but it is non-portable (requires OSX 10.6+ or FreeBSD 8.1+) and
201does not lend itself to experimentation.
202%
203Microsoft's Task Parallel Library~\cite{kn:tpl} (TPL), suffers from drawbacks
204similar to that of GCD; in addition, it is also not an open-source software.
205%
206Intel's Threading Building Blocks~\cite{kn:tbb} (TBB) is an elegantly crafted,
208%
210data structures such as queues and hash maps.
211%
212TBB is released under a commercial-aligned open source license that makes it
213available free-of-cost \textit{only} for teaching purposes.
214%
215However, like TPL and GCD, TBB does not lend itself for experimentation.
216
217\footnotesize
218\bibliographystyle{abbrv}
219\bibliography{refs}
220
221\end{document}
Note: See TracBrowser for help on using the repository browser.