CN113297729A - Parallel simulation entity partitioning method based on entity types - Google Patents

Parallel simulation entity partitioning method based on entity types Download PDF

Info

Publication number
CN113297729A
CN113297729A CN202110523201.XA CN202110523201A CN113297729A CN 113297729 A CN113297729 A CN 113297729A CN 202110523201 A CN202110523201 A CN 202110523201A CN 113297729 A CN113297729 A CN 113297729A
Authority
CN
China
Prior art keywords
entity
simulation
type
types
entities
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
Application number
CN202110523201.XA
Other languages
Chinese (zh)
Other versions
CN113297729B (en
Inventor
叶帅
李豪
刘逊韵
朱成璋
张帅
林宇斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Research Institute of War of PLA Academy of Military Science
Original Assignee
Research Institute of War of PLA Academy of Military Science
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Research Institute of War of PLA Academy of Military Science filed Critical Research Institute of War of PLA Academy of Military Science
Priority to CN202110523201.XA priority Critical patent/CN113297729B/en
Publication of CN113297729A publication Critical patent/CN113297729A/en
Application granted granted Critical
Publication of CN113297729B publication Critical patent/CN113297729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Computing Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a parallel simulation entity partitioning method based on entity types, which comprises the steps of generating all entities; constructing a two-dimensional linked list of the entity according to the type information of the entity; based on the entity type, dividing tasks; each process performs logical computations. Compared with the original partitioning method, the method has better parallel performance in a large-scale complex simulation world with various entities.

Description

Parallel simulation entity partitioning method based on entity types
Technical Field
The invention belongs to the technical field of computer simulation, and particularly relates to a time step driven entity type-based parallel simulation entity partitioning method.
Background
Computer simulation refers to a technical means of simulating the real world by using a computer, and is a very important research direction in the field of computers at present. In time-step driven simulation, entities are the fundamental units that make up the simulation world. The number of entities in the simulation world is often limited by hardware resources of a single computer, so that the simulation usually uses a parallel programming model of message passing to divide the simulated entities into a plurality of computing nodes for computation, and then synchronizes the states of the entities in the simulation world by means of remote communication. Entity partitioning refers to the process of partitioning a simulation entity into various compute nodes. The result of the entity partitioning will directly determine the computational load on each node. When the load of each node is balanced, the waiting time required by the subsequent communication synchronization process is shorter; on the contrary, when the loads of the nodes are not balanced, the performance of the whole simulation is limited by the node with the slowest calculation. In the simulation of a complex world, a large-scale and refined entity model, the types of entities are more, and the calculation tasks generated by different types of entities in the simulation are different. Therefore, when parallel simulation of a large-scale and refined entity model in a complex world is performed, an entity division without distinction generates a load imbalance problem, which causes high communication synchronization overhead during parallel, thereby causing low simulation efficiency and insuring simulation instantaneity.
Disclosure of Invention
Technical problem to be solved
The invention provides a parallel simulation entity partitioning method based on entity types, which aims to solve the technical problem of unbalanced load generated by a traditional entity partitioning method during parallel simulation.
(II) technical scheme
In order to solve the technical problem, the invention provides a parallel simulation entity partitioning method based on entity types, which comprises the following steps:
s1, generating all entities
Calling a corresponding C + + class constructor according to the entity class to generate an entity object;
s2, constructing a two-dimensional entity linked list according to entity types
In a two-dimensional entity linked list of a parallel entity data structure, a first dimension is indexed according to entity types, and a second dimension is indexed according to entity numbers;
s3, dividing tasks based on entity types
Taking out a current two-dimensional entity type linked list, and dividing a task for one entity type according to the entity quantity of the type according to the parallelism; taking out the next entity type; if the entity type is not empty, taking out the entity linked list of the type and dividing; otherwise, the division is finished;
s4, each process performs logic calculation
According to different types of entities, executing each frame of simulation logic calculation function of corresponding types to drive the simulation of the entities;
s5, synchronous calculation results of each process
And each process synchronizes the simulation state of the entity on the process to other processes according to the entity calculation result which is respectively responsible for calculation.
Further, in step S3, when dividing the task by the number of entities, the division is performed uniformly for the parts that cannot be divided evenly after each type of division.
Further, in step S3, each process synchronizes the simulation state of the entity on the process to other processes through the MPI set communication statement with the calculation result of the entity in charge of calculation.
(III) advantageous effects
The invention provides a parallel simulation entity partitioning method based on entity types, which comprises the steps of generating all entities; constructing a two-dimensional linked list of the entity according to the type information of the entity; based on the entity type, dividing tasks; each process performs logical computations. Compared with the original partitioning method, the method has better parallel performance in a large-scale complex simulation world with various entities.
Drawings
FIG. 1 is a flowchart of a method for partitioning parallel simulation entities based on entity types according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a two-dimensional linked list of entities in an embodiment of the present invention;
FIG. 3 is a diagram illustrating task partitioning according to an embodiment of the present invention.
Detailed Description
In order to make the objects, contents and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
The embodiment provides a parallel simulation entity partitioning method based on entity types, and the flow is shown in fig. 1, and specifically includes the following steps:
s1, generating all entities
And calling a corresponding C + + class constructor according to the entity class to generate an entity object.
S2, constructing a two-dimensional entity linked list according to entity types
As shown in fig. 2, in the two-dimensional entity linked list of the parallel entity data structure, the first dimension is indexed according to the entity type, and the second dimension is indexed according to the entity number.
S3, dividing tasks based on entity types
As shown in fig. 3, the task division includes: taking out a current two-dimensional entity type linked list; according to the parallelism, dividing a task for one entity type according to the number of entities of the type; taking out the next entity type; if the entity type is not empty, taking out the entity linked list of the type and dividing; otherwise, the division is finished. When the tasks are divided according to the number of the entities, the parts which cannot be divided completely after each type of division are divided uniformly.
S4, each process performs logic calculation
And executing each frame of simulation logic calculation function of the corresponding type according to different types of the entities to drive the simulation of the entities.
S5, synchronous calculation results of each process
And each process synchronizes the simulation state of the entity on the process to other processes through the MPI set communication statement according to the entity calculation result which is respectively responsible for calculation.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (3)

1. A parallel simulation entity partitioning method based on entity types is characterized by comprising the following steps:
s1, generating all entities
Calling a corresponding C + + class constructor according to the entity class to generate an entity object;
s2, constructing a two-dimensional entity linked list according to entity types
In a two-dimensional entity linked list of a parallel entity data structure, a first dimension is indexed according to entity types, and a second dimension is indexed according to entity numbers;
s3, dividing tasks based on entity types
Taking out a current two-dimensional entity type linked list, and dividing a task for one entity type according to the entity quantity of the type according to the parallelism; taking out the next entity type; if the entity type is not empty, taking out the entity linked list of the type and dividing; otherwise, the division is finished;
s4, each process performs logic calculation
According to different types of entities, executing each frame of simulation logic calculation function of corresponding types to drive the simulation of the entities;
s5, synchronous calculation results of each process
And each process synchronizes the simulation state of the entity on the process to other processes according to the entity calculation result which is respectively responsible for calculation.
2. The entity type-based parallel simulation entity division method according to claim 1, wherein in the step S3, when the tasks are divided by the number of entities, the division is performed uniformly for the parts that cannot be divided exactly after each type of division.
3. The entity partitioning method for parallel simulation based on entity types as claimed in claim 1, wherein in step S3, each process synchronizes the simulation state of the entity on the process to other processes through MPI set communication statements, with the entity computation results that each process is responsible for computation.
CN202110523201.XA 2021-05-13 2021-05-13 Parallel simulation entity partitioning method based on entity types Active CN113297729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110523201.XA CN113297729B (en) 2021-05-13 2021-05-13 Parallel simulation entity partitioning method based on entity types

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110523201.XA CN113297729B (en) 2021-05-13 2021-05-13 Parallel simulation entity partitioning method based on entity types

Publications (2)

Publication Number Publication Date
CN113297729A true CN113297729A (en) 2021-08-24
CN113297729B CN113297729B (en) 2022-08-09

Family

ID=77321839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110523201.XA Active CN113297729B (en) 2021-05-13 2021-05-13 Parallel simulation entity partitioning method based on entity types

Country Status (1)

Country Link
CN (1) CN113297729B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5602754A (en) * 1994-11-30 1997-02-11 International Business Machines Corporation Parallel execution of a complex task partitioned into a plurality of entities
CN104615815A (en) * 2015-01-27 2015-05-13 北京仿真中心 Message transmission method and system for parallel models
CN107193639A (en) * 2017-06-05 2017-09-22 北京航空航天大学 A kind of multi-core parallel concurrent simulation engine system for supporting combined operation
CN108595277A (en) * 2018-04-08 2018-09-28 西安交通大学 A kind of communication optimization method of the CFD simulated programs based on OpenMP/MPI hybrid programmings
CN111858026A (en) * 2020-06-10 2020-10-30 中国人民解放军海军航空大学航空作战勤务学院 Efficient parallel scheduling method for large-scale multi-granularity simulation model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5602754A (en) * 1994-11-30 1997-02-11 International Business Machines Corporation Parallel execution of a complex task partitioned into a plurality of entities
CN104615815A (en) * 2015-01-27 2015-05-13 北京仿真中心 Message transmission method and system for parallel models
CN107193639A (en) * 2017-06-05 2017-09-22 北京航空航天大学 A kind of multi-core parallel concurrent simulation engine system for supporting combined operation
CN108595277A (en) * 2018-04-08 2018-09-28 西安交通大学 A kind of communication optimization method of the CFD simulated programs based on OpenMP/MPI hybrid programmings
CN111858026A (en) * 2020-06-10 2020-10-30 中国人民解放军海军航空大学航空作战勤务学院 Efficient parallel scheduling method for large-scale multi-granularity simulation model

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
王枭等: "基于OpenMP的作战仿真并行设计与负载均衡研究", 《系统仿真学报》 *
王磊等: "基于多核计算的雷达并行仿真结构", 《电子科技大学学报》 *
胡峻,姚宇明,徐毓良,李善平: "CIMS并行动画仿真", 《浙江大学学报(工学版)》 *
魏洪涛等: "基于交互优先算法的网格仿真实体静态调度策略", 《小型微型计算机系统》 *

Also Published As

Publication number Publication date
CN113297729B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
Anchalia et al. MapReduce design of K-means clustering algorithm
CN112149808B (en) Method, system and medium for expanding stand-alone graph neural network training to distributed training
US20130304442A1 (en) Scheduling discrete event simulation
Dai et al. A choreography analysis approach for microservice composition in cyber-physical-social systems
CN104123171A (en) Virtual machine migrating method and system based on NUMA architecture
Khaitan A survey of high-performance computing approaches in power systems
Wang et al. A framework for distributed data-parallel execution in the Kepler scientific workflow system
CN106502770A (en) A kind of HMI state transfer methods based on finite state machine
Gurumani et al. High-level synthesis of multiple dependent CUDA kernels on FPGA
Kim et al. Efficient large-scale deep learning framework for heterogeneous multi-GPU cluster
Jain et al. Charm++ and MPI: Combining the best of both worlds
CN104299170B (en) Intermittent energy source mass data processing method
Li et al. Bigprovision: a provisioning framework for big data analytics
López-Paradís et al. Fast behavioural rtl simulation of 10b transistor soc designs with metro-mpi
CN113297729B (en) Parallel simulation entity partitioning method based on entity types
KR20160070984A (en) Apparatus and method for simulating computational fluid dynamics using Hadoop platform
Bunt et al. Predictive evaluation of partitioning algorithms through runtime modelling
Zhao et al. GPU based parallel matrix exponential algorithm for large scale power system electromagnetic transient simulation
CN114489861A (en) Target component conversion method and device, electronic equipment and readable storage medium
CN114138811A (en) Column calculation optimization method based on Spark SQL
CN105354298A (en) Hadoop based method for analyzing large-scale social network and analysis platform thereof
WO2018228528A1 (en) Batch circuit simulation method and system
Zhao et al. Code Refactoring Based on MapReduce in Cloud Migration
Qian et al. A Cost-driven multi-objective optimization algorithm for SaaS applications placement
Martín-Álvarez et al. Configurable synthetic application for studying malleability in HPC

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