Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel...

9
1 Parallel Dynamics Simulation Using a Krylov-Schwarz Linear Solution Scheme Shrirang Abhyankar Member, IEEE , Emil Constantinescu, Barry F. Smith, Alexander J. Flueck Senior Member, IEEE, Daniel A. Maldonado Abstract—Fast dynamics simulation of large-scale power sys- tems is a computational challenge because of the need to solve a large set of stiff, nonlinear differential-algebraic equations at every time step. The main bottleneck in dynamic simulations is the solution of a linear system during each nonlinear iteration of Newton’s method. In this paper, we present a parallel Krylov- Schwarz linear solution scheme that uses the Krylov subspace- based iterative linear solver GMRES with an overlapping re- stricted additive Schwarz preconditioner. Performance tests of the proposed Krylov-Schwarz scheme for several large test cases ranging from 2,000 to 20,000 buses, including a real utility network, show good scalability on different computing architectures. Index Terms—Dynamics simulation, GMRES, iterative linear solution, Krylov subspace, Parallel processing, Schwarz precon- ditioning, Transient stability, Power system dynamics I. I NTRODUCTION D Ynamics simulation, or transient stability analysis, is an important function in the planning, design, and post- disturbance analysis of power systems but its application is restricted to offline studies because of the computational requirements. Providing system operators with the capability to examine the system dynamics in real-time, or faster than real time, creates a new paradigm in power system operation by facilitating real time or predictive control actions. This is particularly important because the power system behavior is becoming increasingly dynamic. A number of factors contribute to this increased dynamic behavior of power systems. First, today’s power systems are being stressed due to increasing load in certain zones, yet transmission line capacity is stagnant. Second, the economic benefits of deregulation have pushed the system operation to its limits, decreasing the stability margins. Third, the distribution system is becoming increasingly “active", leading to possi- ble two-way power flows from distribution to transmission. Fourth, the lowering of system inertia, as more renewable energy sources are installed, has introduced frequency and voltage control problems. Fifth, situational awareness of vari- ability and unpredictability of these renewable energy sources, for example, decreased output of a solar PV installation due to cloud cover, is a need expressed by the operators. Finally, the prediction and mitigation of cascading outages, that cannot be predicted by snapshots of the current operating state obtained every few seconds by state estimation, is an important concern for utilities. This material is based upon support by U.S. Dept. of Energy, Office of Elec- tricity, Advanced Grid Modeling Research, under Contract DE-OE0000624 A key requirement to achieve real-time dynamics analysis is the acceleration of dynamics simulation tools. This need for faster power grid dynamics simulation (or transient stability analysis) has also been expressed by the power system com- munity in recent years [1], [2]. However, real-time dynamics simulation of a utility-sized networks comprising thousands of buses is challenging because of the difficulty in solving a set of equations containing tens of thousands of variables in a few milliseconds. For instance, Huang and Nieplocha [3] reported that a simulation of 30 seconds of dynamic behavior of the Western Interconnection requires about 10 minutes of computation time today on an optimized single processor. As processor speeds were increasing, real-time dynamics simulation appeared possible in the not-too-distant future. Unfortunately, processor clock speeds saturated about a decade ago, and real-time dynamics simulation remains a grand computing challenge. Dynamics simulation of a large-scale power system is computationally challenging because of the presence of a large set of stiff, nonlinear differential-algebraic equations (DAEs), where the differential equations model dynamics of the rotat- ing machines (e.g., generators and motors) and the algebraic equations represent the transmission system and quasi-static loads. The electrical power system is expressed as a set of nonlinear DAEs, as given in (1), where f : R m × R n R m and g : R m × R n R n are vector-valued nonlinear functions that model the quasi steady-state dynamics of the rotating machines and the network, respectively, and x R m and y R n are the dynamic states of the machines and the network, respectively. dx dt = f (x, y) 0 = g(x, y) (1) The solution of the dynamic model given in (1) using a simultaneous implicit (SI) solution scheme [4] needs the following: A numerical integration scheme, for example Implicit trapezoidal, to convert the differential-algebraic equations to purely algebraic form A nonlinear solution scheme (typically Newton’s method) to solve the resultant nonlinear algebraic equations A linear solver to solve the update step (direction) at each iteration of the nonlinear solution Prior experience in accelerating dynamics simulations of large power systems [5], [6] revealed that the main bottleneck in these simulations is the solution of the linear system during

Transcript of Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel...

Page 1: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

1

Parallel Dynamics Simulation Using aKrylov-Schwarz Linear Solution Scheme

Shrirang Abhyankar Member, IEEE , Emil Constantinescu, Barry F. Smith, Alexander J. Flueck Senior Member,IEEE, Daniel A. Maldonado

Abstract—Fast dynamics simulation of large-scale power sys-tems is a computational challenge because of the need to solvea large set of stiff, nonlinear differential-algebraic equations atevery time step. The main bottleneck in dynamic simulations isthe solution of a linear system during each nonlinear iterationof Newton’s method. In this paper, we present a parallel Krylov-Schwarz linear solution scheme that uses the Krylov subspace-based iterative linear solver GMRES with an overlapping re-stricted additive Schwarz preconditioner. Performance tests ofthe proposed Krylov-Schwarz scheme for several large testcases ranging from 2,000 to 20,000 buses, including a realutility network, show good scalability on different computingarchitectures.

