SlideShare a Scribd company logo
Flexible Memory Allocation in
Kinetic Monte Carlo Simulations
Aaron Craig
Context & Motivation: Epitaxy
• Kinetic Monte Carlo Monte Carlo Markov Processes Stochastic Processes⇢ ⇢ ⇢
Source: physics.lancs.ac.uk/lamsa/pages/page3.htm
“Surface of a GaAs film grown by liquid phase epitaxy”
Lancaster Materials and Surface Analysis Service
(Lancaster University (UK))
Context & Motivation: Epitaxy
• Monte Carlo Simulations use a random number to select state-
transitions in Markov processes.
• Kinetic Monte Carlo simulations simulate the time-evolution of
systems in nature.
• Only a small fraction of transitions are accessible: sparse
transition matrix
• K.M.C. for crystal growth: Markov process modeling the
behavior of a system of atoms
• Stochastic simulation: discrete or continuous time-scales
Simple Cubic, Solid-on-solid Epitaxial Growth
• Cubic Lattice of lateral dimension
• Permitted transitions in system state: changes in
height array
• Moves or ‘Hops’: Atoms move from one lattice site to another
• Deposition: Stochastic ‘rain’
• Determination of rates: local bond-coordination
• Simplest case: Only nearest neighbors determine rate
• Single species
M2
H
Simple Cubic, Solid-on-solid Epitaxial Growth
• Our model allows five possible rates: one for each
coordination:
, .
• The parameter reflects bond-strength.
• The pre-factor is adjusted to reflect the model.
• Periodic boundary conditions
• Exploit the finite number of rates, categories
E
n = 0, ..., 4rn = Ke En
K
Tour of Methods
• Linear Search
• Inverted List Methods
• (1) Standard Inverted List Algorithm
• (2) Minimal Allocation Algorithm
• Cascade procedure
• (3) Flexible Allocation Algorithm
• Synthesis of methods (1) and (2)
Linear Search Algorithm
1. Compute the partial sums by summing over the
event index:
!
!
2. Select a random number .
!
3. Find the integer for which .
!
4. Carry out event . Update height array , rates.
!
5. Return to step 1.
Ri =
iX
j=1
rj
u 2 [0, R]
i
i
Ri 1 < u  Ri
H
Standard Inverted List Algorithm
1. Sum the rates by category:
!
!
!
!
2. Select a random number .
!
3. Find the integer for which .
!
4. Carry out a randomly-selected event with rate .
!
5. Update the list , inverse list , and occupation array .
!
6. Return to step 1.
Ri =
iX
j=1
Cj ˆrj
u 2 [0, R]
i Ri 1 < u  Ri
ˆri
L A C
Standard Inverted List Algorithm
• Two types of list updates:
• (1) Updates to the list of events : categorization by rate
• (2) Updates to the inverse list : -‘addresses’
• Advantages of Inverted List Methods:
• (1) Fixed cost per iteration: computational costs do not scale
with , the size of the system.
• (2) Both and can be maintained with a small number of
updates per iteration.
L
LA
M2
L A
Standard Inverted List Algorithm
• Inverted list methods require more memory:
• The standard list requires a total allocation of
• Our model:
L nM2
n = 5
Standard Inverted List Algorithm
kf
(A(e, 1), ki)
Updates:
1) Replacement
2) Event moved to kf
Standard List Update
Minimal Allocation Algorithm
• Total Memory Allocation:
• Each iteration necessitates a cascade procedure.
• Cases requiring special treatment
• Problem: as increases, performance suffers.
• Fixed cost per iteration (scales with )
• Slower than standard inverted list method, but uses less
memory
M2
n
n
Cascade Procedure:
1) Replacement
2) Cascade
3) Event moved to kf
Minimal Allocation Algorithm: Cascade
Case: kf < ki
Cascade Procedure:
1) Replacement
2) Cascade
3) Event moved to kf
Minimal Allocation Algorithm: Cascade
Case: kf > ki
Flexible Allocation Algorithm
• Idea: synthesis of previous two methods
• Total memory allocation , .
• Size of is model-dependent.
• Memory Considerations for large systems
• Performance outlook for more complex models
 (1 + ↵)M2
