Solving intertemporal CGE model in parallel using Singly Bordered Block Diagonal ordering technique ∗ Pham Van Ha Prof. Tom Kompas ha.pham@anu.edu.au tom.kompas@anu.edu.au Crawford School of Public Policy ANU College of Asia & the Pacific Melbourne, 7 October 2013 ∗ Preliminary, not for citation SBBD solution PVH-TFK – 1 / 26
Contents INTRODUCTION INTRODUCTION SOLUTION METHODS FOR CGE MODELS SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM SOLVING LINEAR SYSTEM INTER-TEMPORAL CGE MODEL AND SBBD FORM INTER-TEMPORAL CGE MODEL AND SBBD FORM NUMERICAL ANALYSIS NUMERICAL ANALYSIS CONCLUSION CONCLUSION REFERENCES REFERENCES SBBD solution PVH-TFK – 2 / 26
INTRODUCTION The Rationale SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM INTRODUCTION INTER-TEMPORAL CGE MODEL AND SBBD FORM NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 3 / 26
The Rationale INTRODUCTION Inter-temporal CGE models are big and difficult to solve. ■ The Rationale Solution to CGE model usually involves solution of a big first order ■ SOLUTION METHODS FOR CGE MODELS derivative matrix of a non-linear system. SBBD MATRIX AND The most popular CGE software packages in the market now are ■ DIRECT METHOD FOR SOLVING LINEAR GEMPACK and GAMS, but they rely on serial matrix solvers, which have SYSTEM INTER-TEMPORAL limited power in solving very big models. CGE MODEL AND SBBD FORM The paper proposes a direct reordering method for the first order differential ■ NUMERICAL matrices arising from the CGE models’ solution. The ordering method ANALYSIS facilitates parallel solution of the matrices and, therefore, reduces CONCLUSION computing time for the solution of inter-temporal CGE models. REFERENCES SBBD solution PVH-TFK – 4 / 26
INTRODUCTION SOLUTION METHODS FOR CGE MODELS The GEMPACK’s linearize method The GAMS’s iterative methods Parallel solution SOLUTION METHODS FOR CGE SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR MODELS SYSTEM INTER-TEMPORAL CGE MODEL AND SBBD FORM NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 5 / 26
The GEMPACK’s linearize method INTRODUCTION The GEMPACK’s linearize method involves linear approximation and ■ SOLUTION METHODS Richardson extrapolation. FOR CGE MODELS The GEMPACK’s linearize method x 1 = x 0 + f − 1 x f y dy (1) The GAMS’s iterative methods Parallel solution GEMPACK use the direct serial solver MA48 or MA28 from The HSL ■ SBBD MATRIX AND DIRECT METHOD FOR Mathematical Software Library (see HSL, 2013). SOLVING LINEAR SYSTEM More accurate result can be obtained by “chopping” down the shock. ■ INTER-TEMPORAL CGE MODEL AND Advantage of the method is faster solution speed and the user can control ■ SBBD FORM the speed and accuracy by changing the number of sub-steps. NUMERICAL ANALYSIS The downside is no convergence guarantee, the user should check for ■ CONCLUSION convergence of the solution. REFERENCES SBBD solution PVH-TFK – 6 / 26
The GAMS’s iterative methods INTRODUCTION GAMS is a flexible system and how it solve the model depends on the ■ SOLUTION METHODS solver involved. FOR CGE MODELS The GEMPACK’s PATH (Ferris and Munson, n.d.; Dirkse and Ferris, 1995) and MILES ■ linearize method The GAMS’s iterative Rutherford (n.d.) or optimiser MINOS (Bruce et al., n.d.) are the usual methods Parallel solution choices for CGE modelers. SBBD MATRIX AND PATH is Newton-based solver. PATH uses LUSOL (Saunders et al., 2013) ■ DIRECT METHOD FOR SOLVING LINEAR as a linear system solver to solve the system involving Jacobian matrix. SYSTEM INTER-TEMPORAL LUSOL is a serial direct linear system solver. CGE MODEL AND SBBD FORM MINOS is an optimisation solver, CGE model can be solved by setting-up ■ NUMERICAL non-linear constraints and a dummy objective function. ANALYSIS MINOS also uses LUSOL for Jacobian matrix solution. ■ CONCLUSION REFERENCES SBBD solution PVH-TFK – 7 / 26
Parallel solution INTRODUCTION To our knowledge, current CGE software packages use serial solver to ■ SOLUTION METHODS solve big linear system. FOR CGE MODELS The GEMPACK’s The idea of parallel solution in CGE modelling has been introduced in ■ linearize method The GAMS’s iterative GEMPACK version 10, but the parallel resources are used only to solve methods Parallel solution different steps at the same time, not for joint solution of a linear system. SBBD MATRIX AND The parallel software libraries are available but they can not employ special ■ DIRECT METHOD FOR SOLVING LINEAR feature of CGE models to solve efficiently. SYSTEM INTER-TEMPORAL We will introduce Singly Bordered Block Diagonal ordering method to solve ■ CGE MODEL AND SBBD FORM inter-temporal CGE models efficiently. NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 8 / 26
INTRODUCTION SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM SBBD MATRIX AND DIRECT SBBD matrix How it can be solved METHOD FOR SOLVING LINEAR fast in parallel INTER-TEMPORAL SYSTEM CGE MODEL AND SBBD FORM NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 9 / 26
SBBD matrix INTRODUCTION The Singly Bordered Block Diagonal matrix: ■ SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND A 1 C 1 DIRECT METHOD FOR SOLVING LINEAR A 2 C 2 SYSTEM (2) SBBD matrix ... ... How it can be solved fast in parallel A K C K INTER-TEMPORAL CGE MODEL AND SBBD FORM The linear equation system will have the form: ■ NUMERICAL ANALYSIS x 1 CONCLUSION A 1 C 1 b 1 x 2 REFERENCES A 2 C 2 b 2 . = (3) ... ... . x K A K C K b K x L SBBD solution PVH-TFK – 10 / 26
How it can be solved fast in parallel INTRODUCTION Factorisation individual sub-matrices (see Duff and Scott, 2004, for more ■ SOLUTION METHODS details): FOR CGE MODELS � L i � � � SBBD MATRIX AND � � � DIRECT METHOD FOR U i U i = P i A i C i Q i SOLVING LINEAR (4) � L i I S i SYSTEM SBBD matrix How it can be solved fast in parallel Forward elimination: ■ � � � L i � � y i � INTER-TEMPORAL ˆ CGE MODEL AND b i SBBD FORM = P i (5) � � y i � L i I b i NUMERICAL ANALYSIS CONCLUSION And solve interface problem: � y i will be summing-up to form the right hand ■ REFERENCES side � y L and S i to S . Sx L = � y L (6) Backward substitution: ■ U i Q i x i = y i − � U i Q i x L (7) SBBD solution PVH-TFK – 11 / 26
INTRODUCTION SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM INTER-TEMPORAL INTER-TEMPORAL CGE MODEL CGE MODEL AND SBBD FORM AND SBBD FORM Inter-temporal CGE model First order differential matrix and SBBD form NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 12 / 26
Inter-temporal CGE model INTRODUCTION SOLUTION METHODS = f ( x t , z t , λ t , y l ) x t FOR CGE MODELS (8) SBBD MATRIX AND = k ( x t , z t , λ t , y l ) z t DIRECT METHOD FOR (9) SOLVING LINEAR ˙ SYSTEM = h t ( x t , z t , λ t , y l ) λ (10) INTER-TEMPORAL CGE MODEL AND = g ( z t , λ t , y l ) y l (11) SBBD FORM Inter-temporal CGE model First order differential matrix and SBBD form NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 13 / 26
First order differential matrix and SBBD form INTRODUCTION SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM f 1 f 1 f 1 f 1 INTER-TEMPORAL x t z t y l λ t CGE MODEL AND k 1 k 1 k 1 h 1 SBBD FORM x t z t y l Inter-temporal CGE λ t (12) h 1 h 1 h 1 h 1 model First order differential x t z t y l λ t matrix and SBBD form g 1 g 1 g 1 0 z t y l λ t NUMERICAL ANALYSIS CONCLUSION REFERENCES SBBD solution PVH-TFK – 14 / 26
INTRODUCTION SOLUTION METHODS FOR CGE MODELS SBBD MATRIX AND DIRECT METHOD FOR SOLVING LINEAR SYSTEM INTER-TEMPORAL CGE MODEL AND NUMERICAL ANALYSIS SBBD FORM NUMERICAL ANALYSIS Inter-temporal CGE model Direct ordering vs no ordering Direct ordering vs automatic ordering (MC66) Serial computing performance Parallel computing performance The accuracy of FDM CONCLUSION REFERENCES SBBD solution PVH-TFK – 15 / 26
Recommend
More recommend