Index Terms—Dynamics simulation, GMRES, iterative linearsolution, Krylov subspace, Parallel processing, Schwarz precon-ditioning, Transient stability, Power system dynamics

I. INTRODUCTION

DYnamics simulation, or transient stability analysis, is animportant function in the planning, design, and post-

disturbance analysis of power systems but its applicationis restricted to offline studies because of the computationalrequirements. Providing system operators with the capabilityto examine the system dynamics in real-time, or faster thanreal time, creates a new paradigm in power system operationby facilitating real time or predictive control actions. This isparticularly important because the power system behavior isbecoming increasingly dynamic.

A number of factors contribute to this increased dynamicbehavior of power systems. First, today’s power systems arebeing stressed due to increasing load in certain zones, yettransmission line capacity is stagnant. Second, the economicbenefits of deregulation have pushed the system operation to itslimits, decreasing the stability margins. Third, the distributionsystem is becoming increasingly “active", leading to possi-ble two-way power flows from distribution to transmission.Fourth, the lowering of system inertia, as more renewableenergy sources are installed, has introduced frequency andvoltage control problems. Fifth, situational awareness of vari-ability and unpredictability of these renewable energy sources,for example, decreased output of a solar PV installation due tocloud cover, is a need expressed by the operators. Finally, theprediction and mitigation of cascading outages, that cannot bepredicted by snapshots of the current operating state obtainedevery few seconds by state estimation, is an important concernfor utilities.

This material is based upon support by U.S. Dept. of Energy, Office of Elec-tricity, Advanced Grid Modeling Research, under Contract DE-OE0000624

A key requirement to achieve real-time dynamics analysis isthe acceleration of dynamics simulation tools. This need forfaster power grid dynamics simulation (or transient stabilityanalysis) has also been expressed by the power system com-munity in recent years [1], [2]. However, real-time dynamicssimulation of a utility-sized networks comprising thousandsof buses is challenging because of the difficulty in solvinga set of equations containing tens of thousands of variablesin a few milliseconds. For instance, Huang and Nieplocha[3] reported that a simulation of 30 seconds of dynamicbehavior of the Western Interconnection requires about 10minutes of computation time today on an optimized singleprocessor. As processor speeds were increasing, real-timedynamics simulation appeared possible in the not-too-distantfuture. Unfortunately, processor clock speeds saturated abouta decade ago, and real-time dynamics simulation remains agrand computing challenge.

Dynamics simulation of a large-scale power system iscomputationally challenging because of the presence of a largeset of stiff, nonlinear differential-algebraic equations (DAEs),where the differential equations model dynamics of the rotat-ing machines (e.g., generators and motors) and the algebraicequations represent the transmission system and quasi-staticloads. The electrical power system is expressed as a set ofnonlinear DAEs, as given in (1), where f : Rm × Rn → Rmand g : Rm×Rn → Rn are vector-valued nonlinear functionsthat model the quasi steady-state dynamics of the rotatingmachines and the network, respectively, and x ∈ Rm andy ∈ Rn are the dynamic states of the machines and thenetwork, respectively.

dx

dt= f(x, y)

0 = g(x, y)(1)

The solution of the dynamic model given in (1) using asimultaneous implicit (SI) solution scheme [4] needs thefollowing:• A numerical integration scheme, for example Implicit

trapezoidal, to convert the differential-algebraic equationsto purely algebraic form

• A nonlinear solution scheme (typically Newton’s method)to solve the resultant nonlinear algebraic equations

• A linear solver to solve the update step (direction) at eachiteration of the nonlinear solution

Prior experience in accelerating dynamics simulations oflarge power systems [5], [6] revealed that the main bottleneckin these simulations is the solution of the linear system during

Page 2: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

2

each iteration of Newton’s method, typically constituting 90-95% of the total execution time.

In this paper, we present parallel dynamics simulationaccelerated by a combination of a Krylov subspace iterativelinear solver and a Schwarz preconditioner. Specifically, theKrylov-subspace iterative solver GMRES (Generalized Min-imum Residual Method) is used with restricted overlappingadditive Schwarz preconditioning. This approach was foundto be scalable for the solution of large power flow problemsin previous work [7]. This paper presents a detailed evaluationof the proposed linear solution scheme on four test systems,including a real utility network, on two different computerarchitectures. Test results on these dynamics cases demonstrategood scalability of the proposed approach in comparison withusing a parallel direct linear solver.

The organization of this paper is as follows. Section IIpresents an overview of parallel dynamics simulation ap-proaches. Domain decomposition of the power system dynam-ics equations (1) is discussed in section III. Sections IV andV present the details of the Krlov-subspace iterative linearsolution scheme and Schwarz preconditioning, respectively.Section VI presents the test system and multicore machinedetails and discusses the performance of the proposed ap-proach on different test systems. Section VII summarizes ourconclusions.

II. PARALLEL DYNAMICS SIMULATIONS

A natural way to speed up simulations is to use parallelcomputing techniques, namely, share the computational loadamong multiple processing units. In the context of parallelalgorithms for dynamics simulations, most of the researcheffort was done over the past decade. Three parallelizationapproaches - spatial parallelization, temporal parallelization,waveform relaxation (hybrid space-time parallelization) - havebeen explored by power system researchers.

