CN119127483A - A method of simulation calculation based on multiple modules - Google Patents
A method of simulation calculation based on multiple modules Download PDFInfo
- Publication number
- CN119127483A CN119127483A CN202411156392.0A CN202411156392A CN119127483A CN 119127483 A CN119127483 A CN 119127483A CN 202411156392 A CN202411156392 A CN 202411156392A CN 119127483 A CN119127483 A CN 119127483A
- Authority
- CN
- China
- Prior art keywords
- simulation
- modules
- module
- computing
- model
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation 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/505—Allocation 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 load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/526—Mutual exclusion algorithms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
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)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a multi-module-based simulation calculation method, which relates to the technical field of simulation calculation and comprises the steps of S1, system demand analysis and module division, S2, module model establishment and parameter setting, S3, parallel calculation environment construction, S4, module parallel calculation task allocation, S5, data exchange and synchronization, S6, result summarization, S7 and feedback optimization. According to the simulation calculation method based on the multiple modules, a complex system is decomposed into multiple relatively simple modules through modularized design, each module can independently perform simulation and calculation, maintainability and expandability of the system are improved, data and information exchange and collaborative work can be performed among different modules through interfaces, and therefore comprehensive simulation and optimization of the whole system are achieved.
Description
Technical Field
The invention relates to the technical field of simulation calculation, in particular to a method for simulating calculation based on multiple modules.
Background
Analog simulation computing is a technique for simulating and emulating a particular system or process in a virtual environment by computer software. Based on physical, chemical or other scientific principles, the system is used for predicting and analyzing the behavior, performance, change and the like of the system by combining a mathematical model and an algorithm. The simulation calculation plays an important role in a plurality of fields such as material science, engineering design, medical research, financial analysis and the like.
With the continuous progress of computer technology, especially the rapid development of computer hardware and software technology, the computing capability, storage capability and graphics processing capability of a computer are remarkably improved, which provides powerful technical support for analog simulation computing. The advent of high performance computers and supercomputers enabled analog simulation calculations to be performed with higher accuracy and efficiency, handling more complex, larger scale models and problems. In addition, various simulation software is continuously developed and perfected, so that the simulation calculation is more convenient and efficient. Such software typically provides a rich library of models, algorithms, and visualization tools that a user can select appropriate models and algorithms for simulation calculations based on specific needs. With the continuous development and innovation of the technology, the analog simulation calculation plays an important role in more fields, and makes a greater contribution to the progress and development of human society.
However, since the existing analog simulation calculation generally lacks a multi-module design, the complexity of the system is limited, the interaction and the mutual influence between each component part in the complex system are often difficult to process by the analog simulation calculation of a single module, the precision and the reliability of a simulation result are limited, the expansibility and the maintainability of the simulation system are poor, the expansion and the modification are difficult to be carried out according to the actual requirements, the difficulty and the cost of system maintenance are increased, and in addition, for a large-scale or high-complexity system, the parallel calculation is difficult to be realized by the analog simulation calculation of the single module, the multi-core parallel processing capability of a modern computer cannot be fully utilized, and a large amount of calculation resources and time are required to be consumed, so that the calculation efficiency is low.
Therefore, the invention aims at researching and improving the prior art and the defects, A method for simulating and calculating based on multiple modules is provided.
Disclosure of Invention
The invention aims to provide a multi-module-based simulation calculation method for solving the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme that the method for simulating and calculating based on the multiple modules comprises the following steps:
s1, system demand analysis and module division:
the method comprises the steps of definitely simulating the target and the requirement of simulation calculation and the main functions and characteristics of a system, and dividing the system into a plurality of relatively independent modules according to the complexity and the functional requirement of the system;
s2, building a module model and setting parameters:
Establishing a corresponding mathematical model and a simulation model for each module, and setting various parameters of the model according to actual needs and known conditions, including physical parameters, control parameters and the like;
s3, building a parallel computing environment:
the method comprises two parts of hardware resource preparation and software environment configuration, wherein the hardware resource preparation is used for selecting proper parallel computing hardware resources, and the software environment configuration is used for installing and configuring parallel computing software;
s4, module parallel computing task allocation:
decomposing the overall simulation task into a plurality of subtasks, wherein each subtask corresponds to the computation task of one or more modules, and distributing the subtasks to different computation nodes or processing cores for parallel computation according to the performance and load conditions of computation resources;
S5, data exchange and synchronization:
In the parallel computing process, data exchange is carried out among the modules so as to coordinate the computing results and the progress of the modules, and a synchronous mechanism is adopted to ensure that the modules are coordinated and consistent in the data exchange and the computing process, and avoid data conflict and computing error;
S6, summarizing results:
and summarizing the calculation results of the modules to form an integral simulation result.
Further, in the step S1, the module dividing principle is as follows:
Each module can independently complete a specific function or a group of related functions, so that the interdependence among the modules is reduced;
Interface definition, namely each module is provided with a clearly defined input/output interface so as to conveniently exchange and communicate data with other modules;
High cohesive and low coupling, wherein functions inside the modules are highly correlated (high cohesive), and the dependence among the modules is as little as possible (low coupling), so as to improve the maintainability and expandability of the system;
Parallel processing capability-the parallel processing of computing tasks is distributed to different modules in order to utilize parallel computing resources, taking account of parallelism between the modules.
Further, in the step S2, the mathematical model and the simulation model must be capable of accurately reflecting the working principle and the input-output relationship inside the module.
Further, the mathematical model building flow is as follows:
defining the problem or function to be solved by each module and the interaction relation between the module and other modules;
Based on basic principles in the fields of physics, chemistry, engineering and the like, carrying out necessary assumption and simplification on practical problems, and maintaining the accuracy and practicality of the model as much as possible;
establishing a mathematical equation describing the behavior of the module by utilizing mathematical languages (such as differential equation, algebraic equation and the like) according to the working principle of the module, wherein the equations can comprehensively reflect the physical, chemical or engineering process inside the module;
parameter determination, namely determining parameters in a model through experimental data, an empirical formula or theoretical derivation;
And (3) model verification, namely after the model is established, verifying the model through experimental data or known results to ensure that the model can accurately reflect the actual behavior of the module.
Further, the building process of the simulation model is as follows:
Model conversion, namely selecting a programming language (such as MATLAB, python, C ++, and the like) and a simulation tool (such as Simulink, modelica, and the like), and converting the established mathematical model into a computer-executable simulation model;
designing an interface, namely designing a clear input/output interface for the simulation model, wherein the interface conforms to a unified data format and exchange protocol;
Module integration, namely integrating simulation models of all modules into an integral simulation system, and processing data transmission, synchronous control and possible conflict and dependency relationship among the modules in the integration process;
running the whole system in a simulation environment, observing whether the output result of each module accords with the expectation, and if the output result of each module has a problem, performing debugging and optimization;
analyzing the simulation result, evaluating the accuracy and reliability of the simulation model, and further optimizing and improving the model according to the analysis result.
Further, in the step S3, the preparing of the hardware resource specifically includes:
Computing node selection, selecting computing nodes including, but not limited to, a multi-Core Processor (CPU) server, a cluster of Graphics Processors (GPUs), or other High Performance Computing (HPC) device, based on task size and computing requirements of the simulated simulation computation;
The network configuration, namely, the design of a network topology structure, the distribution of network bandwidth and the optimization of network delay are sequentially carried out, so that the network connection among the computing nodes is stable and high-speed, and the data exchange and the communication can be carried out efficiently;
storage solutions provide sufficient storage space for analog simulation calculations and ensure that the read-write speed of data can meet the computational demands, the storage space options include, but are not limited to, high-speed Solid State Drives (SSDs), network Attached Storage (NAS), or distributed storage systems.
Further, in the step S3, the software environment configuration specifically includes:
Selecting an operating system according to hardware resources and application requirements, and preferentially adopting a Linux operating system for a high-performance computing environment;
Parallel computing frameworks are installed by installing and configuring parallel computing frameworks such as MPI (message passing interface), openMP (open multiprocessing), or CUDA (unified computing device architecture), through which the ability to execute tasks in parallel on multiple computing nodes or processing cores is provided;
And the simulation software deployment, namely deploying the simulation software to the computing nodes, ensuring that the simulation software can normally run, and configuring the software to support parallel computing, wherein the simulation software comprises the steps of setting parameters of the parallel computing, optimizing computing task allocation and the like.
Further, the step S4 specifically includes the following sub-steps:
S41, decomposing the simulation task, namely deeply analyzing the whole simulation task to determine each component and the dependency relationship among the components of the simulation task, and then decomposing the whole task into a plurality of relatively independent subtasks according to analysis results, wherein each subtask comprises specific input, processing logic and output so as to facilitate subsequent parallel processing;
s42, parallel computing planning, namely reasonably distributing subtasks to balance the computing load of each node according to the performance and the load condition of computing resources, determining the dependency relationship among the subtasks, ensuring that the dependency relationship is not destroyed when parallel execution is performed, and simultaneously combining with evaluating the communication overhead among the modules when parallel execution is performed, and making the parallel computing planning;
S43, performing parallel computing, namely after determining parallel computing planning, deploying each module on a corresponding computing node or processing core, starting a parallel computing process, and monitoring the computing state and the load condition of each node in real time and adjusting according to the requirement in the computing process so as to ensure the smooth proceeding of the whole computing.
Further, in the step S5, the synchronization mechanism specifically includes:
1) In MPI, each module (or process) can send data to each other and manage the receiving and sending of the data through message queue, which can effectively realize the data exchange and synchronization between the modules;
2) Shared memory mechanisms, openMP, in which multiple threads are allowed to access the same memory address space, shared data can be protected by lock (Locks), semaphore (Semaphores) and other mechanisms to avoid data collision, other shared memory models besides OpenMP, such as Pthreads (POSIX thread library) and the like, which also provide similar synchronization mechanisms;
3) Obstacle synchronization, namely, all modules continue to execute after reaching a certain synchronization point, and are suitable for some parallel algorithms, and the next stage of calculation can be performed after all modules complete the calculation of a certain stage;
4) Event-driven synchronization, namely realizing synchronization among modules by monitoring and responding to the event based on an event synchronization mechanism, triggering related modules and continuing to execute when a certain event occurs (such as data arrival, calculation completion and the like);
5) Lock and semaphore:
the lock is used for protecting access of shared resources (such as shared memory) and preventing data conflict caused by simultaneous access of a plurality of modules, including but not limited to a Mutex lock (Mutex) and a spin lock (Spinlock);
the semaphore refers to a counter for controlling access to a shared resource that allows a certain number of modules to access a resource at the same time, when the counter reaches zero, the modules that subsequently request the resource will be blocked;
6) The time stamp and the sequence number are used for synchronizing data among modules through the time stamp or the sequence number, for example, when data is exchanged, a time stamp or the sequence number is added to each data packet so that a receiver can sort and reorganize the data according to the information;
7) Distributed lock And atomic operation in a distributed system, a distributed lock is employed to ensure synchronization of multiple nodes when accessing a shared resource, or an atomic operation (e.g., CAS, computer-And-Swap) is employed to implement a lock-free synchronization mechanism.
Further, the method comprises the steps of:
s7, feedback optimization:
analyzing the simulation result, evaluating indexes such as performance, stability and reliability of the system, establishing a feedback mechanism according to the comparison of the simulation result and actual requirements, correcting and optimizing the model, and continuously iterating and optimizing the model and parameter setting in subsequent simulation calculation to improve the accuracy and efficiency of the simulation calculation.
The invention provides a multi-module-based simulation calculation method, which has the following beneficial effects:
The invention decomposes a complex system into a plurality of relatively simple modules through modularized design, each module can independently simulate and calculate, thereby improving maintainability and expandability of the system, and different modules can exchange data and information and cooperatively work through interfaces, thereby realizing comprehensive simulation and optimization of the whole system, in addition, parallel calculation resources are fully utilized to perform parallel calculation on the plurality of modules, thus greatly shortening calculation time and improving calculation efficiency, and in addition, due to modularized design, a user can select proper modules for combination and customization according to specific problems and requirements, thereby being beneficial to constructing the simulation system meeting actual requirements.
Drawings
FIG. 1 is a flow chart of a method for simulating calculation based on multiple modules according to the present invention.
Detailed Description
Embodiments of the present invention are described in further detail below with reference to the accompanying drawings and examples. The following examples are illustrative of the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, a method for simulating and calculating based on multiple modules comprises the following steps:
S1, system demand analysis and module division, namely, definitely simulating the target and the requirement of simulation calculation and the main functions and characteristics of a system, and dividing the system into a plurality of relatively independent modules according to the complexity and the function requirement of the system, wherein the module division principle is as follows:
Each module can independently complete a specific function or a group of related functions, so that the interdependence among the modules is reduced;
Interface definition, namely each module is provided with a clearly defined input/output interface so as to conveniently exchange and communicate data with other modules;
High cohesive and low coupling, wherein functions inside the modules are highly correlated (high cohesive), and the dependence among the modules is as little as possible (low coupling), so as to improve the maintainability and expandability of the system;
the parallel processing capability is that the parallelism among the modules is considered, and the calculation tasks which can be processed in parallel are distributed to different modules so as to utilize parallel calculation resources;
S2, establishing a module model and setting parameters, namely establishing a corresponding mathematical model and a simulation model for each module, and setting various parameters of the model including physical parameters, control parameters and the like according to actual needs and known conditions, wherein the mathematical model and the simulation model can accurately reflect the working principle and the input-output relation inside the module;
the mathematical model is established as follows:
defining the problem or function to be solved by each module and the interaction relation between the module and other modules;
Based on basic principles in the fields of physics, chemistry, engineering and the like, carrying out necessary assumption and simplification on practical problems, and maintaining the accuracy and practicality of the model as much as possible;
establishing a mathematical equation describing the behavior of the module by utilizing mathematical languages (such as differential equation, algebraic equation and the like) according to the working principle of the module, wherein the equations can comprehensively reflect the physical, chemical or engineering process inside the module;
parameter determination, namely determining parameters in a model through experimental data, an empirical formula or theoretical derivation;
After the model is established, verifying the model through experimental data or known results to ensure that the model can accurately reflect the actual behavior of the module;
The building flow of the simulation model is as follows:
Model conversion, namely selecting a programming language (such as MATLAB, python, C ++, and the like) and a simulation tool (such as Simulink, modelica, and the like), and converting the established mathematical model into a computer-executable simulation model;
designing an interface, namely designing a clear input/output interface for the simulation model, wherein the interface conforms to a unified data format and exchange protocol;
Module integration, namely integrating simulation models of all modules into an integral simulation system, and processing data transmission, synchronous control and possible conflict and dependency relationship among the modules in the integration process;
running the whole system in a simulation environment, observing whether the output result of each module accords with the expectation, and if the output result of each module has a problem, performing debugging and optimization;
Analyzing the simulation result, evaluating the accuracy and reliability of the simulation model, and further optimizing and improving the model according to the analysis result;
s3, constructing a parallel computing environment, wherein the parallel computing environment comprises two parts of hardware resource preparation and software environment configuration;
the hardware resources are prepared for selecting suitable parallel computing hardware resources, specifically including:
Computing node selection, selecting computing nodes according to task size and computing requirements of simulated simulation computing, the computing nodes including, but not limited to, a multi-Core Processor (CPU) server, a cluster of Graphics Processors (GPUs), or other high-performance computing (HPC) devices;
The network configuration, namely, the design of a network topology structure, the distribution of network bandwidth and the optimization of network delay are sequentially carried out, so that the network connection among the computing nodes is stable and high-speed, and the data exchange and the communication can be carried out efficiently;
Providing enough storage space for analog simulation calculation and ensuring that the reading and writing speed of data can meet the calculation requirement, wherein the selection of the storage space comprises, but is not limited to, a high-speed Solid State Disk (SSD), a Network Attached Storage (NAS) or a distributed storage system;
the software environment is configured for installing and configuring parallel computing software, and specifically comprises:
Selecting an operating system according to hardware resources and application requirements, and preferentially adopting a Linux operating system for a high-performance computing environment;
Parallel computing frameworks are installed by installing and configuring parallel computing frameworks such as MPI (message passing interface), openMP (open multiprocessing), or CUDA (unified computing device architecture), through which the ability to execute tasks in parallel on multiple computing nodes or processing cores is provided;
Deploying simulation software, namely deploying the simulation software to a computing node, ensuring that the simulation software can normally run, and configuring the software to support parallel computing, wherein the configuration comprises the steps of setting parameters of the parallel computing, optimizing computing task allocation and the like;
S4, module parallel computing task allocation, namely decomposing the whole simulation task into a plurality of subtasks, wherein each subtask corresponds to one or more module computing tasks, and allocating the subtasks to different computing nodes or processing cores for parallel computing according to the performance and load conditions of computing resources;
S41, decomposing the simulation task, namely deeply analyzing the whole simulation task to determine each component and the dependency relationship among the components of the simulation task, and then decomposing the whole task into a plurality of relatively independent subtasks according to analysis results, wherein each subtask comprises specific input, processing logic and output so as to facilitate subsequent parallel processing;
s42, parallel computing planning, namely reasonably distributing subtasks to balance the computing load of each node according to the performance and the load condition of computing resources, determining the dependency relationship among the subtasks, ensuring that the dependency relationship is not destroyed when parallel execution is performed, and simultaneously combining with evaluating the communication overhead among the modules when parallel execution is performed, and making the parallel computing planning;
S43, performing parallel computing, namely after determining parallel computing planning, deploying each module on a corresponding computing node or processing core, and starting a parallel computing process;
S5, data exchange and synchronization, namely, in the parallel computing process, data exchange is carried out among the modules so as to coordinate the computing results and the progress of the modules, and a synchronization mechanism is adopted to ensure the coordination consistency of the modules in the data exchange and the computing process and avoid data conflict and computing error, wherein the synchronization mechanism specifically comprises the following steps:
1) In MPI, each module (or process) can send data to each other and manage the receiving and sending of the data through message queue, which can effectively realize the data exchange and synchronization between the modules;
2) Shared memory mechanisms, openMP, in which multiple threads are allowed to access the same memory address space, shared data can be protected by lock (Locks), semaphore (Semaphores) and other mechanisms to avoid data collision, other shared memory models besides OpenMP, such as Pthreads (POSIX thread library) and the like, which also provide similar synchronization mechanisms;
3) Obstacle synchronization, namely, all modules continue to execute after reaching a certain synchronization point, and are suitable for some parallel algorithms, and the next stage of calculation can be performed after all modules complete the calculation of a certain stage;
4) Event-driven synchronization, namely realizing synchronization among modules by monitoring and responding to the event based on an event synchronization mechanism, triggering related modules and continuing to execute when a certain event occurs (such as data arrival, calculation completion and the like);
5) Lock and semaphore:
locks are used to protect access to shared resources (e.g., shared memory) and to prevent data conflicts resulting from simultaneous access by multiple modules, including but not limited to Mutex locks (Mutex), spin locks (Spinlock);
semaphore refers to a counter used to control access to a shared resource that allows a certain number of modules to access a resource at the same time, when the counter reaches zero, the modules that subsequently request the resource will be blocked;
6) The time stamp and the sequence number are used for synchronizing data among modules through the time stamp or the sequence number, for example, when data is exchanged, a time stamp or the sequence number is added to each data packet so that a receiver can sort and reorganize the data according to the information;
7) Distributed lock And atomic operation, in the distributed system, adopting the distributed lock to ensure the synchronization of a plurality of nodes when accessing shared resources, or adopting the atomic operation (such as CAS, computer-And-Swap) to realize a lock-free synchronization mechanism;
s6, summarizing results, namely summarizing calculation results of all modules to form an integral simulation result;
And S7, feedback optimization, namely analyzing simulation results, evaluating indexes such as performance, stability and reliability of the system, establishing a feedback mechanism according to comparison between the simulation results and actual requirements, correcting and optimizing the model, and continuously iterating and optimizing the model and parameter setting in subsequent simulation calculation to improve the accuracy and efficiency of the simulation calculation.
The embodiments of the invention have been presented for purposes of illustration and description, and are not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
Claims (10)
1. A method for simulating and calculating based on multiple modules, which is characterized by comprising the following steps:
s1, system demand analysis and module division:
the method comprises the steps of definitely simulating the target and the requirement of simulation calculation and the main functions and characteristics of a system, and dividing the system into a plurality of relatively independent modules according to the complexity and the functional requirement of the system;
s2, building a module model and setting parameters:
Establishing a corresponding mathematical model and a simulation model for each module, and setting various parameters of the model according to actual needs and known conditions;
s3, building a parallel computing environment:
the method comprises two parts of hardware resource preparation and software environment configuration, wherein the hardware resource preparation is used for selecting proper parallel computing hardware resources, and the software environment configuration is used for installing and configuring parallel computing software;
s4, module parallel computing task allocation:
decomposing the overall simulation task into a plurality of subtasks, wherein each subtask corresponds to the computation task of one or more modules, and distributing the subtasks to different computation nodes or processing cores for parallel computation according to the performance and load conditions of computation resources;
S5, data exchange and synchronization:
In the parallel computing process, data exchange is carried out among the modules so as to coordinate the computing results and the progress of the modules, and a synchronous mechanism is adopted to ensure that the modules are coordinated and consistent in the data exchange and the computing process, and avoid data conflict and computing error;
S6, summarizing results:
and summarizing the calculation results of the modules to form an integral simulation result.
2. The method of claim 1, wherein in step S1, the module division principle is as follows:
Each module can independently complete a specific function or a group of related functions, so that the interdependence among the modules is reduced;
Interface definition, namely each module is provided with a clearly defined input/output interface;
high cohesion and low coupling, namely the functions inside the modules are highly relevant, and the dependence among the modules is as little as possible;
parallel processing capability-the parallel processing of computing tasks is distributed to different modules in consideration of parallelism among the modules.
3. The method according to claim 1, wherein in the step S2, the mathematical model and the simulation model must be capable of accurately reflecting the working principle and the input-output relationship inside the module.
4. A method of multi-module based simulation calculation according to claim 3, wherein the mathematical model is constructed as follows:
defining the problem or function to be solved by each module and the interaction relation between the module and other modules;
Based on basic principles in the fields of physics, chemistry and engineering, carrying out necessary assumption and simplification on practical problems, and maintaining accuracy and practicability of a model as much as possible;
Establishing an equation, namely establishing a mathematical equation describing the behavior of the module by using mathematical language according to the working principle of the module;
parameter determination, namely determining parameters in a model through experimental data, an empirical formula or theoretical derivation;
And (3) model verification, namely after the model is established, verifying the model through experimental data or known results to ensure that the model can accurately reflect the actual behavior of the module.
5. A method of simulating simulation calculation based on multiple modules according to claim 3, wherein the establishing procedure of the simulation model is as follows:
Model conversion, namely selecting programming language and simulation tools, and converting the established mathematical model into a computer-executable simulation model;
designing an interface, namely designing a clear input/output interface for the simulation model, wherein the interface conforms to a unified data format and exchange protocol;
Module integration, namely integrating simulation models of all modules into an integral simulation system, and processing data transmission, synchronous control and possible conflict and dependency relationship among the modules in the integration process;
running the whole system in a simulation environment, observing whether the output result of each module accords with the expectation, and if the output result of each module has a problem, performing debugging and optimization;
analyzing the simulation result, evaluating the accuracy and reliability of the simulation model, and further optimizing and improving the model according to the analysis result.
6. The method of claim 1, wherein in step S3, the preparing hardware resources specifically includes:
selecting a computing node according to the task size and the computing requirement of the simulated simulation computation, wherein the computing node comprises a multi-core processor server, a graph processor cluster or other high-performance computing equipment;
The network configuration, namely, the design of a network topology structure, the distribution of network bandwidth and the optimization of network delay are sequentially carried out, so that the network connection among the computing nodes is stable and high-speed;
The storage solution provides enough storage space for analog simulation calculation and ensures that the reading and writing speed of data can meet the calculation requirement, wherein the selection of the storage space comprises, but is not limited to, a high-speed solid state disk, a network additional storage or a distributed storage system.
7. The method of claim 1, wherein in step S3, the software environment configuration specifically includes:
Selecting an operating system according to hardware resources and application requirements, and preferentially adopting a Linux operating system for a high-performance computing environment;
Installing and configuring parallel computing frameworks, through which the ability to execute tasks in parallel on multiple computing nodes or processing cores is provided;
And deploying simulation software, namely deploying the simulation software to the computing nodes, ensuring that the simulation software can normally run, and configuring the software to support parallel computing.
8. The method of multi-module based simulation calculation according to claim 1, wherein the step S4 specifically comprises the following sub-steps:
S41, decomposing the simulation task, namely deeply analyzing the whole simulation task to determine each component and the dependency relationship among the components of the simulation task, and then decomposing the whole task into a plurality of relatively independent subtasks according to analysis results, wherein each subtask comprises specific input, processing logic and output so as to facilitate subsequent parallel processing;
s42, parallel computing planning, namely reasonably distributing subtasks to balance the computing load of each node according to the performance and the load condition of computing resources, determining the dependency relationship among the subtasks, ensuring that the dependency relationship is not destroyed when parallel execution is performed, and simultaneously combining with evaluating the communication overhead among the modules when parallel execution is performed, and making the parallel computing planning;
s43, parallel computing implementation, namely after the parallel computing planning is determined, deploying each module on a corresponding computing node or processing core, and starting a parallel computing process.
9. The method of claim 1, wherein in step S5, the synchronization mechanism specifically includes:
1) MPI, which realizes the communication between processes by sending and receiving messages;
2) A shared memory mechanism, openMP, which allows multiple threads to access the same memory address space;
3) Obstacle synchronization, namely, all modules continue to execute after reaching a certain synchronization point;
4) Event-driven synchronization, namely realizing synchronization among modules by monitoring and responding to the event by an event-based synchronization mechanism;
5) Lock and semaphore:
the lock is used for protecting the access of shared resources and preventing data conflict caused by simultaneous access of a plurality of modules, including but not limited to a mutual exclusion lock and a spin lock;
the semaphore refers to a counter for controlling access to a shared resource that allows a certain number of modules to access a resource at the same time, when the counter reaches zero, the modules that subsequently request the resource will be blocked;
6) Synchronizing data between modules by the time stamp or the serial number;
7) Distributed lock and atomic operation in distributed system, the distributed lock is used to ensure the synchronization of multiple nodes when accessing shared resource, or atomic operation is used to realize lock-free synchronization mechanism.
10. A method of multi-module based simulated computing according to claim 1, further comprising the steps of:
s7, feedback optimization:
Analyzing the simulation result, evaluating each index of the system, establishing a feedback mechanism according to the comparison of the simulation result and the actual demand, correcting and optimizing the model, and continuously iterating and optimizing the model and parameter setting in the subsequent simulation calculation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411156392.0A CN119127483A (en) | 2024-08-22 | 2024-08-22 | A method of simulation calculation based on multiple modules |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411156392.0A CN119127483A (en) | 2024-08-22 | 2024-08-22 | A method of simulation calculation based on multiple modules |
Publications (1)
Publication Number | Publication Date |
---|---|
CN119127483A true CN119127483A (en) | 2024-12-13 |
Family
ID=93769704
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411156392.0A Pending CN119127483A (en) | 2024-08-22 | 2024-08-22 | A method of simulation calculation based on multiple modules |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119127483A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119475935A (en) * | 2025-01-16 | 2025-02-18 | 武创芯研科技(武汉)有限公司 | Chip packaging finite element model analysis method, device and equipment |
CN119473632A (en) * | 2025-01-13 | 2025-02-18 | 武创芯研科技(武汉)有限公司 | A chip simulation post-processing method and system based on cloud computing |
-
2024
- 2024-08-22 CN CN202411156392.0A patent/CN119127483A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119473632A (en) * | 2025-01-13 | 2025-02-18 | 武创芯研科技(武汉)有限公司 | A chip simulation post-processing method and system based on cloud computing |
CN119475935A (en) * | 2025-01-16 | 2025-02-18 | 武创芯研科技(武汉)有限公司 | Chip packaging finite element model analysis method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zheng et al. | Simulation-based performance prediction for large parallel machines | |
RU2597556C2 (en) | Computer cluster arrangement for executing computation tasks and method for operation thereof | |
Sha et al. | Rate monotonic analysis for real-time systems | |
CN119127483A (en) | A method of simulation calculation based on multiple modules | |
Böhm et al. | xSim: The extreme-scale simulator | |
JP5651251B2 (en) | Simulation execution method, program, and system | |
Eugster et al. | Hands-on tutorial for parallel computing with R | |
Luckow et al. | Hadoop on HPC: Integrating Hadoop and pilot-based dynamic resource management | |
Biddiscombe et al. | Parallel computational steering for HPC applications using HDF5 files in distributed shared memory | |
Lu et al. | Assessing MapReduce for internet computing: a comparison of Hadoop and BitDew-MapReduce | |
Konas et al. | Parallel discrete event simulation on shared-memory multiprocessors | |
Owda et al. | Trace-based simulation framework combining message-based and shared-memory interactions in a time-triggered platform | |
Neves et al. | Scheduling mapreduce jobs in HPC clusters | |
Wilke et al. | Using Discrete Event Simulation for Programming Model Exploration at Extreme-Scale: Macroscale Components for the Structural Simulation Toolkit (SST). | |
WO2016186531A1 (en) | System and method for synchronizing distributed computing runtimes | |
Wong et al. | Middleware to manage fault tolerance using semi-coordinated checkpoints | |
Lim et al. | An empirical comparison of runtime systems for conservative parallel simulation | |
Liu et al. | A large-scale rendering system based on hadoop | |
Walker et al. | Composing and executing parallel data-flow graphs with shell pipes | |
Gray et al. | Towards a mapreduce application performance model | |
Kale et al. | Parallel and Distributed Epirust: Towards Billion-Scale Agent-Based Epidemic Simulations. | |
Ahmed et al. | An automated lightweight framework for scheduling and profiling parallel workflows simultaneously on multiple hypervisors | |
Wang et al. | Design and Blocking Analysis of Locking Protocols for Real-Time DAG Tasks Under Federated Scheduling | |
Sankari | Multi-core Support on a Robot Controller | |
Freisleben et al. | Approaches to Support Parallel Programming on Workstation Clusters: A Survey |
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 |