Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
#
# Serial and simple genetic algorithm #
#
@everywhere function SerialSimpleGeneticAlgorithm(A,S,P,T)
# S is the length of the digital encoding
# of an individual
# P is the size of the population
#
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Foundations of Programming for High Performance Computing: CS2101.
2013.
UWO, December, 14,
Student name:
Student ID number:
Guidelines. The exam is closed book and all notes are forbidden. The durati
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Cache Memories
Marc Moreno Maza
University of Western Ontario, London, Ontario (Canada)
CS2101 October 2012
Once upon a time, everything was slow in a computer.
The second space race . . .
Plan
1
Hier
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Divide and Conquer
Divide the problem into several subproblems of equal size.
Recursively solve each subproblem in parallel. Merge the
solutions to the various subproblems into a solution for the
orig
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
CS2101
Due: Tuesday 2nd of December 2014
Problem Set 3
CS2101
Submission instructions on last page
PROBBLEM 1. [100 points]
In class, we went through a tutorial on the subject of genetic algorithms. H
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
CS2101
Due: Friday 10th of October 2014
Problem Set 1
CS2101
Submission instructions on last page
PROBBLEM 1. [40 points]
The value of can be calculated in a number of ways. Consider the following me
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
CS2101
Due: Monday 3rd of November 2014
Problem Set 2
CS2101
Submission instructions on last page
PROBBLEM 1. [20 points]
In this problem, we consider dierent ways of computing the dot product of two
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Genetic Algorithms:
A Tutorial
Genetic Algorithms are
good at taking large,
potentially huge search
spaces and navigating
them, looking for optimal
combinations of things,
solutions you might not
othe
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
CS2101a Foundations of Programming for
High Performance Computing
Marc Moreno Maza & Ning Xie
University of Western Ontario, London, Ontario (Canada)
CS2101
Plan
1
Course Overview
2
Hardware Accelerat
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
An Overview of Parallel Computing
Marc Moreno Maza
University of Western Ontario, London, Ontario (Canada)
CS2101
Plan
1
Hardware
2
Types of Parallelism
3
Concurrency Platforms: Three Examples
Cilk
CU
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
@everywhere function PiSerial(n)
d=0
for i=1:n
x=rand()
y=rand()
if x^2 + y^2 < 1
d = d +1
end
end
4 *d/n
end
function PiParallel(n,p)
q = div(n,p)
refs = [@spawnat i PiSerial(q) for i=1:p]
sum(pmap(f
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Foundations of Programming for High Performance Computing: CS2101.
2013.
UWO, November, 5,
Student name:
Student ID number:
Guidelines. The exam is closed book and all notes are forbidden. The duratio
Foundations of Programming for High Performance Computing
COMP SCI 2101

Fall 2013
Parallel and Distributed Ccomputing with Julia
Marc Moreno Maza
University of Western Ontario, London, Ontario (Canada)
CS2101 (updated October 16, 2014)
Plan
1
Tasks: Concurrent Function Calls
2
Juli