The parallel-in-space algorithms partition the given networkinto loosely coupled or independent subnetworks. Each pro-cessor is then assigned equations for a subnetwork. The parti-tioning strategy for the network division is critical for parallel-in-space algorithms to minimize the coupling between thesubnetworks, that is, to reduce the interprocessor communica-tion, and balance the work load. Once a suitable partitioningstrategy is selected, the next key step is the solution of thelinear system in each Newton iteration. Several linear solutionschemes have been proposed in the literature, of which themost prominent are the very dishonest Newton method andthe conjugate gradient method. Chai et. al., [8] use the verydishonest Newton method in which the factorization of theJacobian matrix is done only when a certain fixed numberof iterations are exceeded. Decker et. al., [9] decomposes thenetwork equations in a block-bordered diagonal form and thenuse a hybrid solution scheme using LU and conjugate gradient.In [10], Decker et. al. solve the network by a block-parallelversion of the preconditioned conjugate gradient method. Thenetwork matrix in [10] is in a near block diagonal form. Aparallel Schur-complement-based domain decomposition ap-proach was investigated in [11] for accelerating the dynamicssimulation on shared-memory machines.

The parallel-in-time approach for dynamics simulations wasintroduced in [12]. The idea is to combine the differential andalgebraic equations over several time steps, create a biggersystem, and solve them simultaneously by using the Newtonmethod. All the equations for several integration steps areassigned to each processor.

Waveform relaxation methods [13], [14], [15] involve ahybrid scheme of space and time parallelization in whichthe network is partitioned in space into subsystems and thendistributed to the processors. Several integration steps for eachsubsystem are solved independently to get a first approxima-tion [16]. The results are then exchanged, and the process isrepeated. The advantage of this scheme is that each subsystemcan use a different integration step and/or different integrationalgorithm (multirate integration).

III. DOMAIN DECOMPOSITION

Domain decomposition algorithms operate by dividing theentire domain W into smaller non-overlapping subdomainsW 0i where

W =

N⋃i=1

W 0i (2)

and then assigning each subdomain W 0i to a processing unit. In

the context of power systems, this approach means partitioningthe power system network into several subnetworks whereeach subnetwork is assigned to a processing unit. Figure 1shows an example of the division of the IEEE 118-bus systeminto two subnetworks. Each subnetwork is then the domain of

Fig. 1. Partitioning of the IEEE 118 bus system for 2 processing units

operation of a processing unit; in other words, each processingunit is assigned the DAE for the subnetwork. Equation (3)represents the equations for each processing unit, where thesubscript p represents the variables for the current processingunit and the subscript c represents the variables needed fromother processing units to compute the function on the currentprocessing unit.

dxpdt

= f(xp, yp, yc)

0 = g(xp, yp, yc)(3)

Note that the differential equations (i.e. the electromechan-ical machine equations) are naturally decoupled because they

Page 3: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

3

are incident at a bus only, whereas the algebraic networkequations require communication with other processing unitsto compute their local function. Hence the partitioning of thenetwork is done by using only the topology of the network.The partitioning of the network can be done by hand via judi-cious topology scanning or by graph-partitioning techniques.In this work, we use the ParMetis package [17] for performingthe network partitioning.

IV. KRYLOV SUBSPACE ITERATIVE METHODS

Krylov subspace iterative methods are the most popularamong the iterative methods for solving large linear systems.These methods are based on projection onto subspaces calledKrylov subspaces of the form b, Ab,A2b, A3b, . . .. A generalprojection method for solving the linear system

Ax = b (4)

is a method that seeks an approximate solution xm from anaffine subspace x0 +Km of dimension m by imposing

b−Axm ⊥ Lm,

where Lm is another subspace of dimension m and x0 isan arbitrary initial guess to the soution. A Krylov subspacemethod is a method for which the subspace Km is the Krylovsubspace

Km(A, r0) = span{r0, Ar0, A2r0, A3r0, . . . , A

m−1r0},

where r0 = b−Ax0. The different versions of Krylov subspacemethods arise from different choices of the subspace Lm andfrom the ways in which the system is preconditioned.

A. Generalized Minimum Residual Method

GMRES [18] is a projection method based on taking Lm =AKm(A, r0) in which Km is the mth Krylov subspace. Thistechnique minimizes the residual norm over all vectors x ∈x0 + Km. In particular, GMRES creates a sequence xm thatminimizes the norm of the residual at step m over the mthKrylov subspace

||b−Axm||2 = min||b−Ax||2. (5)

At step m, an Arnoldi process is applied for the mth Krylovsubspace in order to generate the next basis vector. When thenorm of the new basis vector is sufficiently small, GMRESsolves the minimization problem

ym = argmin||βe1 − H̄my||2,

where H̄m is the (m+ 1)×m upper Hessenberg matrix.

B. Preconditioning

The convergence of the Krylov subspace linear solversdepends on the eigenvalues of the operating matrix A andcan be slow if the matrix has widely dispersed eigenvalues,such as ill-conditioned power system matrices. Hence, in orderto speed the convergence, a preconditioner matrix M , where

M−1 approximates A−1, is generally used. A preconditioneris a matrix that transforms the linear system

Ax = b

into another system with a better spectral properties for theiterative solver. If M is the preconditioner matrix, then thetransformed linear system is

M−1Ax = M−1b. (6)

Equation 6 is referred to as being preconditioned from the left,but one can also precondition from the right

AM−1y = b, x = M−1y, (7)

or split preconditioning

M−11 AM−12 y = M−11 b, x = M−12 y, (8)

