SlideShare a Scribd company logo
1 of 51
Download to read offline
Just tired of endless loops!
or parallel: Stata module for parallel computing
George G. Vega
gvega@spensiones.cl
Chilean Pension Supervisor
Stata Conference New Orleans
July 18-19, 2013
Thanks to Damian C. Clarke, F´elix Villatoro and Eduardo Fajnzylber, Tom´as Rau, Eric Melse, Valentina Moscoso, the
Research team of the Chilean Pension Supervisor and several Stata users worldwide for their valuable contributions. The
usual disclaimers applies.
GGV — parallel 1/19
Agenda
1 Motivation
2 What is and how does it work
3 Benchmarks
4 Syntax and Usage
5 Concluding Remarks
GGV — parallel 2/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
GGV — parallel 3/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
• At the same time, currently home computers are arriving with extremely high
computational capabilities.
GGV — parallel 3/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
• At the same time, currently home computers are arriving with extremely high
computational capabilities.
• Given its nature, matching both (big data problems and HPA) sounds
strightforward.
GGV — parallel 3/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
• At the same time, currently home computers are arriving with extremely high
computational capabilities.
• Given its nature, matching both (big data problems and HPA) sounds
strightforward.
• But, implementing parallel computing for the social scientiest is not easy,
GGV — parallel 3/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
• At the same time, currently home computers are arriving with extremely high
computational capabilities.
• Given its nature, matching both (big data problems and HPA) sounds
strightforward.
• But, implementing parallel computing for the social scientiest is not easy, most
of this due to lack of (user-friendly) statistical computing tools.
GGV — parallel 3/19
Motivation
• Despite the availability of administrative data, its exploitation is still a novel
issue.
• At the same time, currently home computers are arriving with extremely high
computational capabilities.
• Given its nature, matching both (big data problems and HPA) sounds
strightforward.
• But, implementing parallel computing for the social scientiest is not easy, most
of this due to lack of (user-friendly) statistical computing tools.
• parallel aims to make a contribution to these issues.
GGV — parallel 3/19
1 Motivation
2 What is and how does it work
3 Benchmarks
4 Syntax and Usage
5 Concluding Remarks
GGV — parallel 4/19
What is and how does it work
What is?
• Inspired in the R package “snow”
GGV — parallel 5/19
What is and how does it work
What is?
• Inspired in the R package “snow”(several other examples exists: StataMP,
Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.)
GGV — parallel 5/19
What is and how does it work
What is?
• Inspired in the R package “snow”(several other examples exists: StataMP,
Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.)
• Is designed to be used in multicore CPUs (dualcore, quadcore, etc.).
GGV — parallel 5/19
What is and how does it work
What is?
• Inspired in the R package “snow”(several other examples exists: StataMP,
Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.)
• Is designed to be used in multicore CPUs (dualcore, quadcore, etc.).
• It implements parallel computing methods through an OS’s shell scripting
(using Stata in batch mode) to accelerate computations.
GGV — parallel 5/19
What is and how does it work
What is?
• Inspired in the R package “snow”(several other examples exists: StataMP,
Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.)
• Is designed to be used in multicore CPUs (dualcore, quadcore, etc.).
• It implements parallel computing methods through an OS’s shell scripting
(using Stata in batch mode) to accelerate computations.
• Depending on the task, can reach near to (or over) linear speedups proportional
to the number of physical cores of the computer.
GGV — parallel 5/19
What is and how does it work
What is?
• Inspired in the R package “snow”(several other examples exists: StataMP,
Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.)
• Is designed to be used in multicore CPUs (dualcore, quadcore, etc.).
• It implements parallel computing methods through an OS’s shell scripting
(using Stata in batch mode) to accelerate computations.
• Depending on the task, can reach near to (or over) linear speedups proportional
to the number of physical cores of the computer.
• Thus having a quad-core computer can lead to a 400% speedup.
GGV — parallel 5/19
What is and how does it work
How does it work?
Data
globals programs
mata
objects
mata
programs
Cluster 3Cluster 2Cluster 1 ... Cluster n
Splitting the data set
Passing
objects
Cluster
3’
Cluster
2’
Cluster
1’
... Cluster
n’
Task (stata batch-mode)
Data’
globals programs
mata
objects
mata
programs
Appending the data set
GGV — parallel 6/19
What is and how does it work
Sounds “pretty” but...
GGV — parallel 7/19
What is and how does it work
Sounds “pretty” but...is this for real!?
GGV — parallel 7/19
What is and how does it work
Parallel’s backend
When the user enters
parallel: gen n = N
parallel takes the command and writes something like this
GGV — parallel 8/19
What is and how does it work
Parallel’s backend
When the user enters
parallel: gen n = N
parallel takes the command and writes something like this
cap clear all
cd ~
1 set seed 34815
set memory 16777216b
cap set maxvar 5000
cap set matsize 400
2 local pll instance 1
local pll_id efcql2tspr
capture {
noisily {
3 use pllefcql2tsprdataset if efcql2tsprcut == 1
gen n = N
}
}
4 save pllefcql2tsprdta1, replace
local result = _rc
cd ~
5 mata: write diagnosis(st local(”result”),
>” pllefcql2tsprfinito1”)
GGV — parallel 8/19
What is and how does it work
Parallel’s backend
When the user enters
parallel: gen n = N
parallel takes the command and writes something like this
cap clear all
cd ~
1 set seed 34815
set memory 16777216b
cap set maxvar 5000
cap set matsize 400
2 local pll instance 1
local pll_id efcql2tspr
capture {
noisily {
3 use pllefcql2tsprdataset if efcql2tsprcut == 1
gen n = N
}
}
4 save pllefcql2tsprdta1, replace
local result = _rc
cd ~
5 mata: write diagnosis(st local(”result”),
>” pllefcql2tsprfinito1”)
cap clear all
cd ~
1 set seed 98327
set memory 16777216b
cap set maxvar 5000
cap set matsize 400
2 local pll instance 2
local pll_id efcql2tspr
capture {
noisily {
3 use pllefcql2tsprdataset if efcql2tsprcut == 2
gen n = N
}
}
4 save pllefcql2tsprdta2, replace
local result = _rc
cd ~
5 mata: write diagnosis(st local(”result”),
>” pllefcql2tsprfinito2”)
GGV — parallel 8/19
What is and how does it work
Ok, it works but...
GGV — parallel 9/19
What is and how does it work
Ok, it works but...
it must be really hard to use!
GGV — parallel 9/19
1 Motivation
2 What is and how does it work
3 Benchmarks
4 Syntax and Usage
5 Concluding Remarks
GGV — parallel 10/19
Benchmarks
Simple example: Serial replace
Serial fashion
do mydofile.do
Parallel fashion
parallel do mydofile.do
Figure: mydofile.do
local size = N
forval i=1/‘size’ {
qui replace x = ///
1/sqrt(2*‘c(pi)’)*exp(-(x^2/2)) in ‘i’
}
Table: Serial replacing using a loop on a Linux Server (16 clusters)
100.000 1.000.000 10.000.000
CPU 1.43 16.94 144.68
Total 0.34 3.20 12.49
Setup 0.00 0.00 0.00
Compute 0.32 3.07 11.54
Finish 0.02 0.12 0.95
Ratio (compute) 4.50 5.51 12.53
Ratio (total) 4.22 (26%) 5.30 (30%) 11.58 (72%)
Tested on a Intel Xeon X470 (hexadeca-core) machine
GGV — parallel 11/19
Benchmarks
Monte Carlo simulation (Windows Machine)
Serial fashion
do myexperiment.do
Parallel fashion
parallel do myexperiment.do, nodata
Figure: myexperiment.do
local num of intervals = 50
if length("‘pll id’") == 0 {
local start = 1
local end = ‘num of intervals’
}
else {
local ntot = floor(‘num of intervals’/$PLL CLUSTERS)
local start = (‘pll instance’ - 1)*‘ntot’ + 1
local end = (‘pll instance’)*‘ntot’
if ‘pll instance’ == $PLL CLUSTERS local end = 10
}
local reps 10000
forval i=‘start’/‘end’ {
qui use census2, clear
gen true y = age
gen z factor = region
sum z factor, meanonly
scalar zmu = r(mean)
qui {
gen y1 = .
gen y2 = .
local c = ‘i’
set seed ‘c’
simulate c=r(c) mu1=r(mu1) se mu1 = r(se mu1) ///
mu2=r(mu2) se mu2 = r(se mu2), ///
saving(cc‘i’, replace) nodots reps(‘reps’): ///
mcsimul1, c(‘c’)
}
}
Table: Monte Carlo Experiment on a Windows Machine (4 clusters)
2 4
CPU 111.49 114.13
Total 58.02 37.48
Setup 0.00 0.00
Compute 58.02 37.48
Finish 0.00 0.00
Ratio (compute) 1.92 3.04
Ratio (total) 1.92 (96%) 3.04 (76%)
Tested on a Intel i3 2120 (dual-core) machine
GGV — parallel 12/19
Benchmarks
Monte Carlo simulation (Unix Machine)
Serial fashion
do myexperiment.do
Parallel fashion
parallel do myexperiment.do, nodata
Table: Monte Carlo Experiment on a Linux Server (16 clusters)
2 4 8 16
CPU 164.79 164.04 162.84 163.89
Total 69.85 34.28 19.00 10.78
Setup 0.00 0.00 0.00 0.00
Compute 69.85 34.28 19.00 10.78
Finish 0.00 0.00 0.00 0.00
Ratio (compute) 2.36 4.78 8.57 15.21
Ratio (total) 2.36 (118%) 4.78 (120%) 8.57 (107%) 15.21 (95%)
Tested on a Intel Xeon X470 (hexadeca-core) machine
GGV — parallel 13/19
Benchmarks
Reshaping Administrative Data
Serial fashion
reshape wide tipsolic rutemp opta derecho ngiros, ///
i(id) j(time)
Parallel fashion
parallel, by(id) :reshape wide tipsolic rutemp opta derecho ngiros, ///
i(id) j(time)
Table: Reshaping wide a large database on a Linux Server (8 clusters)
100.000 1.000.000 5.000.000
CPU 5.51 72.70 392.97
Total 2.33 17.46 86.44
Setup 0.00 0.00 0.00
Compute 1.83 12.42 57.93
Finish 0.50 5.04 28.51
Ratio (compute) 3.01 5.85 6.78
Ratio (total) 2.37 (29%) 4.16 (52%) 4.55 (57%)
Tested on a Intel Xeon X470 (hexadeca-core) machine
GGV — parallel 14/19
1 Motivation
2 What is and how does it work
3 Benchmarks
4 Syntax and Usage
5 Concluding Remarks
GGV — parallel 15/19
Syntax and Usage
Setup
parallel setclusters # [, force]
GGV — parallel 16/19
Syntax and Usage
Setup
parallel setclusters # [, force]
By syntax
parallel [, by(varlist) programs mata seeds(string) randtype(random.org|datetime)
processors(integer) nodata]: stata cmd
GGV — parallel 16/19
Syntax and Usage
Setup
parallel setclusters # [, force]
By syntax
parallel [, by(varlist) programs mata seeds(string) randtype(random.org|datetime)
processors(integer) nodata]: stata cmd
Do syntax
parallel do filename
[, by(varlist) programs mata seeds(string) randtype(random.org|datetime)
processors(integer) nodata]
GGV — parallel 16/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
• Simulations in general.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
• Simulations in general.
parallel doesn’t suit ...
• (already) fast commands.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
• Simulations in general.
parallel doesn’t suit ...
• (already) fast commands.
• Regressions, ARIMA, etc.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
• Simulations in general.
parallel doesn’t suit ...
• (already) fast commands.
• Regressions, ARIMA, etc.
• Linear Algebra.
GGV — parallel 17/19
Syntax and Usage
Recomendations on its usage
parallel suit ...
• Montecarlo simulation.
• Extensive nested control flow (loops,
while, ifs, etc.).
• Bootstraping/Jacknife.
• Simulations in general.
parallel doesn’t suit ...
• (already) fast commands.
• Regressions, ARIMA, etc.
• Linear Algebra.
• Whatever StataMP does better.
GGV — parallel 17/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata,
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
• parsimulate
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
• parsimulate
• parfor
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
• parsimulate
• parfor
• parbootstrap
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
• parsimulate
• parfor
• parbootstrap
• parnnmatch
GGV — parallel 18/19
Concluding Remarks
• In the case of Stata, parallel is, to the authors knowledge, the first public
user-contribution to parallel computing
• its major strengths/advantages are in simulation models and non-vectorized
operations such as control-flow statements.
• Depending on the proportion of the algorithm that can be de-serialized, it is
possible to reach near to constant scale speedups.
• parallel establishes a new basis for parallel computing in Stata, thus an all
new set of algorithms can be implemented:
• parsimulate
• parfor
• parbootstrap
• parnnmatch
• ... You name it!
GGV — parallel 18/19
Thank you very much!
George G. Vega
gvega@spensiones.cl
Chilean Pension Supervisor
Stata Conference New Orleans
July 18-19, 2013
GGV — Thank you very much! 19/19