↵ << n 1
↵
Overview of the Algorithm
• Two cases:
• Case 1: Destination sub-list contains unoccupied space
• Two updates required
• Case 2: No unoccupied space
• Cascade procedure required
• Cases requiring special treatment
Performance Considerations
• Cascades & Allocation Considerations
• Periodicity and System-Size
• Deposition and its complications
• Cache
Updates:
1) Replacement
2) Event moved to kf
Flexible Allocation Algorithm: Non-cascade
Updates:
1. Replacement
2. Cascade
3. Event moved to kf
Flexible Allocation Algorithm: Cascade
Observations
• Total allocation always grows.
• Saturation eventually occurs.
• Cascade procedures are increasingly rare
Further Application
• Many models: larger number of possible rates
• Face-centered cubic lattice
• System size: lattice sites
• Rates determined by neighbors and ‘next-nearest’
neighbors
• 91 distinct rates
M3
 5003
Parameters!
• System-size:
• Rates: ,
!
M2
= 22p , p = 5, ..., 12
108
rij = e Enij
E = 3
• iterations
ˆr1 = 1
ˆr2 = e 3
⇡ 4.98 ⇥ 10 2
ˆr3 = e 6
⇡ 2.48 ⇥ 10 3
ˆr4 = e 9
⇡ 1.23 ⇥ 10 4
ˆr5 = e 12
⇡ 6.14 ⇥ 10 6
• Deposition rate: d = 10 6 monolayers
M2 · s
CPU-time vs. P
CPU-time vs. P (Inverted List Methods)
Allocation Ratio vs. Number of Iterations
Cascade Count vs. Number of Iterations
Conclusions
• Effects of System-size
• Intersection of inverted list algorithms’ curves
results from this model’s small number of rates.
• For models with more rates, we expect a larger
difference in the performances of the inverted
list algorithms.
• Other Models
References
[1] T.P. Schulze, "Efficient Kinetic Monte Carlo Simulation," Journal of
Computational Physics 227 (2008) 2455 - 2462
[2] T.P. Schulze, "Kinetic Monte-Carlo Simulations with Minimal Searching," Phys.
Rev. E 65 (2002) Art. no. 036704

More Related Content

Similar to Flexible Memory Allocation in Kinetic Monte Carlo Simulations

data-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptxdata-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptx
AhmadTawfigAlRadaide
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
Universität Rostock
 
paper term SUMMARY powerpoint.pptx
paper term SUMMARY powerpoint.pptxpaper term SUMMARY powerpoint.pptx
paper term SUMMARY powerpoint.pptx
ShathaTaha2
 
Exploring Petri Net State Spaces
Exploring Petri Net State SpacesExploring Petri Net State Spaces
Exploring Petri Net State Spaces
Universität Rostock
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
hadarpinhas1
 
Control of Uncertain Hybrid Nonlinear Systems Using Particle Filters
Control of Uncertain Hybrid Nonlinear Systems Using Particle FiltersControl of Uncertain Hybrid Nonlinear Systems Using Particle Filters
Control of Uncertain Hybrid Nonlinear Systems Using Particle Filters
Leo Asselborn
 
Quantum computer
Quantum computerQuantum computer
Quantum computer
Kumar Abhijeet
 
Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depth
IdcIdk1
 
A Deep Learning use case for water end use detection by Roberto Díaz and José...
A Deep Learning use case for water end use detection by Roberto Díaz and José...A Deep Learning use case for water end use detection by Roberto Díaz and José...
A Deep Learning use case for water end use detection by Roberto Díaz and José...
Big Data Spain
 
Imac10 Component
Imac10 ComponentImac10 Component
Imac10 Component
SDTools
 