where the preconditioner is M = M1M2.Designing a good preconditioner depends on the choice

of iterative method, problem characteristics, and so forth.In general a good preconditioner should be inexpensive toconstruct and apply, and the preconditioned system should beeasy to solve.

V. OVERLAPPING SCHWARZ PRECONDITIONING

In the area of domain decomposition algorithms, con-siderable research has been done on overlapping Schwarzalgorithms [19], [20], [21], [22]. Our interest for this paperis on an overlapping additive Schwarz preconditioner (ASM),and in particular its variant the restricted additive Schwarzpreconditioner introduced by Cai and Sarkis [22], which theauthors found to be scalable in a previous work [7]. Wefirst describe the general mechanism of constructing an ASMpreconditioner as described in [19] and then present the variantproposed by Cai and Sarkis [22].

A. Additive Schwarz Method (ASM)

Consider a linear system of the form

Ax = b, (9)

where A = (aij) is an n×n nonsingular sparse matrix, havinga symmetric nonzero pattern. Define the graph G = (W,E),where the set of vertices W = {1, ..., n} represent the nunknowns and the edge set E = {(i, j) |aij 6= 0} representsthe pairs of vertices that are coupled by a nonzero elementin A. Here n is the size of the matrix. Since the nonzeropattern is symmetric, the adjacency graph G is undirected.Assume that the graph partition has been applied, resultingin N non-overlapping subsets W 0

i whose union is W . Define{W 1i

}as the one overlap partition of W , where W 1

i ⊃W 0i is

obtained by including all the immediate neighboring verticesof the vertices in W 0

i . An example for a domain with twosubdomains with a one overlap partition is shown in Figure 2.

Extending this to δ-overlaps, we can define the δ-overlappartition of W as,

W =

N⋃i=1

W δi ,

Page 4: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

4

Fig. 2. Illustrative example for two overlapping subdomains. Nodes marked• are in subdomain 1 (W 0

1 ) while ◦ represents nodes in subdomain 2 (W 02 ).

The solid circle is the one overlap partition for subdomain 1 (W 11 ) and dashed

circle for subdomain 2 (W 12 )

where W δi ⊃ W 0

i with δ levels of overlaps with its neigh-boring subdomains. With each subdomain W 0

i , we define arestriction operator R0

i . In matrix terms, R0i is a n × n sub-

identity matrix whose diagonal elements are set to one if thecorresponding node belongs to W 0

i and to zero otherwise.Similarly for δ-overlapping, the restriction operator Rδi canbe defined for each W δ

i . With this, the subdomain matrix canbe defined as

Ai = RδiARδi . (10)

Note that although Ai is not invertible, its restriction to thesubspace

A−1i|Li≡(

(Ai)|Li

)−1can be inverted. Here Li is the vector space spanned by theset W δ

i in Rn. The additive Schwarz preconditioner can bedefined as

M−1AS =∑

RδiA−1i|Li

Rδi . (11)

Cai and Sarkis [22] proposed a variant of the additiveSchwarz preconditioning called the restricted additive Schwarzpreconditioner. They introduced a simple and efficient changeby removing the overlap in the first restriction operator asgiven in the following.

M−1RAS =∑

R0iA−1i|Li

Rδi (12)

Their main motivation was to save half the communicationcost because R0

i x does not involve any data exchange withneighboring processors. They also observed that in comparisonwith the original additive Schwarz algorithm, both the iterationcount and the CPU time were reduced.

VI. TEST RESULTS

In this section, we present a detailed evaluation of theproposed scheme on different test systems, ranging from 2,000to 20,000 buses, on two multicore machines.

A. Multicore machine details

The configuration of the two machines used for scalabil-ity studies is given in Table I. Machine A has two IntelXeon e5-2667 processors with DDR3-1600 memory and fourmemory channels giving a theoretical memory bandwidth of102.2 GB/s (1600*8*4*2), while Machine B has two Intel

Xeon e5-2650 v2 processors with DDR3-1866 memory andfour memory channels has 119.4 GB/s theoretical memorybandwidth. To compare the scalability of the two machines,we define the following estimate for the maximum achievablescalability, Smax,

Smax =Maximum achievable memory bandwidth

Bandwidth of single processing unit(13)

Note that this estimate is based on the achievable memorybandwidth as theoretical memory is never attained as theCPU is not transferring data 100% of the time. We use theSTREAM benchmark [23] to calculate the maximum achiev-able bandwidth. This benchmark estimates the achievablememory bandwidth from four basic floating-point operations:copy, scale, add, and triad. As seen in Table I, an estimatedSmax of 3.6 and 6.4 was obtained for machine A and machineB, respectively. Thus, one can expect that a higher scalabilitycan be achieved with machine B.

TABLE IMACHINE ARCHITECTURE DETAILS

Specs Machine A Machine BSockets 2 2

Processor Intel Xeon E5-2667 Intel Xeon E5-2650 v2Processor speed 2.9 GHz 2.6 GHz

L3 cache/processor 15 MB 20 MBPhysical cores/processor 6 8

Hyperthreading No YesProcessing units 12 32

Memory size (RAM) 64 GB 128 GBMemory type DDR3-1600 DDR3-1866

Max. memory bandwidth(theoretical) 102.2 GB/s 119.4 GB/s

Max. achievable bandwidth 56.4 GB/s 70.4 GB/sMemory bandwidth