More Related Content

What's hot

BigData Analysis Frameworks
BigData Analysis FrameworksBigData Analysis Frameworks
BigData Analysis Frameworks
Mostafa Ead
 
Large scale data-parsing with Hadoop in Bioinformatics
Large scale data-parsing with Hadoop in BioinformaticsLarge scale data-parsing with Hadoop in Bioinformatics
Large scale data-parsing with Hadoop in Bioinformatics
Ntino Krampis
 
GR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GRGR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GR
Josef Heinen
 
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
Sebastian Schelter – Distributed Machine Learing with the Samsara DSLSebastian Schelter – Distributed Machine Learing with the Samsara DSL
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
Flink Forward
 

What's hot (20)

Hadoop scheduler with deadline constraint
Hadoop scheduler with deadline constraintHadoop scheduler with deadline constraint
Hadoop scheduler with deadline constraint
 
Beyond the DSL - Unlocking the power of Kafka Streams with the Processor API
Beyond the DSL - Unlocking the power of Kafka Streams with the Processor APIBeyond the DSL - Unlocking the power of Kafka Streams with the Processor API
Beyond the DSL - Unlocking the power of Kafka Streams with the Processor API
 
Deep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent spaceDeep Convolutional GANs - meaning of latent space
Deep Convolutional GANs - meaning of latent space
 
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
딥러닝 중급 - AlexNet과 VggNet (Basic of DCNN : AlexNet and VggNet)
 