Power System Dynamics & Stability Overview & Electromagnetic Transients
Power System Dynamics & Stability Overview  &  Electromagnetic TransientsPower System Dynamics & Stability Overview  &  Electromagnetic Transients
Power System Dynamics & Stability Overview & Electromagnetic Transients
Power System Operation
 
generalized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombegeneralized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombe
Matt Challacombe
 
Markov Chain Monte Carlo explained
Markov Chain Monte Carlo explainedMarkov Chain Monte Carlo explained
Markov Chain Monte Carlo explained
dariodigiuni
 
Trackster Pruning at the CMS High-Granularity Calorimeter
Trackster Pruning at the CMS High-Granularity CalorimeterTrackster Pruning at the CMS High-Granularity Calorimeter
Trackster Pruning at the CMS High-Granularity Calorimeter
Yousef Fadila
 
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
CC Yu
 
Sensor Organism project presentation
Sensor Organism project presentationSensor Organism project presentation
Sensor Organism project presentation
Naums Mogers
 
Wqtc2013 invest ofperformanceprobswitheds-20130910
Wqtc2013 invest ofperformanceprobswitheds-20130910Wqtc2013 invest ofperformanceprobswitheds-20130910
Wqtc2013 invest ofperformanceprobswitheds-20130910
John B. Cook, PE, CEO
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
Aritra Sarkar
 
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
Spark Summit
 
Matlab
MatlabMatlab
Matlab
Akshat1295
 

Similar to Flexible Memory Allocation in Kinetic Monte Carlo Simulations (20)

data-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptxdata-stream-processing-SEEP.pptx
data-stream-processing-SEEP.pptx
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
 
paper term SUMMARY powerpoint.pptx
paper term SUMMARY powerpoint.pptxpaper term SUMMARY powerpoint.pptx
paper term SUMMARY powerpoint.pptx
 
Exploring Petri Net State Spaces
Exploring Petri Net State SpacesExploring Petri Net State Spaces
Exploring Petri Net State Spaces
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
 
Control of Uncertain Hybrid Nonlinear Systems Using Particle Filters
Control of Uncertain Hybrid Nonlinear Systems Using Particle FiltersControl of Uncertain Hybrid Nonlinear Systems Using Particle Filters
Control of Uncertain Hybrid Nonlinear Systems Using Particle Filters
 
Quantum computer
Quantum computerQuantum computer
Quantum computer
 
Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depth
 
A Deep Learning use case for water end use detection by Roberto Díaz and José...
A Deep Learning use case for water end use detection by Roberto Díaz and José...A Deep Learning use case for water end use detection by Roberto Díaz and José...
A Deep Learning use case for water end use detection by Roberto Díaz and José...
 
Imac10 Component
Imac10 ComponentImac10 Component
Imac10 Component
 
Power System Dynamics & Stability Overview & Electromagnetic Transients
Power System Dynamics & Stability Overview  &  Electromagnetic TransientsPower System Dynamics & Stability Overview  &  Electromagnetic Transients
Power System Dynamics & Stability Overview & Electromagnetic Transients
 
generalized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombegeneralized_nbody_acs_2015_challacombe
generalized_nbody_acs_2015_challacombe
 
Markov Chain Monte Carlo explained
Markov Chain Monte Carlo explainedMarkov Chain Monte Carlo explained
Markov Chain Monte Carlo explained
 
Trackster Pruning at the CMS High-Granularity Calorimeter
Trackster Pruning at the CMS High-Granularity CalorimeterTrackster Pruning at the CMS High-Granularity Calorimeter
Trackster Pruning at the CMS High-Granularity Calorimeter
 
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
Leakage Power Minimization using SA-Based Gate Sizing and Threshold Voltage A...
 
Sensor Organism project presentation
Sensor Organism project presentationSensor Organism project presentation
Sensor Organism project presentation
 