(single process) 14.5 GB/s 11 GB/sMax. achievable speedup 3.9 6.4

B. Implementation details

The simulator developed in this work is capable of modelingthree-phase unbalanced dynamics, unlike existing dynamicssimulators that support only positive sequence representation.This three-phase representation implies a possible ninefoldincrease in the computational burden for the network portion.Details of the three-phase dynamics simulator can be found in[5] and [24]. The code for the developed simulator is writtenin C using the PETSc [25] library framework and compiledwith GNU’s gcc compiler with -O3 optimization.

C. Test case details

The inventory of the test cases is given in Table II. Test casecase2737sop, available with MATPOWER [26], representsthe Polish 400, 220, and 110 kV networks during summer2004 off-peak conditions. The data for case9241pegase, alsoavailable with MATPOWER, stems from the Pan EuropeanGrid Advanced Simulation and State Estimation (PEGASE)project, part of the 7th Framework Program of the European

Page 5: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

5

Union. Test case case22996 is a synthetic test case createdby combining several MATPOWER test cases by adding tie-lines for connecting the different networks. The case labeledcaseUtil is a real utility network comprising approximately18,500 buses.

TABLE IIINVENTORY OF TEST CASES

Case Name Buses Generators Branchescase2737sop [26] 2737 399 3506

case9241pegase [27] 9241 1445 16049case22996 [7] 22996 2416 27408

caseUtil 18500 2000 21000

For the dynamic simulations, all the generators were mod-eled by using the GENROU model [28] with an IEEE Type1 exciter model [28], and the loads were modeled as constantimpedances. The numerical integration scheme used is an im-plicit trapezoidal scheme with a time step of 0.008333 seconds(i.e., half-cycle for 60 Hz frequency). All the simulations onthe first three test cases were run for 10 seconds with a six-cycle temporary three-phase fault applied at a bus at 1 second.For the utility network, a twelve-cycle temporary fault wasapplied at 0.2 seconds.

D. Serial performance

Tables III and IV list the execution times on a singleprocessor for a 10-second simulation using two different linearsolvers. PETSc provides a direct sparse linear solver (LUfactorization + triangular solves) that uses an efficient memoryaccess scheme for storing the factored L and U matrices[29]. KLU [30] is a software package that provides a directsparse linear solver specifically for solving linear systems thatarise in circuit simulation problems and has been reported asan efficient linear solver for power system applications [31],[32]. Various reordering strategies, available with PETSc andSuiteSparse [33], were investigated to determine the optimalreordering strategy, namely, the ordering scheme resulting inthe least number of nonzeros in the factored matrix. Thequotient minimum degree ordering in PETSc was found to bethe best reordering on the systems that we tested. In addition,a very dishonest Newton strategy is also used that updates thenumerical factorization only at fault-on and fault-off times.

TABLE IIIEXECUTION TIMES FOR SINGLE CORE USING PETSC AND KLU ON

MACHINE A

Test System PETSc KLUcase2737sop 24.4 27.149241pegase 93.27 113.27case22996 144.16 180.39caseUtil 161.86 203.91

E. Parallel linear solver tuning

All the simulations done use a Krylov-Schwarz linearsolution scheme GMRES preconditioned with a restricted

TABLE IVEXECUTION TIMES FOR SINGLE CORE USING PETSC AND KLU ON

MACHINE B

Test System PETSc KLUcase2737sop 23.58 25.299241pegase 90.79 108.85case22996 138.02 170.71

overlapping additive Schwarz scheme. Scalability results withdifferent amounts of overlap are presented in the followingsections. A lagging preconditioner, or very dishonest precon-ditioning strategy [5], was used to update the preconditioneronly at fault-on and fault-off times. A comparison with usinga multifrontal direct parallel linear solver, available throughthe MUMPS package [34], is also presented.

The overlapping Schwarz preconditioners need the solutionof the subdomain linear system

A−1i|Liri (14)

during the GMRES iterations, where ri = Rδi (b−Ax) is therestricted error. Equation (14) can be done either by director by iterative linear solution schemes. Our experiments onthese test cases with stationary iterative schemes such asas Gauss-Jacobi, Gauss-Siedel, and successive over-relaxation(SOR) corroborate their poor convergence. In this work, wesolve the linear system in Equation (14) by a direct solver(LU factorization + triangular solves). For a small numberof subdomains, direct solve using LU is expensive becausethe subdomains are large, but the subdomain solve is robust.With more processors, the subdomain sizes become smaller,reducing the cost of direct solves. To minimize the fill-inscreated by LU factorization, we use a quotient minimumdegree reordering scheme.

F. Parallel performance

Figures 3–8 show the scalability of the dynamics simulationwith the Krylov-Schwarz linear solution scheme GMRESpreconditioned with a restricted overlapping additive Schwarzscheme, with different amounts of overlap. For all the testcases, the Krylov-Schwarz linear solution was found to bemore scalable than a parallel direct solution using MUMPS.In fact, parallel direct solution with MUMPS yielded poorscalability for all the cases tested.

Table V summarizes the peak scalability observed on thedifferent test cases on the two machines.

TABLE VPEAK SCALABILITY FOR DIFFERENT TEST CASES

case2737sop case9241pegase case22996Mac. A speed up 1.65 2.95 3.09

Mac. A cores 4 8 8Mac. A overlap 3 3 3

Mac. B speed up 3.53 5.06 4.21Mac. B cores 16 16 16