BigData Analysis Frameworks
BigData Analysis FrameworksBigData Analysis Frameworks
BigData Analysis Frameworks
 
MapReduce Algorithm Design
MapReduce Algorithm DesignMapReduce Algorithm Design
MapReduce Algorithm Design
 
Parallel K means clustering using CUDA
Parallel K means clustering using CUDAParallel K means clustering using CUDA
Parallel K means clustering using CUDA
 
Parallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAParallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDA
 
Mapreduce Algorithms
Mapreduce AlgorithmsMapreduce Algorithms
Mapreduce Algorithms
 
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
쉽게 설명하는 GAN (What is this? Gum? It's GAN.)
 
cnsm2011_slide
cnsm2011_slidecnsm2011_slide
cnsm2011_slide
 
Time-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity ClustersTime-Evolving Graph Processing On Commodity Clusters
Time-Evolving Graph Processing On Commodity Clusters
 
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
 
Observations on dag scheduling and dynamic load-balancing using genetic algor...
Observations on dag scheduling and dynamic load-balancing using genetic algor...Observations on dag scheduling and dynamic load-balancing using genetic algor...
Observations on dag scheduling and dynamic load-balancing using genetic algor...
 
Web Traffic Time Series Forecasting
Web Traffic  Time Series ForecastingWeb Traffic  Time Series Forecasting
Web Traffic Time Series Forecasting
 
Large scale data-parsing with Hadoop in Bioinformatics
Large scale data-parsing with Hadoop in BioinformaticsLarge scale data-parsing with Hadoop in Bioinformatics
Large scale data-parsing with Hadoop in Bioinformatics
 
GR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GRGR.jl - Plotting for Julia based on GR
GR.jl - Plotting for Julia based on GR
 
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
 
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
Sebastian Schelter – Distributed Machine Learing with the Samsara DSLSebastian Schelter – Distributed Machine Learing with the Samsara DSL
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
 
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
 

Viewers also liked

Railroad tracks
Railroad tracksRailroad tracks
Railroad tracks
bymafe
 
密經,幸福一輩子
密經,幸福一輩子密經,幸福一輩子
密經,幸福一輩子
Birgit Lin
 
Working Together Diocese of Bath and Wells
Working Together Diocese of Bath and WellsWorking Together Diocese of Bath and Wells
Working Together Diocese of Bath and Wells
Katherine Lyddon
 
Exposicion erika s.ox
Exposicion erika s.oxExposicion erika s.ox
Exposicion erika s.ox
jailander2
 
Ian downey elevationburger
Ian downey elevationburgerIan downey elevationburger
Ian downey elevationburger
guesta22580
 
《窮得有品味》
《窮得有品味》《窮得有品味》
《窮得有品味》
Birgit Lin
 
Make a Joyful Noise to the Lord - Chichester Diocese
Make a Joyful Noise to the Lord  - Chichester DioceseMake a Joyful Noise to the Lord  - Chichester Diocese
Make a Joyful Noise to the Lord - Chichester Diocese
Katherine Lyddon
 
What Is The Promise Of Marriage
What Is The Promise Of MarriageWhat Is The Promise Of Marriage
What Is The Promise Of Marriage
tatianasimpson
 
اختبار هرمي لمادة النحو
اختبار هرمي لمادة النحواختبار هرمي لمادة النحو
اختبار هرمي لمادة النحو
ahmed
 
Violacion
ViolacionViolacion
Violacion
bymafe
 
JavaScript 脚本控件(二)
JavaScript 脚本控件(二)JavaScript 脚本控件(二)
JavaScript 脚本控件(二)
RANK LIU
 

Viewers also liked (20)

Railroad tracks
Railroad tracksRailroad tracks
Railroad tracks
 
Alcuni consigli per organizzare eventi sostenibili
Alcuni consigli per organizzare eventi sostenibiliAlcuni consigli per organizzare eventi sostenibili
Alcuni consigli per organizzare eventi sostenibili
 
密經,幸福一輩子
密經,幸福一輩子密經,幸福一輩子
密經,幸福一輩子
 
Working Together Diocese of Bath and Wells
Working Together Diocese of Bath and WellsWorking Together Diocese of Bath and Wells
Working Together Diocese of Bath and Wells
 
Kidz Klubs
Kidz KlubsKidz Klubs
Kidz Klubs
 
State of the Sass - The Mixin
State of the Sass - The MixinState of the Sass - The Mixin
State of the Sass - The Mixin
 
Career Path
Career PathCareer Path
Career Path
 
Exposicion erika s.ox
Exposicion erika s.oxExposicion erika s.ox
Exposicion erika s.ox
 
Hypnotism
HypnotismHypnotism
Hypnotism
 
Ian downey elevationburger
Ian downey elevationburgerIan downey elevationburger
Ian downey elevationburger
 
《窮得有品味》
《窮得有品味》《窮得有品味》
《窮得有品味》
 
Greek management
Greek managementGreek management
Greek management
 
Make a Joyful Noise to the Lord - Chichester Diocese
Make a Joyful Noise to the Lord  - Chichester DioceseMake a Joyful Noise to the Lord  - Chichester Diocese
Make a Joyful Noise to the Lord - Chichester Diocese
 
What Is The Promise Of Marriage
What Is The Promise Of MarriageWhat Is The Promise Of Marriage
What Is The Promise Of Marriage
 
Jamila by inash azim
Jamila by inash azimJamila by inash azim
Jamila by inash azim
 
اختبار هرمي لمادة النحو
اختبار هرمي لمادة النحواختبار هرمي لمادة النحو
اختبار هرمي لمادة النحو
 
Violacion
ViolacionViolacion
Violacion
 
JavaScript 脚本控件(二)
JavaScript 脚本控件(二)JavaScript 脚本控件(二)
JavaScript 脚本控件(二)
 
BPM And SOA Alignment Maturity Model
BPM And SOA Alignment Maturity ModelBPM And SOA Alignment Maturity Model
BPM And SOA Alignment Maturity Model
 
Sql user group
Sql user groupSql user group
Sql user group
 

Similar to vega

Similar to vega (20)

MapReduce: teoria e prática
MapReduce: teoria e práticaMapReduce: teoria e prática
MapReduce: teoria e prática
 
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
Big Data Day LA 2016/ Big Data Track - Portable Stream and Batch Processing w...
 
Handout3o
Handout3oHandout3o
Handout3o
 
R programming for data science
R programming for data scienceR programming for data science
R programming for data science
 
GRAPHICAL STRUCTURES in our lives
GRAPHICAL STRUCTURES in our livesGRAPHICAL STRUCTURES in our lives
GRAPHICAL STRUCTURES in our lives
 
GPUs for GEC Competition @ GECCO-2013
GPUs for GEC Competition @ GECCO-2013GPUs for GEC Competition @ GECCO-2013
GPUs for GEC Competition @ GECCO-2013
 
SNAP MACHINE LEARNING
SNAP MACHINE LEARNINGSNAP MACHINE LEARNING
SNAP MACHINE LEARNING
 
Large-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PCLarge-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PC
 
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-datatranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
tranSMART Community Meeting 5-7 Nov 13 - Session 3: transmart-data
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)On Implementation of Neuron Network(Back-propagation)
On Implementation of Neuron Network(Back-propagation)
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Scaling Deep Learning Algorithms on Extreme Scale Architectures
Scaling Deep Learning Algorithms on Extreme Scale ArchitecturesScaling Deep Learning Algorithms on Extreme Scale Architectures
Scaling Deep Learning Algorithms on Extreme Scale Architectures
 