Wqtc2013 invest ofperformanceprobswitheds-20130910
Wqtc2013 invest ofperformanceprobswitheds-20130910Wqtc2013 invest ofperformanceprobswitheds-20130910
Wqtc2013 invest ofperformanceprobswitheds-20130910
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
 
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
Real-Time Detection of Anomalies in the Database Infrastructure using Apache ...
 
Matlab
MatlabMatlab
Matlab
 

Recently uploaded

Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
PirithiRaju
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
Anagha Prasad
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
vluwdy49
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Leonel Morgado
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
Leonel Morgado
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
Sérgio Sacani
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
by6843629
 
23PH301 - Optics - Optical Lenses.pptx
23PH301 - Optics  -  Optical Lenses.pptx23PH301 - Optics  -  Optical Lenses.pptx
23PH301 - Optics - Optical Lenses.pptx
RDhivya6
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills MN
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdfwaterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
LengamoLAppostilic
 

Recently uploaded (20)

Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
 
The debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically youngThe debris of the ‘last major merger’ is dynamically young
The debris of the ‘last major merger’ is dynamically young
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
 
23PH301 - Optics - Optical Lenses.pptx
23PH301 - Optics  -  Optical Lenses.pptx23PH301 - Optics  -  Optical Lenses.pptx
23PH301 - Optics - Optical Lenses.pptx
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdfwaterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
waterlessdyeingtechnolgyusing carbon dioxide chemicalspdf
 