Mac. B overlap 2 3 3

More scalability was observed for larger overlaps with theoverlapping Schwarz preconditioner. This behavior is typical

Page 6: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

6

with most overlapping Schwarz methods where more overlapimplies a stronger preconditioner resulting in faster conver-gence of GMRES. However, more overlap also means anincrease in the time to build the preconditioner, which mayresult in overall slowdown. Hence, an optimal overlap needsto be chosen that balances convergence speed and executiontime. In our experiments, overlaps of 2 and 3 were found tobe optimal on the different test cases. Overlaps greater than 3did not increase the scalability because of the increased timeto build the preconditioner and communication.

# of Cores2 4 8 12

Sp

ee

du

p

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 3. Machine A: Scalablility of the simulator on case2737sop with differentlinear solution schemes

# of Cores2 4 8 12 16

Sp

ee

du

p

0.5

1

1.5

2

2.5

3

3.5

4

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 4. Machine B: Scalablility of the simulator on case2737sop with differentlinear solution schemes

For case2737sop, the smallest of the test cases, as seen inFigures 3 and 4, the Schwarz preconditioners with overlapgreater than 1 are more scalable compared to overlap 0 anddirect parallel solver MUMPS. The max. achievable scalabilityon Machine A was found to be 1.6 on 4 cores, while forMachine B it was 3.53 on 16 cores. On Machine A, thescalability decreases after 4 cores for the overlapping precondi-

tioners because the preconditioner becomes is weaker leadingto more iterations for the Krylov-iterative solver resulting inmore communication. For the same simulations on more thanfour cores on Machine B, speed up is still obtained as MachineB has more memory bandwidth.

We note that, with an overlap-0 Schwarz preconditioner, thedynamics simulation did not converge for test case 2737sopon 16 cores on Machine B. Hence, the scalability of thesimulation on 16 cores with overlap 0 is missing in Fig. 4.The reason for this divergence is that the overlap-0 basedpreconditioner is weak on 16 cores for this test case. This is aknown issue with Schwarz-based methods on larger number ofcores, i.e., Schwarz-based preconditioner with smaller overlapbecome weaker as the number of cores increase.

# of Cores2 4 8 12

Sp

ee

du

p

0.5

1

1.5

2

2.5

3

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 5. Machine A: Scalablility of the simulator on case9241pegase withdifferent linear solution schemes

# of Cores2 4 8 12 16

Sp

ee

du

p

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 6. Machine B: Scalablility of the simulator on case9241pegase withdifferent linear solution schemes

The max. achievable scalability for case9241pegase wasfound to be 2.95 on 8 cores and 5.06 on 16 cores withoverlap-3 for Machine A and Machine B, respectively. As

Page 7: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

7

seen in Figures 5 and 6, the Schwarz preconditioners withoverlap greater than 1 are more scalable compared to overlap0 and direct parallel solver MUMPS. case9241pegase beingconsiderably larger, almost three-folds, than case2737sop, thedecrease in the speed-up was for Schwarz-preconditioners withoverlaps greater than 1 was observed beyond 8 cores.

# of Cores2 4 8 12

Sp

eed

up

0.5

1

1.5

2

2.5

3

3.5

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 7. Machine A: Scalablility of the simulator on case22996 with differentlinear solution schemes

# of Cores2 4 8 12 16

Sp

ee

du

p

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 8. Machine B: Scalablility of the simulator on case22996 with differentlinear solution schemes

Similar scalability behavior as case9241pegase was seen forcase22996 as shown in Figures 7 and 8. On Machine A, a peakscalability of 3.09 was observed on 8 cores, while for MachineB it was 4.21 on 16 cores.

G. Real utility test case

Figure 9 shows the scalability of dynamics simulations fordifferent linear solvers on the utility network on Machine A.A maximum speedup of 2.13 was obtained on 8 cores with theKrylov-overlapping Schwarz method with an overlap of 3. Fordynamics simulations on 8 cores and beyond, the solution didnot converge for overlap-0 and hence the scalability results

are not shown. Our conjecture for this behavior is that thepreconditioner is really weak leading to the divergence ofthe Krylov linear solver. This suggests that using an overlapgreater than 1 results in a more robust preconditioner.

# of Cores2 4 8 12 16

Sp

ee

du

p

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

2.2

Overlap 0Overlap 1Overlap 2Overlap 3MUMPS

Fig. 9. Machine A: Scalablility of the simulator on real utility network withdifferent linear solution schemes

VII. CONCLUSIONS

This paper presented a Krylov-Schwarz linear solutionscheme for accelerating parallel dynamics simulation. Theproposed approach shows good scalability on different powersystem test cases ranging from 2,000 to 20,000 buses, in-cluding a real utility network. Performance of the linearsolution scheme shows that an overlap of 2 or 3 is optimalfor overlapping Schwarz preconditioning for the given testcases. A metric based on memory bandwidth was presented forestimating the maximum achievable speedup of a computingarchitecture to guide scalability testing of parallel dynamicssimulations.

ACKNOWLEDGMENTS

This work was supported by U.S. Dept. of Energy, Office ofElectricity, Advanced Grid Modeling Research, under ContractDE-OE0000624.

REFERENCES

[1] J. H. Eto and R. J. Thomas. Computational needs for the next gen-eration electric grid. Technical Report LBNL5105E, U.S. Departmentof Energy, 2011. http://energy.gov/sites/prod/files/FINAL_CompNeeds_Proceedings2011.pdf.