Distributed Graph Algorithms
Distributed Graph AlgorithmsDistributed Graph Algorithms
Distributed Graph Algorithms
 
Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008
Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008
Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008
 
Mesa and Its Debugging, Вадим Шовкопляс
Mesa and Its Debugging, Вадим ШовкоплясMesa and Its Debugging, Вадим Шовкопляс
Mesa and Its Debugging, Вадим Шовкопляс
 
Parallel Computing: Perspectives for more efficient hydrological modeling
Parallel Computing: Perspectives for more efficient hydrological modelingParallel Computing: Perspectives for more efficient hydrological modeling
Parallel Computing: Perspectives for more efficient hydrological modeling
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
 
Dl2 computing gpu
Dl2 computing gpuDl2 computing gpu
Dl2 computing gpu
 
Fine tuning large LMs
Fine tuning large LMsFine tuning large LMs
Fine tuning large LMs
 

vega

  • 1. Just tired of endless loops! or parallel: Stata module for parallel computing George G. Vega gvega@spensiones.cl Chilean Pension Supervisor Stata Conference New Orleans July 18-19, 2013 Thanks to Damian C. Clarke, F´elix Villatoro and Eduardo Fajnzylber, Tom´as Rau, Eric Melse, Valentina Moscoso, the Research team of the Chilean Pension Supervisor and several Stata users worldwide for their valuable contributions. The usual disclaimers applies. GGV — parallel 1/19
  • 2. Agenda 1 Motivation 2 What is and how does it work 3 Benchmarks 4 Syntax and Usage 5 Concluding Remarks GGV — parallel 2/19
  • 3. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. GGV — parallel 3/19
  • 4. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. • At the same time, currently home computers are arriving with extremely high computational capabilities. GGV — parallel 3/19
  • 5. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. • At the same time, currently home computers are arriving with extremely high computational capabilities. • Given its nature, matching both (big data problems and HPA) sounds strightforward. GGV — parallel 3/19
  • 6. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. • At the same time, currently home computers are arriving with extremely high computational capabilities. • Given its nature, matching both (big data problems and HPA) sounds strightforward. • But, implementing parallel computing for the social scientiest is not easy, GGV — parallel 3/19
  • 7. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. • At the same time, currently home computers are arriving with extremely high computational capabilities. • Given its nature, matching both (big data problems and HPA) sounds strightforward. • But, implementing parallel computing for the social scientiest is not easy, most of this due to lack of (user-friendly) statistical computing tools. GGV — parallel 3/19
  • 8. Motivation • Despite the availability of administrative data, its exploitation is still a novel issue. • At the same time, currently home computers are arriving with extremely high computational capabilities. • Given its nature, matching both (big data problems and HPA) sounds strightforward. • But, implementing parallel computing for the social scientiest is not easy, most of this due to lack of (user-friendly) statistical computing tools. • parallel aims to make a contribution to these issues. GGV — parallel 3/19
  • 9. 1 Motivation 2 What is and how does it work 3 Benchmarks 4 Syntax and Usage 5 Concluding Remarks GGV — parallel 4/19
  • 10. What is and how does it work What is? • Inspired in the R package “snow” GGV — parallel 5/19
  • 11. What is and how does it work What is? • Inspired in the R package “snow”(several other examples exists: StataMP, Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.) GGV — parallel 5/19
  • 12. What is and how does it work What is? • Inspired in the R package “snow”(several other examples exists: StataMP, Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.) • Is designed to be used in multicore CPUs (dualcore, quadcore, etc.). GGV — parallel 5/19
  • 13. What is and how does it work What is? • Inspired in the R package “snow”(several other examples exists: StataMP, Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.) • Is designed to be used in multicore CPUs (dualcore, quadcore, etc.). • It implements parallel computing methods through an OS’s shell scripting (using Stata in batch mode) to accelerate computations. GGV — parallel 5/19
  • 14. What is and how does it work What is? • Inspired in the R package “snow”(several other examples exists: StataMP, Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.) • Is designed to be used in multicore CPUs (dualcore, quadcore, etc.). • It implements parallel computing methods through an OS’s shell scripting (using Stata in batch mode) to accelerate computations. • Depending on the task, can reach near to (or over) linear speedups proportional to the number of physical cores of the computer. GGV — parallel 5/19
  • 15. What is and how does it work What is? • Inspired in the R package “snow”(several other examples exists: StataMP, Condor HTC, C’s Ox library, Matlab’s Parallel Toolbox, etc.) • Is designed to be used in multicore CPUs (dualcore, quadcore, etc.). • It implements parallel computing methods through an OS’s shell scripting (using Stata in batch mode) to accelerate computations. • Depending on the task, can reach near to (or over) linear speedups proportional to the number of physical cores of the computer. • Thus having a quad-core computer can lead to a 400% speedup. GGV — parallel 5/19
  • 16. What is and how does it work How does it work? Data globals programs mata objects mata programs Cluster 3Cluster 2Cluster 1 ... Cluster n Splitting the data set Passing objects Cluster 3’ Cluster 2’ Cluster 1’ ... Cluster n’ Task (stata batch-mode) Data’ globals programs mata objects mata programs Appending the data set GGV — parallel 6/19
  • 17. What is and how does it work Sounds “pretty” but... GGV — parallel 7/19
  • 18. What is and how does it work Sounds “pretty” but...is this for real!? GGV — parallel 7/19
  • 19. What is and how does it work Parallel’s backend When the user enters parallel: gen n = N parallel takes the command and writes something like this GGV — parallel 8/19
  • 20. What is and how does it work Parallel’s backend When the user enters parallel: gen n = N parallel takes the command and writes something like this cap clear all cd ~ 1 set seed 34815 set memory 16777216b cap set maxvar 5000 cap set matsize 400 2 local pll instance 1 local pll_id efcql2tspr capture { noisily { 3 use pllefcql2tsprdataset if efcql2tsprcut == 1 gen n = N } } 4 save pllefcql2tsprdta1, replace local result = _rc cd ~ 5 mata: write diagnosis(st local(”result”), >” pllefcql2tsprfinito1”) GGV — parallel 8/19
  • 21. What is and how does it work Parallel’s backend When the user enters parallel: gen n = N parallel takes the command and writes something like this cap clear all cd ~ 1 set seed 34815 set memory 16777216b cap set maxvar 5000 cap set matsize 400 2 local pll instance 1 local pll_id efcql2tspr capture { noisily { 3 use pllefcql2tsprdataset if efcql2tsprcut == 1 gen n = N } } 4 save pllefcql2tsprdta1, replace local result = _rc cd ~ 5 mata: write diagnosis(st local(”result”), >” pllefcql2tsprfinito1”) cap clear all cd ~ 1 set seed 98327 set memory 16777216b cap set maxvar 5000 cap set matsize 400 2 local pll instance 2 local pll_id efcql2tspr capture { noisily { 3 use pllefcql2tsprdataset if efcql2tsprcut == 2 gen n = N } } 4 save pllefcql2tsprdta2, replace local result = _rc cd ~ 5 mata: write diagnosis(st local(”result”), >” pllefcql2tsprfinito2”) GGV — parallel 8/19
  • 22. What is and how does it work Ok, it works but... GGV — parallel 9/19
  • 23. What is and how does it work Ok, it works but... it must be really hard to use! GGV — parallel 9/19
  • 24. 1 Motivation 2 What is and how does it work 3 Benchmarks 4 Syntax and Usage 5 Concluding Remarks GGV — parallel 10/19
  • 25. Benchmarks Simple example: Serial replace Serial fashion do mydofile.do Parallel fashion parallel do mydofile.do Figure: mydofile.do local size = N forval i=1/‘size’ { qui replace x = /// 1/sqrt(2*‘c(pi)’)*exp(-(x^2/2)) in ‘i’ } Table: Serial replacing using a loop on a Linux Server (16 clusters) 100.000 1.000.000 10.000.000 CPU 1.43 16.94 144.68 Total 0.34 3.20 12.49 Setup 0.00 0.00 0.00 Compute 0.32 3.07 11.54 Finish 0.02 0.12 0.95 Ratio (compute) 4.50 5.51 12.53 Ratio (total) 4.22 (26%) 5.30 (30%) 11.58 (72%) Tested on a Intel Xeon X470 (hexadeca-core) machine GGV — parallel 11/19
  • 26. Benchmarks Monte Carlo simulation (Windows Machine) Serial fashion do myexperiment.do Parallel fashion parallel do myexperiment.do, nodata Figure: myexperiment.do local num of intervals = 50 if length("‘pll id’") == 0 { local start = 1 local end = ‘num of intervals’ } else { local ntot = floor(‘num of intervals’/$PLL CLUSTERS) local start = (‘pll instance’ - 1)*‘ntot’ + 1 local end = (‘pll instance’)*‘ntot’ if ‘pll instance’ == $PLL CLUSTERS local end = 10 } local reps 10000 forval i=‘start’/‘end’ { qui use census2, clear gen true y = age gen z factor = region sum z factor, meanonly scalar zmu = r(mean) qui { gen y1 = . gen y2 = . local c = ‘i’ set seed ‘c’ simulate c=r(c) mu1=r(mu1) se mu1 = r(se mu1) /// mu2=r(mu2) se mu2 = r(se mu2), /// saving(cc‘i’, replace) nodots reps(‘reps’): /// mcsimul1, c(‘c’) } } Table: Monte Carlo Experiment on a Windows Machine (4 clusters) 2 4 CPU 111.49 114.13 Total 58.02 37.48 Setup 0.00 0.00 Compute 58.02 37.48 Finish 0.00 0.00 Ratio (compute) 1.92 3.04 Ratio (total) 1.92 (96%) 3.04 (76%) Tested on a Intel i3 2120 (dual-core) machine GGV — parallel 12/19
  • 27. Benchmarks Monte Carlo simulation (Unix Machine) Serial fashion do myexperiment.do Parallel fashion parallel do myexperiment.do, nodata Table: Monte Carlo Experiment on a Linux Server (16 clusters) 2 4 8 16 CPU 164.79 164.04 162.84 163.89 Total 69.85 34.28 19.00 10.78 Setup 0.00 0.00 0.00 0.00 Compute 69.85 34.28 19.00 10.78 Finish 0.00 0.00 0.00 0.00 Ratio (compute) 2.36 4.78 8.57 15.21 Ratio (total) 2.36 (118%) 4.78 (120%) 8.57 (107%) 15.21 (95%) Tested on a Intel Xeon X470 (hexadeca-core) machine GGV — parallel 13/19
  • 28. Benchmarks Reshaping Administrative Data Serial fashion reshape wide tipsolic rutemp opta derecho ngiros, /// i(id) j(time) Parallel fashion parallel, by(id) :reshape wide tipsolic rutemp opta derecho ngiros, /// i(id) j(time) Table: Reshaping wide a large database on a Linux Server (8 clusters) 100.000 1.000.000 5.000.000 CPU 5.51 72.70 392.97 Total 2.33 17.46 86.44 Setup 0.00 0.00 0.00 Compute 1.83 12.42 57.93 Finish 0.50 5.04 28.51 Ratio (compute) 3.01 5.85 6.78 Ratio (total) 2.37 (29%) 4.16 (52%) 4.55 (57%) Tested on a Intel Xeon X470 (hexadeca-core) machine GGV — parallel 14/19
  • 29. 1 Motivation 2 What is and how does it work 3 Benchmarks 4 Syntax and Usage 5 Concluding Remarks GGV — parallel 15/19
  • 30. Syntax and Usage Setup parallel setclusters # [, force] GGV — parallel 16/19
  • 31. Syntax and Usage Setup parallel setclusters # [, force] By syntax parallel [, by(varlist) programs mata seeds(string) randtype(random.org|datetime) processors(integer) nodata]: stata cmd GGV — parallel 16/19
  • 32. Syntax and Usage Setup parallel setclusters # [, force] By syntax parallel [, by(varlist) programs mata seeds(string) randtype(random.org|datetime) processors(integer) nodata]: stata cmd Do syntax parallel do filename [, by(varlist) programs mata seeds(string) randtype(random.org|datetime) processors(integer) nodata] GGV — parallel 16/19
  • 33. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. GGV — parallel 17/19
  • 34. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). GGV — parallel 17/19
  • 35. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. GGV — parallel 17/19
  • 36. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. • Simulations in general. GGV — parallel 17/19
  • 37. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. • Simulations in general. parallel doesn’t suit ... • (already) fast commands. GGV — parallel 17/19
  • 38. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. • Simulations in general. parallel doesn’t suit ... • (already) fast commands. • Regressions, ARIMA, etc. GGV — parallel 17/19
  • 39. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. • Simulations in general. parallel doesn’t suit ... • (already) fast commands. • Regressions, ARIMA, etc. • Linear Algebra. GGV — parallel 17/19
  • 40. Syntax and Usage Recomendations on its usage parallel suit ... • Montecarlo simulation. • Extensive nested control flow (loops, while, ifs, etc.). • Bootstraping/Jacknife. • Simulations in general. parallel doesn’t suit ... • (already) fast commands. • Regressions, ARIMA, etc. • Linear Algebra. • Whatever StataMP does better. GGV — parallel 17/19
  • 41. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing GGV — parallel 18/19
  • 42. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. GGV — parallel 18/19
  • 43. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. GGV — parallel 18/19
  • 44. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, GGV — parallel 18/19
  • 45. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: GGV — parallel 18/19
  • 46. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: • parsimulate GGV — parallel 18/19
  • 47. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: • parsimulate • parfor GGV — parallel 18/19
  • 48. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: • parsimulate • parfor • parbootstrap GGV — parallel 18/19
  • 49. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: • parsimulate • parfor • parbootstrap • parnnmatch GGV — parallel 18/19
  • 50. Concluding Remarks • In the case of Stata, parallel is, to the authors knowledge, the first public user-contribution to parallel computing • its major strengths/advantages are in simulation models and non-vectorized operations such as control-flow statements. • Depending on the proportion of the algorithm that can be de-serialized, it is possible to reach near to constant scale speedups. • parallel establishes a new basis for parallel computing in Stata, thus an all new set of algorithms can be implemented: • parsimulate • parfor • parbootstrap • parnnmatch • ... You name it! GGV — parallel 18/19
  • 51. Thank you very much! George G. Vega gvega@spensiones.cl Chilean Pension Supervisor Stata Conference New Orleans July 18-19, 2013 GGV — Thank you very much! 19/19