monte carlo method is very general. use random numbers to approximate solutions to problems. ...
TRANSCRIPT
Parallel Monte Carlo Method
Introduction
Monte Carlo method is very general. use random numbers to approximate solutions to
problems. especially useful for simulating systems with
many coupled degrees of freedom simulate procedures with a large number of
inputs. We can apply the method in everything from
economics to nuclear physics to regulating the flow of traffic.
Common uses
Traffic flow
Financial analysis
Computer Graphics
Nuclear reactor design
Molecular dynamics
Radiation cancer therapy
General Guidelines
Define a domain of possible inputs.
Generate inputs randomly from a probability
distribution over the domain.
Perform a deterministic computation on the
inputs.
Aggregate the results.
Example
Lets approximate
Given that function and 1x1 square have a ratio of
areas that is 1/2
Example 1/4for i=1:N; x=rand; y=rand; F(i,1)=x; F(i,2)=y; if(x<=y) count=count+1; endendsol = count/N;
Example 2/4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Number of samples is:100 The Solution is:0.520000
x
y
Example 3/4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Number of samples is:1000 The Solution is:0.486000
x
y
Example 4/4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Number of samples is:10000 The Solution is:0.497900
x
y
Method summary
So Generally, the more iterations of the Monte Carlo
simulation, the better the approximation will be.
The problem: It requires an intensive computing
Can we parallelize ?
Method flow chart - serial
Method flow chart - parallel
SpeedUp
Conclusions
Monte Carlo Algorithms are very easy to convert to parallel algorithms.
When scaling to larger numbers of parallel CPU’s we see a smooth decrease in the time spent per timestep for a given simulation.
Questions?