[2] Electric Power Research Institute. Grid transformation workshopresults. Technical Report 1025087, Electric Power ResearchInstitute, 2012. http://my.epri.com/portal/server.pt?space=CommunityPage&cached=true&parentname=ObjMgr&parentid=2&control=SetCommunity&CommunityID=404&RaiseDocID=000000000001025087&RaiseDocType=Abstract_id.

[3] Z. Huang and J. Nieplocha. Transforming power grid operations viahigh performance computing. In Proceedings of the IEEE Power andEnergy Society General Meeting 2008, 2008.

[4] P. Sauer and M. A. Pai. Power System Dynamics and Stability. PrenticeHall Inc., 1998.

Page 8: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

8

[5] S. Abhyankar. Development of an implicitly coupled electromechanicaland electromagnetic transients simulator for power systems. PhD thesis,Illinois Institute of Technology, 2011.

[6] S. Abhyankar and A. Flueck. Real-time power system dynamicssimulation using a parallel block-jacobi preconditioned Newton-GMRESscheme. In SCC ‘12 Proceedings of the 2012 SC Companion: HighPerformance Computing, Networking and Analytics for the Power Grid,pages 299–305. ACM, 2012.

[7] S. Abhyankar, E. Constantinescu, and B. Smith. Evaluation of over-lapping additive Schwarz preconditioning for parallel solution of verylarge power flow problems. In Proceedings of the 3rd InternationalWorkshop on High Performance Computing, Networking and Analyticsfor the Power Grid. ACM, 2013.

[8] J. Chai, S. Zhu, A. Bose, and D. J. Tylavsky. Parallel newton typemethods for power system stability analysis using local and sharedmemory multiprocessors. IEEE Transactions on Power Systems, 6:9–15,1991.

[9] I. Decker, D. Falcao, and E. Kaszkurewicz. Parallel implementationof power system dynamic simulation methodology using the conjugategradient method. IEEE Transactions on Power Systems, 7:458–465,1992.

[10] I. Decker, D. Falcao, and E. Kaszkurewicz. Conjugate gradient methodsfor power system dynamic simulation on parallel computers. IEEETransactions on Power Systems, 7:629–636, 1994.

[11] P. Aristidou, D. Fabozzi, and T. V. Cutsem. Dynamic simulation oflarge-scale power systems using a parallel Schur-Complement-Baseddecomposition method. IEEE Transactions on Parallel and DistributedSystems, 25:2561–2570, 2013.

[12] F. Alvarado. Parallel solution of transient problems by trapezoidalintegration. IEEE Transactions on Power Apparatus and Systems, PAS-98:1080–1090, 1979.

[13] M. Ilic, M. Crow, and M. Pai. Transient stability simulation by waveformrelaxation methods. IEEE Transactions on Power Systems, 2:943–952,1987.

[14] M. Crow and M. Ilic. The parallel implementation of waveformrelaxation methods for transient stability simulations. IEEE Transactionson Power Systems, 5:922–932, 1990.

[15] L. Hou and A. Bose. Implementation of the waveform relaxationalgorithm on a shared memory computer for the transient stabilityproblem. IEEE Transactions on Power Systems, 12:1053–1060, 1997.

[16] D. Falcao. High performance computing in power system applications,September 1997. Invited Lecture at the 2nd International Meeting onVector and Parallel Processing (VECPAR ’96).

[17] George Karypis and V. Kumar. ParMETIS: Parallel graph partitioningand sparse matrix ordering library. Technical Report 97-060, Departmentof Computer Science, University of Minnesota, 1997. http://www.cs.umn.edu/~metis.

[18] Y. Saad. Iterative Methods for Sparse Linear Systems. SIAM, 2000.[19] X. C. Cai and Y. Saad. Overlapping domain decomposition algorithms

for general sparse matrices. Numerical Linear Algebra Applications,3:221–237, 1996.

[20] T. Chan and T. Mathew. Domain decomposition algorithms. ActaNumerica, pages 61–143, 1994.

[21] B. Smith, P. Bjorstad, and W. Gropp. Domain decomposition: ParallelMultilevel Methods for Elliptic Partial Differential Equations. Cam-bridge University, 1996.

[22] X. C Cai and M. Sarkis. A restricted additive Schwarz preconditionerfor general sparse linear systems. SIAM Journal of Scientific Computing,21:792–797, 1999.

[23] J. D. McCalpin. Memory bandwidth and machine balance in currenthigh performance computers. IEEE Technical Committee on ComputerArchitecture Newsletter, pages 19–25, 1995.

[24] S. Abhyankar, A. Flueck, X. Zhang, and H. Zhang. Development ofa parallel three-phase transient stability simulator for power systems.In Proceedings of the 1st International Workshop on High PerformanceComputing, Networking and Analytics for the Power Grid. ACM, 2011.

[25] Satish Balay, Shrirang Abhyankar, Mark F. Adams, Jed Brown, PeterBrune, Kris Buschelman, Lisandro Dalcin, Victor Eijkhout, William D.Gropp, Dinesh Kaushik, Matthew G. Knepley, Lois Curfman McInnes,Karl Rupp, Barry F. Smith, Stefano Zampini, Hong Zhang, and HongZhang. PETSc users manual. Technical Report ANL-95/11 - Revision3.7, Argonne National Laboratory, 2016.

