CN108985622A - A kind of electric system sparse matrix Parallel implementation method and system based on DAG - Google Patents
A kind of electric system sparse matrix Parallel implementation method and system based on DAG Download PDFInfo
- Publication number
- CN108985622A CN108985622A CN201810772560.7A CN201810772560A CN108985622A CN 108985622 A CN108985622 A CN 108985622A CN 201810772560 A CN201810772560 A CN 201810772560A CN 108985622 A CN108985622 A CN 108985622A
- Authority
- CN
- China
- Prior art keywords
- node
- dag
- sparse matrix
- layer
- layering
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 75
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000006467 substitution reaction Methods 0.000 claims abstract description 32
- 230000005540 biological transmission Effects 0.000 claims abstract description 12
- 238000004422 calculation algorithm Methods 0.000 claims description 52
- 238000004891 communication Methods 0.000 claims description 8
- 230000001052 transient effect Effects 0.000 claims description 8
- 238000004458 analytical method Methods 0.000 description 8
- 238000010025 steaming Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012916 structural analysis Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Marketing (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Data Mining & Analysis (AREA)
- Entrepreneurship & Innovation (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Algebra (AREA)
- Operations Research (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Educational Administration (AREA)
- Databases & Information Systems (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Complex Calculations (AREA)
Abstract
The present invention provides a kind of electric system sparse matrix Parallel implementation method and system based on DAG, which comprises obtains the equation group for describing power transmission network state or description equipment operation condition corresponding sparse matrix of update equation during iterative solution;The directed acyclic graph DAG comprising whole dependency informations is generated based on the sparse matrix, and the DAG is layered, the number of layer, node is uniformly put into each layering where adjusting DAG interior joint, carries out former generation back substitution solution to the matrix numerical value obtained after layering.Using the number of layer where a variety of methods adjustment node, node is put into each layer as homogeneously as possible, improves the efficiency that parallel former generation back substitution calculates, can effectively be lifted at the degree of parallelism and arithmetic speed of the sparse former generation back substitution on parallel processor.
Description
Technical field
The present invention relates to electrical power system analysis and computing technical fields, more particularly, to a kind of electric system based on DAG
Sparse matrix Parallel implementation method and system.
Background technique
During power system computation, the solution of system of linear equations is a frequently problem.Load flow calculation with
In state estimation, the realization of Newton-Laphson method and its all kinds of innovatory algorithms is be unable to do without in iterative process to update equation
The solution of (Jacobi matrix);In transient emulation, the equation of power transmission network state and the side of description equipment operation condition are described
Journey belongs to Higher Order Nonlinear Equations With Nonlinear group, it is carried out solve need to carry out numerical integration, generally require using Newton method by its
Difference iteratively solves after turning to corresponding linear equation, and is also required to during such iterative solution to large-scale linear equation
Group is solved.Therefore, the solution procedure of system of linear equations is optimized, accelerates its solving speed, can effectively reduced each
The used time of class power system computation improves the real-time of solution.
Parallel computation is research contents important in computer science, has the development course of decades.Use parallel computation
The substantially process of Solve problems are as follows: the application problem given for one, firstly, computational science man converts one for this application
A numerical value or nonnumeric computational problem;Then computer scientist designs parallel algorithm to this computational problem, and passes through certain
Parallel programming language realizes it;The expert of last application field runs application software solution on certain specific parallel computer
This problem.Thus, it is possible to which naturally discovery parallel computation is made of following components: parallel computer be (parallel computation
Hardware platform), parallel algorithm (theoretical basis of parallel computation), parallel Programming (software of parallel computation supports), parallel
Using (motive force of development of parallel computation).
Existing method is designed not directed to electric system problem, is the general solution side based on sparse matrix
Method, start analysis when just by layer as unit of carry out tissue, the general idea is that extremely by the Node extraction of not data dependence
New one layer, and other nodes are removed to the data dependence of analysis node, this process is repeated until node has all been handled
At.This method is simple and effective, adaptable, but its generate layering result tend to node division is lesser to numbering
Layer, so that the layering result of entire algorithm is several layers of before concentrating on, the parallel average degree of algorithm is poor, especially for former generation square
In the analysis of battle array, DAG (Directed Acyclic Graph, directed acyclic graph) figure of formation is extremely uneven, drags significantly slowly
The speed of Parallel implementation.
Summary of the invention
The present invention provides a kind of a kind of electricity based on DAG for overcoming the above problem or at least being partially solved the above problem
Force system sparse matrix Parallel implementation method and system, solve entire algorithm in the prior art layering result concentrate on it is former
The problem of layer, the parallel average degree of algorithm is poor, formation DAG figure is extremely uneven, has dragged slowly the speed of Parallel implementation significantly.
According to an aspect of the present invention, a kind of electric system sparse matrix Parallel implementation method based on DAG is provided, is wrapped
It includes:
Obtain the equation group for describing power transmission network state or description equipment operation condition amendment side during iterative solution
The corresponding sparse matrix of journey;
Generate the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix, and to the DAG into
Row layering, the number of layer, node is uniformly put into each layering, to the square obtained after layering where adjustment DAG interior joint
Battle array numerical value carries out former generation back substitution solution.
Preferably, after generating the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix
Further include:
The data structure based on node is constructed, all information in DAG are saved as former state, each node includes two
List, save respectively oneself all father nodes and child node pointer.
Preferably, and to the DAG carry out layering specifically include:
The DAG is layered by lazy hierarchical algorithm in former generation link, is calculated in back substitution link by greedy layering
Method is layered the DAG.
Preferably, being layered by lazy hierarchical algorithm to the DAG in former generation link, specifically include:
To each node i in DAG tree, if node i does not have child node, the layer number e of node i is setiFor maximum value,
And the layer number of the father node by following below scheme setting node i: to each father node k of node i, by the layer number e of kkAnd ei-1
Middle smaller is set as the layer number of node k;
It repeats the above steps, the layer number of the father node of node k is recursively set.
Preferably, being layered by greedy hierarchical algorithm to the DAG in back substitution link, specifically include:
To each node i in DAG tree, if node i does not have father node, the layer number e of node i is setiIt is 0, and presses
The layer number of the child node of node i is arranged in following below scheme: for each child node k of node i, by the layer number e of kkAnd eiIn+1
The greater is set as the layer number of node k;
It repeats the above steps, the layer number of the child node of node k is recursively set.
Preferably, and after being layered to the DAG, further includes:
Node sequence in same layer is adjusted, by an equal amount of node rendezvous in same thread group;
Increase the variable that instruction per thread group needs cycle-index, being not filled by sets of threads is filled by invalid node
Remaining thread corresponds to the node of all size correctly in sets of threads.
A kind of electric system sparse matrix Parallel implementation system based on DAG, including power system information obtain module and
Former generation back substitution solves module;
Power system information obtains module and is used to obtain description power transmission network state or describe the equation of equipment operation condition
Group corresponding sparse matrix of update equation during iterative solution;
Former generation back substitution is solved module and is used to be generated the oriented nothing comprising whole dependency informations based on the sparse matrix
Ring figure DAG, and the DAG is layered, node, is uniformly put into each point by the number of layer where adjustment DAG interior joint
In layer, former generation back substitution solution is carried out to the matrix numerical value obtained after layering.
A kind of electric system sparse matrix Parallel implementation equipment based on DAG, comprising:
At least one processor;And
At least one processor being connect with the processor communication, in which:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to
Enable the electric system sparse matrix Parallel implementation method being able to carry out as above-mentioned based on DAG.
A kind of non-transient computer readable storage medium, the non-transient computer readable storage medium storage computer refer to
It enables, the computer instruction makes the computer execute such as the above-mentioned electric system sparse matrix Parallel implementation side based on DAG
Method.
The present invention proposes a kind of electric system sparse matrix Parallel implementation method and system based on DAG, by electric power
The structural analysis of system sparse matrix improves the DAG generating algorithm in former generation back substitution solution procedure, matrix is generated
DAG figure comprising whole dependency informations, then on this basis, DAG is layered, node institute is adjusted using a variety of methods
In the number of layer, node is put into each layer as homogeneously as possible, improves the efficiency that parallel former generation back substitution calculates, can effectively mention
Rise the degree of parallelism and arithmetic speed of the sparse former generation back substitution on parallel processor.
Detailed description of the invention
Fig. 1 is the electric system sparse matrix Parallel implementation method schematic diagram based on DAG according to the embodiment of the present invention;
Fig. 2 is the flow chart schematic diagram solved according to the sparse matrix of the embodiment of the present invention;
Fig. 3 is the data structure schematic diagram based on node according to the embodiment of the present invention;
Fig. 4 is to be illustrated according to the electric system sparse matrix Parallel implementation device structure based on DAG of the embodiment of the present invention
Figure.
Specific embodiment
With reference to the accompanying drawings and examples, specific embodiments of the present invention will be described in further detail.Implement below
Example is not intended to limit the scope of the invention for illustrating the present invention.
As shown in Figure 1, showing a kind of electric system sparse matrix Parallel implementation method based on DAG in figure, comprising:
Obtain the equation group for describing power transmission network state or description equipment operation condition amendment side during iterative solution
The corresponding sparse matrix of journey;
Generate the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix, and to the DAG into
Row layering, the number of layer, node is uniformly put into each layering, to the square obtained after layering where adjustment DAG interior joint
Battle array numerical value carries out former generation back substitution solution.
In electric system problem, it is often necessary to be solved to the identical sparse matrix of multiple structures.For this purpose, generally according to
Symbolic analysis is carried out according to the structure of matrix, brings data progress numerical solution into further according to the result of symbolic analysis.For same knot
Multiple matrixes of structure, symbol, which decomposes, need to only carry out once, and numerical solution needs progress multiple.When the number that numerical solution carries out
When enough, symbol decompose expense be equivalent to share equally to every sub-symbol decompose during, therefore symbol decompose algorithm effect
The importance of fruit will be much higher than the importance of its speed.
The flow chart that sparse matrix solves obtains matrix numerical value as shown in Fig. 2, including the decomposition of sparse matrix structure symbol,
And numerical solution is carried out to matrix numerical value.In the present embodiment, part mainly is decomposed to symbol and improves processing, concrete scheme
To carry out DAG analysis to matrix.
In the present embodiment, it in order to retain enough information more to be adjusted to DAG, is weighed in the present embodiment
The parser for having write DAG constructs the data structure based on node, by DAG all information as former state save, in order into
The optimization of one step, specifically, data structure is as shown in Figure 3.In this structure, each node includes two lists, respectively
Save oneself all father nodes and child node pointer, completely remain all raw informations.
In the present embodiment, and layering is carried out to the DAG to specifically include:
The DAG is layered by lazy hierarchical algorithm in former generation link, is calculated in back substitution link by greedy layering
Method is layered the DAG.
In the present embodiment, the DAG is layered by greedy hierarchical algorithm in back substitution link, is specifically included:
To each node i in DAG tree, if node i does not have father node, the layer number e of node i is setiIt is 0, and presses
The layer number of the child node of node i is arranged in following below scheme: for each child node k of node i, by the layer number e of kkAnd eiIn+1
The greater is set as the layer number of node k;
It repeats the above steps, the layer number of the child node of node k is recursively set.
Specifically, in the present embodiment, using the DAG greediness hierarchical algorithm based on figure, as follows, in DAG tree
Each node i:
If node i does not have father node:
1, the layer number e of i is setiIt is 0;
2, the layer number of the child node of node i is set;
The setting procedure of the layer number of child node is as follows, for each child node k of node i:
1, the layer number e of k is setkFor ekAnd eiThe greater in+1;
2, it is numbered by the layer of the child node of identical flow setting k.
It is available consistent with former algorithm as a result, but due to its data structure complexity by above-mentioned greedy hierarchical algorithm
The rising of degree, performance have certain loss.Since layered shaping only carries out primary, the part bring volume in multiple solution procedure
Overhead can be shared in subsequent solution.
Specifically, in the present embodiment, passing through lazy hierarchical algorithm in former generation link and (being calculated from leaf node to root node
The number of plies) DAG is layered, it specifically includes:
To each node i in DAG tree, if node i does not have child node, the layer number e of node i is setiFor maximum value,
And the layer number of the father node by following below scheme setting node i: to each father node k of node i, by the layer number e of kkAnd ei-1
Middle smaller is set as the layer number of node k;
It repeats the above steps, the layer number of the father node of node k is recursively set.
For the L matrix in electric system problem, several layers of degree of parallelisms are big before DAG layering result is tended to, subsequent
Number of plies degree of parallelism quickly reduces.Therefore consider to use the algorithm opposite with algorithm above, only need the node result in next layer
When start to calculate, be called lazy hierarchical algorithm.Corresponding with former algorithm, this algorithm is from leaf node (the not node of child node)
It sets out.The process of lazy hierarchical algorithm (calculating the number of plies from root node to leaf node) is as follows, to each section in DAG tree
Point i:
If node i does not have child node:
1, the layer number e of i is setiFor maximum value;
2, the layer number of the father node of i is set;
The setting procedure of the layer number of father node is as follows, for each father node k of node i:
1, the layer number e of k is setkFor ekAnd eiSmaller in -1;
2, it is numbered by the layer of the father node of identical flow setting k.
L, there are symmetry, i.e. L matrix to use greedy hierarchical algorithm and U for the layering result of two kinds of algorithms of use of U matrix
Matrix is symmetrical using the result of lazy hierarchical algorithm;U matrix uses lazy hierarchical algorithm using greedy hierarchical algorithm and L matrix
As a result symmetrical.This symmetry is really as caused by the symmetry of the LU decomposition result of symmetrical matrix.With being averaged for layering
Degree is that index assesses the result of layering, and lazy hierarchical algorithm has very the DAG layering result of L matrix compared to before
Optimization in big degree, and U matrix is then antithesis.
Accordingly, in the present embodiment, comprehensive in the process of former generation back substitution to use two kinds of algorithms, i.e., it is used in former generation link
Lazy hierarchical algorithm uses greedy hierarchical algorithm in the back substitution stage.At this point, the DAG layering result of two links is all relatively excellent,
There is certain help to the speed promotion of subsequent solution procedure.
In the present embodiment, after and being layered to the DAG, further includes:
Node sequence in same layer is adjusted, by an equal amount of node rendezvous in same thread group;
Increase the variable that instruction per thread group needs cycle-index, being not filled by sets of threads is filled by invalid node
Remaining thread corresponds to the node of all size correctly in sets of threads.
In the present embodiment, logical as GPU using CUDA (Compute Unified Device Architecture)
With calculating (GPGPU) platform and programming model, in CUDA C, per thread has a unique Thread Id.CUDA is used
One 3 dimensional vector threadIdx is as Thread Id, in order to which developer can be used when operating vector, matrix, 3 rank tensor
More natural grammer accesses to each element.In actual tissue thread, Thread Id is the sequential organization with x, y, z, i.e.,
The Thread Id of (x, y, z) is x+yDx+zDxDy, wherein Dx、DyFor scale of the thread block (block) on the direction x, y.Due to each
Thread in thread block needs to reside to share it in the same Steaming Multiprocessors (streaming multiprocessor) and deposit
Store up resource, therefore the scale of thread block is limited, at present for, per thread block contains up to 1024 threads.
It include multiple stream handles (streaming processor) in each Steaming Multiprocessors.Actual
In implementation procedure, every 32 sets of threads are woven to a sets of threads (warp) by Steaming Multiprocessors, this is the enterprising line journey tune of GPU
The minimum unit of degree.32 threads for including in the same sets of threads be based on SIMT mode operation, the same sets of threads
All threads all execute same using different data and instruct.This means that when branch occurs in the process of implementation for program, line
Cheng Zuhui serially executes each branch, and such behavior, which results in, to be not in the part thread of active branch and be in sets of threads
Inactive state reduces the utilization rate of stream handle, causes the waste of computing resource.
Thread block is organized to be thread grid (grid) in a similar manner, and the scale of thread grid is generally by the scale of data
Or system Steaming Multiprocessors number determines, but is not limited by Steaming Multiprocessors number.
The calculating process of entire node is completed using single thread, calculation process is contained according to the row non-zero entry position
The multiple quadrature of sum number purpose and accumulation operations need to carry out operation using the mode of circulation.It is above-mentioned about thread scheduling side
The content in face by the thread of individual node it is found that be in the sets of threads that 32 threads form, wherein the section of each thread process
Point situation is different, the generation of branch is resulted in, so that the execution efficiency of sets of threads declines.
In order to reduce the branch in sets of threads, need that thread therein is made to execute identical logic.Therefore, DAG is being generated
During layering, the node sequence in same layer should be adjusted, by an equal amount of node rendezvous in same thread group
In, realize alignment.
In the present embodiment, in order to realize above-mentioned optimization, in the generating process of DAG layering, instruction is added additional
Per thread group needs the variable of cycle-index.Simultaneously as the node of each layer of all size not necessarily can be filled out successively
It fills and is aligned to each sets of threads, therefore, in the present embodiment, some invalid nodes has been used to be filled with the remaining line in sets of threads
Journey enables the node of all size correctly to snap to sets of threads, these invalid nodes are indicated using node serial number -1.
In the present embodiment, after node being uniformly put into each layering further include:
One critical path is at least set in the DAG, and the node in the critical path is completed in a upper node
Calculating is got started later;
The node criticality highest being located in critical path in each layering, the crucial journey of critical path exterior node
Degree is successively reduced according to the degree of flexibility increase for not influencing the DAG used time.
In the present embodiment, with greedy hierarchical algorithm (calculating the number of plies from root node to leaf node) and lazy hierarchical algorithm
Based on (calculating the number of plies from leaf node to root node), with reference to AOE (Activity On Edge) net AOV (Activity
On Vertex) related thought and method that the critical path in net calculates, devise the DAG layering based on critical path analysis
Algorithm, basic skills are as follows:
1, in DAG, at least one critical path is set, all nodes must be after the completion of a upper node at once
Start to calculate, otherwise influences whether the used time of entire DAG;
2, in entire DAG, criticality possessed by each node is different, the node in critical path
Criticality highest, other nodes according to its can not influence entire DAG use in the case of degree of flexibility increase according to
Secondary reduction;
3, when arranging each layer of node, the node in critical path must be arranged, the priority of remaining node
Depending on should be according to its criticality.
In the present embodiment, realize that the criticality of node calculates by node criticality algorithm, specific calculation process
Include:
1, the number of plies n needed for being calculated using greedy algorithmlevel;
2, waiting list U is added in all nodes of DAG tree;
For each layer of l, the value of l is from 0 to nlevel:
1, traverse waiting list U, by wherein either with or without dependence node motion to candidate list C;
2, candidate list C is traversed, sets l for the node layer number that wherein all criticalities are 0, and remove out candidate
List, the dependence to it for removing subsequent node;
3, candidate list C is traversed from small to large (key procedure is from high to low) according to criticality numerical value, until current layer reaches
To average parallelism degree;
4, the criticality that candidate list C includes the subtree of node and its child node composition is updated;
The algorithm flow for updating the criticality of subtree g is as follows:
1, it is numbered using the layer that lazy algorithm calculates all nodes in g;
2, it is numbered using the layer that greedy algorithm calculates all nodes in g;
3, each node is calculated to criticality of the difference as node of the number of plies by two kinds of algorithms.
In the present embodiment, it is also proposed that DAG layering is finely adjusted below, to reduce same layer node species, is improved simultaneously
The algorithm of row degree.Its basic ideas is to adjust the node of same size to same layer, and specific algorithm is as follows:
1, for each node i, node size (in-degree) is deg—(i), the DAG layer at place is ei;
2, coefficient k is given, δ (i)=[deg-(i)+level (i)] mod k is calculated;
3, to all node eiSequence is adjusted, and makes δ (i)=0.
It is every in entire DAG layering if can complete for the adjustment of all nodes and (meet the condition given in 3)
The type of one layer of node size will settle to original 1/k.
In actual algorithm realization, the DAG that is obtained with greedy algorithm is layered, from back to front traverse node, when adjustment will
Node moves backward;Lazy algorithm is opposite.
A kind of electric system sparse matrix Parallel implementation system based on DAG, including electric power are additionally provided in the present embodiment
System information obtains module and former generation back substitution solves module;
Power system information obtains module and is used to obtain description power transmission network state or describe the equation of equipment operation condition
Group corresponding sparse matrix of update equation during iterative solution;
Former generation back substitution is solved module and is used to be generated the oriented nothing comprising whole dependency informations based on the sparse matrix
Ring figure DAG, and the DAG is layered, node, is uniformly put into each point by the number of layer where adjustment DAG interior joint
In layer, former generation back substitution solution is carried out to the matrix numerical value obtained after layering.
Fig. 4 is the structural frames for showing the electric system sparse matrix Parallel implementation equipment based on DAG of the embodiment of the present application
Figure.
Referring to Fig. 4, the electric system sparse matrix Parallel implementation equipment based on DAG, comprising: processor
(processor) 810, memory (memory) 830, communication interface (Communications Interface) 820 and bus
840;
Wherein,
The processor 810, memory 830, communication interface 820 complete mutual communication by the bus 840;
The communication interface 820 is for the information transmission between the test equipment and the communication equipment of display device;
The processor 810 is used to call the program instruction in the memory 830, to execute above-mentioned each method embodiment
The provided electric system sparse matrix Parallel implementation method based on DAG, for example,
Obtain the equation group for describing power transmission network state or description equipment operation condition amendment side during iterative solution
The corresponding sparse matrix of journey;
Generate the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix, and to the DAG into
Row layering, the number of layer, node is uniformly put into each layering, to the square obtained after layering where adjustment DAG interior joint
Battle array numerical value carries out former generation back substitution solution.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating
Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated
When machine executes, computer is able to carry out the electric system sparse matrix Parallel implementation method as above-mentioned based on DAG, such as wraps
It includes:
Obtain the equation group for describing power transmission network state or description equipment operation condition amendment side during iterative solution
The corresponding sparse matrix of journey;
Generate the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix, and to the DAG into
Row layering, the number of layer, node is uniformly put into each layering, to the square obtained after layering where adjustment DAG interior joint
Battle array numerical value carries out former generation back substitution solution.
A kind of non-transient computer readable storage medium is additionally provided in the present embodiment, the non-transient computer is readable to deposit
Storage media stores computer instruction, and the computer instruction makes the computer execute such as the above-mentioned electric system based on DAG
Sparse matrix Parallel implementation method, for example,
Obtain the equation group for describing power transmission network state or description equipment operation condition amendment side during iterative solution
The corresponding sparse matrix of journey;
Generate the directed acyclic graph DAG comprising whole dependency informations based on the sparse matrix, and to the DAG into
Row layering, the number of layer, node is uniformly put into each layering, to the square obtained after layering where adjustment DAG interior joint
Battle array numerical value carries out former generation back substitution solution.
In conclusion the present invention proposes a kind of electric system sparse matrix Parallel implementation method and system based on DAG, lead to
The structural analysis to electric system sparse matrix is crossed, the DAG generating algorithm in former generation back substitution solution procedure is improved, it will
Matrix generates the DAG figure comprising whole dependency informations, then on this basis, is layered to DAG, uses a variety of method tune
Node, is put into each layer by the number of layer as homogeneously as possible where whole node, improves the efficiency that parallel former generation back substitution calculates, energy
The degree of parallelism and arithmetic speed of enough sparse former generation back substitutions being effectively lifted on parallel processor.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
The various media that can store program code such as disk.
The embodiments such as the test equipment of display device described above are only schematical, wherein described as separation
The unit of part description may or may not be physically separated, component shown as a unit can be or
It can not be physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to reality
Border needs to select some or all of the modules therein to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art
Without paying creative labor, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the embodiment of the present invention, rather than it is right
It is limited;Although the embodiment of the present invention is described in detail referring to foregoing embodiments, the ordinary skill of this field
Personnel are it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part
Or all technical features are equivalently replaced;And these are modified or replaceed, it does not separate the essence of the corresponding technical solution
The range of each embodiment technical solution of the embodiment of the present invention.
Claims (9)
1. a kind of electric system sparse matrix Parallel implementation method based on DAG characterized by comprising
Obtain the equation group for describing power transmission network state or description equipment operation condition update equation pair during iterative solution
The sparse matrix answered;
The directed acyclic graph DAG comprising whole dependency informations is generated based on the sparse matrix, and the DAG is divided
Layer, the number of layer, node is uniformly put into each layering, to the matrix function obtained after layering where adjustment DAG interior joint
Value carries out former generation back substitution solution.
2. the method according to claim 1, wherein being generated based on the sparse matrix comprising whole dependences
After the directed acyclic graph DAG of information further include:
The data structure based on node is constructed, all information in DAG are saved as former state, each node includes two column
Table, save respectively oneself all father nodes and child node pointer.
3. according to the method described in claim 2, it is characterized in that, and to the DAG carry out layering specifically include:
The DAG is layered by lazy hierarchical algorithm in former generation link, passes through greedy hierarchical algorithm pair in back substitution link
The DAG is layered.
4. according to the method described in claim 3, it is characterized in that, passing through lazy hierarchical algorithm to the DAG in former generation link
It is layered, is specifically included:
To each node i in DAG tree, if node i does not have child node, the layer number e of node i is setiFor maximum value, and press
The layer number of the father node of node i is arranged in following below scheme: to each father node k of node i, by the layer number e of kkAnd eiIn -1 compared with
Small person is set as the layer number of node k;
It repeats the above steps, the layer number of the father node of node k is recursively set.
5. according to the method described in claim 3, it is characterized in that, passing through greedy hierarchical algorithm to the DAG in back substitution link
It is layered, is specifically included:
To each node i in DAG tree, if node i does not have father node, the layer number e of node i is setiIt is 0, and by flow down
The layer number of the child node of node i is arranged in journey: for each child node k of node i, by the layer number e of kkAnd eiThe greater in+1
It is set as the layer number of node k;
It repeats the above steps, the layer number of the child node of node k is recursively set.
6. the method according to claim 1, wherein and after being layered to the DAG, further includes:
Node sequence in same layer is adjusted, by an equal amount of node rendezvous in same thread group;
Increase the variable that instruction per thread group needs cycle-index, is filled in sets of threads by invalid node and be not filled by residue
Thread corresponds to the node of all size correctly in sets of threads.
7. a kind of electric system sparse matrix Parallel implementation system based on DAG, which is characterized in that obtained including power system information
Modulus block and former generation back substitution solve module;
Power system information obtains module and exists for obtaining description power transmission network state or describing the equation group of equipment operation condition
The corresponding sparse matrix of update equation during iterative solution;
Former generation back substitution is solved module and is used to be generated the directed acyclic graph comprising whole dependency informations based on the sparse matrix
DAG, and the DAG is layered, the number of layer, node is uniformly put into each layering where adjustment DAG interior joint,
Former generation back substitution solution is carried out to the matrix numerical value obtained after layering.
8. a kind of electric system sparse matrix Parallel implementation equipment based on DAG characterized by comprising
At least one processor;And
At least one processor being connect with the processor communication, in which:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy
Enough methods executed as described in claim 1 to 6 is any.
9. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited
Computer instruction is stored up, the computer instruction makes the computer execute the method as described in claim 1 to 6 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810772560.7A CN108985622B (en) | 2018-07-13 | 2018-07-13 | Power system sparse matrix parallel solving method and system based on DAG |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810772560.7A CN108985622B (en) | 2018-07-13 | 2018-07-13 | Power system sparse matrix parallel solving method and system based on DAG |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108985622A true CN108985622A (en) | 2018-12-11 |
CN108985622B CN108985622B (en) | 2020-08-04 |
Family
ID=64548543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810772560.7A Active CN108985622B (en) | 2018-07-13 | 2018-07-13 | Power system sparse matrix parallel solving method and system based on DAG |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108985622B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113255259A (en) * | 2021-05-21 | 2021-08-13 | 北京华大九天科技股份有限公司 | Parallel solving method based on large-scale integrated circuit division |
CN118152716A (en) * | 2024-05-09 | 2024-06-07 | 巨霖科技(上海)有限公司 | Matrix solving method, computer equipment, storage medium and program product |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102142052A (en) * | 2011-03-28 | 2011-08-03 | 清华大学 | Quick LU factorization method for circuit sparse matrix in circuit simulation |
CN102426619A (en) * | 2011-10-31 | 2012-04-25 | 清华大学 | Adaptive parallel LU decomposition method aiming at circuit simulation |
CN103702276A (en) * | 2013-12-26 | 2014-04-02 | 河海大学常州校区 | Clustering-based complex task collaborative problem-solving method for wireless sensor network |
US20170046614A1 (en) * | 2015-08-11 | 2017-02-16 | Oracle International Corporation | Accelerated tr-l-bfgs algorithm for neural network |
CN107196306A (en) * | 2017-07-10 | 2017-09-22 | 大连海事大学 | Algorithm quicksort tidal current computing method based on Matlab sparse matrixes |
CN107579516A (en) * | 2017-09-13 | 2018-01-12 | 国电南瑞科技股份有限公司 | A kind of method for improving Power system state estimation calculating speed |
CN108122054A (en) * | 2018-02-07 | 2018-06-05 | 清华大学 | A kind of electric system topology real-time computing technique calculated based on figure |
-
2018
- 2018-07-13 CN CN201810772560.7A patent/CN108985622B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102142052A (en) * | 2011-03-28 | 2011-08-03 | 清华大学 | Quick LU factorization method for circuit sparse matrix in circuit simulation |
CN102426619A (en) * | 2011-10-31 | 2012-04-25 | 清华大学 | Adaptive parallel LU decomposition method aiming at circuit simulation |
CN103702276A (en) * | 2013-12-26 | 2014-04-02 | 河海大学常州校区 | Clustering-based complex task collaborative problem-solving method for wireless sensor network |
US20170046614A1 (en) * | 2015-08-11 | 2017-02-16 | Oracle International Corporation | Accelerated tr-l-bfgs algorithm for neural network |
CN107196306A (en) * | 2017-07-10 | 2017-09-22 | 大连海事大学 | Algorithm quicksort tidal current computing method based on Matlab sparse matrixes |
CN107579516A (en) * | 2017-09-13 | 2018-01-12 | 国电南瑞科技股份有限公司 | A kind of method for improving Power system state estimation calculating speed |
CN108122054A (en) * | 2018-02-07 | 2018-06-05 | 清华大学 | A kind of electric system topology real-time computing technique calculated based on figure |
Non-Patent Citations (2)
Title |
---|
宋炎侃等: "应用有向图分层的控制系统暂态仿真并行算法及其GPU实现", 《电力系统自动化》 * |
罗隆福等: "基于稀疏列表法的新型换流变压器数学模型", 《电工技术学报》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113255259A (en) * | 2021-05-21 | 2021-08-13 | 北京华大九天科技股份有限公司 | Parallel solving method based on large-scale integrated circuit division |
CN113255259B (en) * | 2021-05-21 | 2022-05-24 | 北京华大九天科技股份有限公司 | Parallel solving method based on large-scale integrated circuit division |
CN118152716A (en) * | 2024-05-09 | 2024-06-07 | 巨霖科技(上海)有限公司 | Matrix solving method, computer equipment, storage medium and program product |
Also Published As
Publication number | Publication date |
---|---|
CN108985622B (en) | 2020-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108984483A (en) | The electric system sparse matrix method for solving and system reset based on DAG and matrix | |
Wang et al. | Fundamental limits of approximate gradient coding | |
Rashidi et al. | Astra-sim: Enabling sw/hw co-design exploration for distributed dl training platforms | |
Driscoll et al. | A communication-optimal n-body algorithm for direct interactions | |
CN108388474A (en) | Intelligent distributed management of computing system and method based on DAG | |
Maitre et al. | EASEA: specification and execution of evolutionary algorithms on GPGPU | |
Azad et al. | Distributed-memory algorithms for maximum cardinality matching in bipartite graphs | |
Krömer et al. | A comparison of many-threaded differential evolution and genetic algorithms on CUDA | |
CN108985622A (en) | A kind of electric system sparse matrix Parallel implementation method and system based on DAG | |
Cui et al. | Effective parallelism for equation and jacobian evaluation in large-scale power flow calculation | |
Ma et al. | Scalable linear time dense direct solver for 3-D problems without trailing sub-matrix dependencies | |
CN111722923A (en) | Heterogeneous resource calling method and device and computer readable storage medium | |
CN109062865A (en) | Trigonometric equation group method for solving and system under electric system based on laziness layering | |
CN109062866A (en) | Trigonometric equation group method for solving and system in electric system based on greediness layering | |
Radenski | Using MapReduce streaming for distributed life simulation on the cloud | |
Bharadwaj et al. | Distributed-Memory Randomized Algorithms for Sparse Tensor CP Decomposition | |
Azad et al. | A matrix-algebraic formulation of distributed-memory maximal cardinality matching algorithms in bipartite graphs | |
Diéguez et al. | Tree partitioning reduction: A new parallel partition method for solving tridiagonal systems | |
CN108062249A (en) | High in the clouds data allocation schedule method based on big data | |
Yu et al. | Hypergef: A framework enabling efficient fusion for hypergraph neural network on gpus | |
Elwasif et al. | Containers for massive ensemble of i/o bound hierarchical coupled simulations | |
Li et al. | cuFasterTucker: A Stochastic Optimization Strategy for Parallel Sparse FastTucker Decomposition on GPU Platform | |
CN108599173B (en) | Method and device for solving batch power flows | |
Garcia et al. | GPU-accelerated Poincaré map method for harmonic-oriented analyses of power systems | |
Pozo | Performance modeling of sparse matrix methods for distributed memory architectures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |