High Performance C++ Applications in Computational and Quantitative Finance using OpenMP - (code CPP-HPQF)The goal of this course is to develop applications in finance using multi-threading and parallel programming techniques. The language of choice is C++ in combination with the de-facto standard library OpenMP. OpenMP is a collection of compiler directives, library routines and environment variables that developers use to specify shared-memory parallelism in C and C++. It is a de-facto industry standard and it has been accepted by several major software and hardware vendors.
The main reason for using OpenMP is to improve the performance of applications. The advent of multi-core computers will help promote the interest in parallel applications. In some cases (the so-called embarrassingly parallel applications ) we experience major performance improvements when compared with applications written in sequential C++. In some cases it is even possible to experience a speedup factor of almost four on a machine with four processors.
This unique hands-on course discusses how to design robust and highly efficient finance applications using C++ and OpenMP. First, we analyse the problem (for example, a Monte Carlo simulator, a partial differential equation (PDE) solver or a nonlinear optimizer and we decompose into independent concurrent tasks. Second, we design the tasks by employing parallel design pattern. Finally, we use C++ and OpenMP to develop high performance finance applications.
The percentage theory/practice is 70/30. There are four parts in the course. Each part takes approximately one half-day.
What do you learn in this course?
- State-of-the art financial and software technology integration
- Migrate existing applications to OpenMP, incrementally
- Integrate OpenMP with your existing designs
Course ContentsPart 1: Fundamental Principles of Parallel Programming
Memory Systems
- Shared memory parallel computers (SMPs)
- Shared and cache memory
- Shared memory consistency models
- Distributed memory and shared distributed memory
- Threads
What is a thread?
- Thread attributes
- Thread execution lifecycle
- User threads and kernel threads
- Data Access in Threads
Fork-join (master/slave) model
- Shared and private data
- Thread synchronization
- Synchronisation in Detail
Mutual exclusion (mutex) and condition variables
- Critical sections
- Memory synchronization and fences
- Barriers
- Troubleshooting
Sequential consistency
- Removing data dependencies
- Race conditions
- Deadlock and livelock
A Simple Monte Carlo Application
- Designing the problem using patterns
- Task decomposition and MC paths
- Shared and private data
- Implementing the option pricing using OpenMP
Part 2: Designing Parallel Programs
Decomposition Techniques
- Task and data decomposition
- Grouping and ordering tasks
- Data sharing among tasks
- Evaluation
Examples
- Matrix computations and their applications
- Random number generation
- Monte Carlo simulation
- Finite Difference Method (RNG)
Algorithm Structure
- Task and data parallelism
- Divide and conquer
- Geometric decomposition
- Other decomposition techniques
- Parallel Design Patterns
SPMD pattern
- Master/Worker pattern
- Loop parallelism pattern
- Shared data and shared queues patterns
Loop parallelism in Detail
- Sequential optimisation
- Avoiding race conditions
- Improving performance with loop optimizations
- Loop unrolling
- Using critical sections and locks
Part 3: OpenMP
Overview
- Compiler directives
- Library routines
- Environment variables
My First OpenMP Program
- Writing the serial program
- Determining parallel code
- Adding OpenMP directives
- Debugging and performance measurement
Data Clauses in OpenMP
- Shared and private
- Lastprivate, firstprivate
- Default and nowait clause
- OpenMP Synchronisation Constructs
Barrier
- Ordered
- Critical and Atomic
- Locks, Master construct
Work Sharing in OpenMP
- Loop construct
- Sections and section
- Single construct
- Combined parallel work-sharing constructs
Other Clauses
- Reduction clause
- Copyin clause
- Copyprivate clause
- Ordered clause
Configuration and Run-Time Information
- Setting environment variables' values
- Library functions for thread information
- Scheduling functions
- Lock functions
- Timing functions
Part 4: Financial Applications
Matrix Applications
- Parallel basic linear algebra
- BLAS functionality
- Matrix-vector and matrix-matrix multiplication
- Memory and processing optimization
The Fast Fourier Transform (FFT)
- The discrete Fourier transform; inverse transform
- Parallel program design
- Partitioning and communication
- Applications of FFT
Monte Carlo Framework in C++ and OpenMP
- Design using OpenMP
- Application testing and troubleshooting
- Performance measurement and improvement
- Speedup
The Finite Difference Method
- Explicit methods and domain decomposition
- Load balancing and thread allocation
- One-factor and multi-factor PDEs
- Speedup of the schemes
Prerequisites
A working knowledge of C or C++. It is an advantage if you work with software applications in which performance is important and where advantage can be taken of multi-processor computers. This course has been specially developed for those working in quantitative finance and the focus, approach and applications in the course reflect this fact.
Who should attend?
Quantitative designers, analysts and others who develop advanced applications for derivatives pricing, risk management and related areas. This course is also of interest to software developers and consultants who wish to gain experience in this field.
Duration, price, date, locationsCourse duration: 2 days
Dates and location: (click on dates to print registration form)
| Starting date |
Location |
Price |
Language |
|
Nov 27 2008
|
London (United Kingdom) |
€ 1995 |
English |
|