[26] R. Zimmerman and C. Murillo-Sanchez. Matpower 4.0 users manual.Technical report, Power Systems Engineering Research Center, 2011.

[27] S. Fliscounakis, P. Panciatici, F. Capitanescu, and L. Wehenkel. Con-tingency ranking with respect to overloads in very large power systems

taking into account uncertainty, preventive and corrective actions. IEEETransactions on Power Systems, 28:4909–4917, 2013.

[28] Siemens PTI Inc. PSS/E Operation Program Manual: Volume 2, version30.2, 2012.

[29] B. Smith and H. Zhang. Sparse triangular solves for ILU revisited:data layout crucial to better performance. International Journal of HighPerformance Computing Applications, 25:386–391, 2010.

[30] T. A. Davis and E Natarajan. Algorithm 907: Klu, a direct sparse solverfor circuit simulation problems. ACM Transactions on MathematicalSoftware, 37:3426–3446, 2010.

[31] F. Pruvost, T. Cadeau, P. Laurent-Gengoux, F. Magoules, and F.-X.Bouchez. Numerical accelerations for power system transient stabilitysimulations. In Proceedings of 17th Power System Computation Con-ference, pages 1056–1063, 2011.

[32] S. K. Khaitan and A. Gupta. High Performance Computing in Powerand Energy Systems. Springer, 2013.

[33] T. Davis. SuiteSparse Web page. http://faculty.cse.tamu.edu/davis/suitesparse.html, 2015.

[34] P. R. Amestoy, I. S. Duff, J-Y. L’Excellent, and J. Koster. A fullyasynchronous multifrontal solver using distributed dynamic scheduling.SIAM Journal on Matrix Analysis and Applications, 23(1):15–41, 2001.

[35] J. Demmel, J. Gilbert, and X. Li. SuperLU Web page. http://crd.lbl.gov/~xiaoye/SuperLU, 2015.

APPENDIX APETSC: PORTABLE EXTENSIBLE

TOOLKIT FOR SCIENTIFIC COMPUTATION [25]

The PETSc package consists of a set of libraries for creatingparallel vectors, matrices, and distributed arrays, and scalablelinear, nonlinear, and time-stepping solvers. In this work, weused the linear solver GMRES and the overlapping additiveSchwarz method (ASM) preconditioner class (ASM) availablein PETSc. The ASM preconditioner class includes severalvariants with the default being the restricted additive Schwarzpreconditioner. In addition, we used a fixed-step implicittrapezoidal integration scheme available through PETSc’ time-stepping library TS. PETSc also has a plug-in architecturefor third-party solvers and has interfaces available for severaldirect linear solvers, including SuperLU_Dist [35], MUMPS[34], and KLU [30].

Government License: The submitted manuscript has been cre-ated by UChicago Argonne, LLC, Operator of Argonne NationalLaboratory (“Argonne”). Argonne, a U.S. Department of EnergyOffice of Science laboratory, is operated under Contract No. DE-AC02-06CH11357. The U.S. Government retains for itself, andothers acting on its behalf, a paid-up nonexclusive, irrevocableworldwide license in said article to reproduce, prepare derivativeworks, distribute copies to the public, and perform publicly anddisplay publicly, by or on behalf of the Government.

Shrirang Abhyankar received his M.S degree(2006) and his Ph.D. degree (2011) in electricalengineering from Illinois Institute of Technology,Chicago. He is currently a computational engineer inthe Energy Sciences Division at Argonne NationalLaboratory. His research interests include scalablealgorithms for large-scale transient stability anal-ysis, combined electromechanical and electromag-netic simulation, and co-simulation of transmission-distribution dynamics. He is a co-developer of thePETSc library.

Page 9: Parallel Dynamics Simulation Using a Krylov …abhyshr/downloads/papers/TSG_2016.pdf · Parallel Dynamics Simulation Using a Krylov-Schwarz ... we present a parallel Krylov-Schwarz

9

Emil M. Constantinescu received his Ph.D. degreein computer science from Virginia Tech, Blacksburg,in 2008. He is currently a computational mathemati-cian in the Mathematics and Computer Science Di-vision at Argonne National Laboratory. His researchinterests include numerical analysis of time-steppingalgorithms and their applications to energy systems.

Barry F. Smith received his B.S. in mathematicsfrom Yale University in 1986 and his Ph. D. inmathematics from the Courant Institute/New YorkUniversity in 1990. He is a senior computationalmathematician at Argonne National Laboratory andleads the PETSc software development team.

Alexander J. Flueck received his B.S. degree(1991), M.Eng. degree (1992) and Ph.D. degree(1996) in electrical engineering from Cornell Uni-versity. He is currently an associate professor atthe Illinois Institute of Technology in Chicago.His research interests include three-phase transientstability, electromagnetic transient simulation, au-tonomous agent applications to power systems,transfer capability of large-scale electric power sys-tems, contingency screening with respect to voltagecollapse, and parallel simulation of power systems

via message-passing techniques on distributed-memory computer clusters.

Daniel A. Maldonado received his B.S. degree fromthe Universitat Politecnica de Valencia, Valencia,Spain, and M.Eng degree from the Illinois Instituteof Technology, Chicago. Currently, he is a Ph.D.candidate at the Illinois Institute of Technology. Hisresearch interests include transient stability simula-tion, state estimation, and optimal control.