Flexible Memory Allocation in Kinetic Monte Carlo Simulations

  • 1. Flexible Memory Allocation in Kinetic Monte Carlo Simulations Aaron Craig
  • 2. Context & Motivation: Epitaxy • Kinetic Monte Carlo Monte Carlo Markov Processes Stochastic Processes⇢ ⇢ ⇢ Source: physics.lancs.ac.uk/lamsa/pages/page3.htm “Surface of a GaAs film grown by liquid phase epitaxy” Lancaster Materials and Surface Analysis Service (Lancaster University (UK))
  • 3. Context & Motivation: Epitaxy • Monte Carlo Simulations use a random number to select state- transitions in Markov processes. • Kinetic Monte Carlo simulations simulate the time-evolution of systems in nature. • Only a small fraction of transitions are accessible: sparse transition matrix • K.M.C. for crystal growth: Markov process modeling the behavior of a system of atoms • Stochastic simulation: discrete or continuous time-scales
  • 4. Simple Cubic, Solid-on-solid Epitaxial Growth • Cubic Lattice of lateral dimension • Permitted transitions in system state: changes in height array • Moves or ‘Hops’: Atoms move from one lattice site to another • Deposition: Stochastic ‘rain’ • Determination of rates: local bond-coordination • Simplest case: Only nearest neighbors determine rate • Single species M2 H
  • 5. Simple Cubic, Solid-on-solid Epitaxial Growth • Our model allows five possible rates: one for each coordination: , . • The parameter reflects bond-strength. • The pre-factor is adjusted to reflect the model. • Periodic boundary conditions • Exploit the finite number of rates, categories E n = 0, ..., 4rn = Ke En K
  • 6. Tour of Methods • Linear Search • Inverted List Methods • (1) Standard Inverted List Algorithm • (2) Minimal Allocation Algorithm • Cascade procedure • (3) Flexible Allocation Algorithm • Synthesis of methods (1) and (2)
  • 7. Linear Search Algorithm 1. Compute the partial sums by summing over the event index: ! ! 2. Select a random number . ! 3. Find the integer for which . ! 4. Carry out event . Update height array , rates. ! 5. Return to step 1. Ri = iX j=1 rj u 2 [0, R] i i Ri 1 < u  Ri H
  • 8. Standard Inverted List Algorithm 1. Sum the rates by category: ! ! ! ! 2. Select a random number . ! 3. Find the integer for which . ! 4. Carry out a randomly-selected event with rate . ! 5. Update the list , inverse list , and occupation array . ! 6. Return to step 1. Ri = iX j=1 Cj ˆrj u 2 [0, R] i Ri 1 < u  Ri ˆri L A C
  • 9. Standard Inverted List Algorithm • Two types of list updates: • (1) Updates to the list of events : categorization by rate • (2) Updates to the inverse list : -‘addresses’ • Advantages of Inverted List Methods: • (1) Fixed cost per iteration: computational costs do not scale with , the size of the system. • (2) Both and can be maintained with a small number of updates per iteration. L LA M2 L A
  • 10. Standard Inverted List Algorithm • Inverted list methods require more memory: • The standard list requires a total allocation of • Our model: L nM2 n = 5
  • 11. Standard Inverted List Algorithm kf (A(e, 1), ki) Updates: 1) Replacement 2) Event moved to kf Standard List Update
  • 12. Minimal Allocation Algorithm • Total Memory Allocation: • Each iteration necessitates a cascade procedure. • Cases requiring special treatment • Problem: as increases, performance suffers. • Fixed cost per iteration (scales with ) • Slower than standard inverted list method, but uses less memory M2 n n
  • 13. Cascade Procedure: 1) Replacement 2) Cascade 3) Event moved to kf Minimal Allocation Algorithm: Cascade Case: kf < ki
  • 14. Cascade Procedure: 1) Replacement 2) Cascade 3) Event moved to kf Minimal Allocation Algorithm: Cascade Case: kf > ki
  • 15. Flexible Allocation Algorithm • Idea: synthesis of previous two methods • Total memory allocation , . • Size of is model-dependent. • Memory Considerations for large systems • Performance outlook for more complex models  (1 + ↵)M2 ↵ << n 1 ↵
  • 16. Overview of the Algorithm • Two cases: • Case 1: Destination sub-list contains unoccupied space • Two updates required • Case 2: No unoccupied space • Cascade procedure required • Cases requiring special treatment
  • 17. Performance Considerations • Cascades & Allocation Considerations • Periodicity and System-Size • Deposition and its complications • Cache
  • 18. Updates: 1) Replacement 2) Event moved to kf Flexible Allocation Algorithm: Non-cascade
  • 19. Updates: 1. Replacement 2. Cascade 3. Event moved to kf Flexible Allocation Algorithm: Cascade
  • 20. Observations • Total allocation always grows. • Saturation eventually occurs. • Cascade procedures are increasingly rare
  • 21. Further Application • Many models: larger number of possible rates • Face-centered cubic lattice • System size: lattice sites • Rates determined by neighbors and ‘next-nearest’ neighbors • 91 distinct rates M3  5003
  • 22. Parameters! • System-size: • Rates: , ! M2 = 22p , p = 5, ..., 12 108 rij = e Enij E = 3 • iterations ˆr1 = 1 ˆr2 = e 3 ⇡ 4.98 ⇥ 10 2 ˆr3 = e 6 ⇡ 2.48 ⇥ 10 3 ˆr4 = e 9 ⇡ 1.23 ⇥ 10 4 ˆr5 = e 12 ⇡ 6.14 ⇥ 10 6 • Deposition rate: d = 10 6 monolayers M2 · s
  • 24. CPU-time vs. P (Inverted List Methods)
  • 25. Allocation Ratio vs. Number of Iterations
  • 26. Cascade Count vs. Number of Iterations
  • 27. Conclusions • Effects of System-size • Intersection of inverted list algorithms’ curves results from this model’s small number of rates. • For models with more rates, we expect a larger difference in the performances of the inverted list algorithms. • Other Models
  • 28. References [1] T.P. Schulze, "Efficient Kinetic Monte Carlo Simulation," Journal of Computational Physics 227 (2008) 2455 - 2462 [2] T.P. Schulze, "Kinetic Monte-Carlo Simulations with Minimal Searching," Phys. Rev. E 65 (2002) Art. no. 036704