Deep penetration particle transport parallel computing method, system and equipment and storage medium
Through the MCNP program and MPI's CPU/GPU collaborative algorithm, the core particle transport task is processed in parallel, solving the existing problem of low serial computing efficiency and improving the calculation accuracy and efficiency.
Patent Information
- Application Number
- CN202411946947.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, serial calculation methods for nuclear particle transport are uniformly used, resulting in low efficiency and low calculation accuracy, which is difficult to meet the requirements of refined modeling and shielding calculations of X-cabin structure and internal source terms.
After completing the serial task through the MCNP program, the CPU/GPU collaborative algorithm based on MPI divides the simulation task and maps it to multiple independent computing units. Each independent computing unit tracks the motion trajectory of the allocated particles and records the key physical quantities, and finally outputs the calculation results through the MCNP program.
The accuracy of deep penetration shielding calculation is improved, while reducing the calculation time cost, improving the calculation efficiency, and achieving more than 80% parallel efficiency.
Smart Images

Figure CN120046441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nuclear radiation protection, and in particular, to a parallel computing method, system, device and storage medium for deep penetration particle transport. Background Art
[0002] During the operation of X-powered ships, radioactivity is generated. To ensure the radiation safety of ship crew, calculations, designs, etc. of radiation shielding are required. The X compartment is large in size and has complex internal source terms. The required radiation shielding is heavy and occupies a large amount of overall resources. Its weight reduction and optimization have always been important technical problems faced in its development process. Therefore, it is necessary to carry out refined modeling of the X compartment structure, internal source terms, etc., and perform shielding calculations and optimization designs.
[0003] In related technologies, the calculation method for nuclear particle transport uniformly adopts serial calculation, and this data processing method has low efficiency and low calculation accuracy. Summary of the Invention
[0004] To solve or improve at least one of the above technical problems, an object of the present invention is to provide a parallel computing method for deep penetration particle transport.
[0005] Another object of the present invention is to provide a parallel computing system for deep penetration particle transport.
[0006] Another object of the present invention is to provide an electronic device.
[0007] Another object of the present invention is to provide a readable storage medium.
[0008] To achieve the above object, a first aspect of the present invention provides a parallel computing method for deep penetration particle transport, and the steps include:
[0009] The first step is to complete serial tasks through the MCNP program; among them, the serial tasks include at least one or a combination of the following: reading simulation parameters, loading a cross-section database, initializing a geometric model, and initializing a random number seed.
[0010] The second step is to call the CPU / GPU collaborative algorithm based on MPI through the MCNP program, divide the simulation tasks according to the actual computing capabilities and quantities of the CPU and GPU, and map them to multiple independent computing units. Each independent computing unit tracks the movement trajectories of the assigned particles and records key physical quantities.
[0011] The third step is to reduce the recorded key physical quantities after each independent computing unit completes the tracking task of the movement trajectory, and output the final calculation result through the MCNP program.
[0012] The present invention aims to provide a parallel computing method for deep penetration particle transport. After completing some necessary serial tasks through the MCNP program, based on the MPI-based CPU / GPU collaborative algorithm, the simulation tasks are divided according to the actual computing capabilities and quantities of the CPU and GPU, so as to process the subsequent computing tasks in parallel. This data processing method can improve the calculation accuracy of deep penetration shielding while reducing the calculation time cost, which is beneficial to improving the computing efficiency.
[0013] In addition, the above technical solution provided by the present invention may further have the following additional technical features:
[0014] In some technical solutions, optionally, the CPU includes multiple first computing units, the GPU includes multiple second computing units, and the multiple independent computing units include at least one first computing unit and at least one second computing unit.
[0015] In this technical solution, the MPI-based CPU / GPU collaborative algorithm is called through the MCNP program, the simulation tasks are divided according to the actual computing capabilities and quantities of the CPU and GPU, and mapped to multiple first computing units and multiple second computing units. Each first computing unit and each second computing unit track the movement trajectories of the assigned particles and record key physical quantities.
[0016] After each first computing unit and each second computing unit complete the tracking tasks of the movement trajectories, the recorded key physical quantities are reduced, and the final calculation result is output through the MCNP program.
[0017] By dividing the simulation tasks and thus processing the subsequent computing tasks in parallel, it is possible to improve the calculation accuracy of deep penetration shielding while reducing the calculation time cost, which is beneficial to improving the computing efficiency.
[0018] In some technical solutions, optionally, the MPI-based CPU / GPU collaborative algorithm is called through the MCNP program, the simulation tasks are divided according to the actual computing capabilities and quantities of the CPU and GPU, and mapped to multiple independent computing units. Each independent computing unit tracks the movement trajectories of the assigned particles and records key physical quantities. The steps include: the MCNP program calls the MPI-based CPU / GPU collaborative algorithm to map the simulation tasks to the first computing unit and the second computing unit respectively to complete the first-level division of the simulation tasks; the simulation tasks assigned to the second computing unit are mapped to multiple CUDA threads respectively to complete the second-level division of the simulation tasks; the movement trajectories of the particles are tracked and key physical quantities are recorded.
[0019] In this technical solution, the simulation task (computing task) is divided into multiple levels of tasks, thereby improving the parallel efficiency and reducing the computational time cost. First-level division: The total computing task (simulation task) is respectively mapped to multiple first computing units and multiple second computing units. Second-level division: The computing task assigned to each second computing unit is subdivided and mapped to multiple CUDA threads.
[0020] In some technical solutions, optionally, after each independent computing unit completes the task of tracking the motion trajectory, the recorded key physical quantities are reduced, and the final calculation result is output through the MCNP program. The steps include: after completing the task of tracking the motion trajectory, reducing the second calculation results of multiple CUDA threads; reducing the first calculation results of the first computing unit; the MCNP program outputs the final calculation result according to the first calculation result and the second calculation result.
[0021] In this technical solution, the calculation method provided by the present invention (deep penetration particle transport parallel calculation method) can perform multi-level parallel reduction on the calculation results, can improve the deep penetration shielding calculation accuracy while reducing the computational time cost, and is beneficial to improving the calculation efficiency. First-level parallel reduction: reducing the second calculation results of multiple CUDA threads. Second-level parallel reduction: reducing the first calculation results of the first computing unit.
[0022] In some technical solutions, optionally, the simulation tasks assigned to the GPU include at least one of the following or a combination thereof: particle initialization, calculation of the collision distance, determination of the reaction cross-section, sampling of the energy and direction of elastic and inelastic scattering, sampling of the velocity and the cosine of the direction angle.
[0023] In this technical solution, particle initialization can be understood as initializing the particle model and setting particle parameters. The particle parameters include but are not limited to the position, velocity, and energy of the particle.
[0024] For the calculation of the collision distance, the GPU uses its parallel computing ability to simultaneously calculate the collision distances of numerous particles in the current medium. This calculation is based on factors such as the current velocity of the particles, the density of the medium, and the interaction cross-section between the particles and the medium.
[0025] The GPU is responsible for determining the reaction cross-section of the interaction between particles and matter, which is the key data for calculating the probabilities of various reactions between particles and matter. When facing different types of matter and particles, the GPU accurately obtains the corresponding reaction cross-section information according to the loaded cross-section database.
[0026] The GPU samples the energy and direction of elastic and inelastic scattering, as well as the velocity and the cosine of the direction angle. These sampling processes are important parts of Monte Carlo simulations. By means of random sampling, parameters such as the energy change and scattering direction of particles during the scattering process are determined to simulate the randomness of the interaction between particles and matter.
[0027] In some technical solutions, optionally, at least one second computing unit is used for particle initialization; and / or at least one second computing unit is used for calculating the collision distance; and / or at least one second computing unit is used for determining the reaction cross section; and / or at least one second computing unit is used for sampling the energy and direction of elastic and inelastic scattering; and / or at least one second computing unit is used for sampling the velocity and the cosine of the direction angle.
[0028] In this technical solution, by separately mapping multiple simulation tasks (particle initialization, calculation of collision distance, determination of reaction cross section, sampling of energy and direction of elastic and inelastic scattering, sampling of velocity and cosine of direction angle) assigned to the GPU to at least one second computing unit, it is beneficial to improve the parallel efficiency, and thus improve the data processing efficiency.
[0029] In some technical solutions, optionally, at least one first computing unit is used for generating random number seeds; and / or at least one first computing unit is used for partitioning the cache space of the GPU.
[0030] In this technical solution, by separately mapping multiple simulation tasks (generating random number seeds, partitioning the cache space of the GPU) assigned to the CPU to at least one first computing unit, it is beneficial to improve the parallel efficiency, and thus improve the data processing efficiency.
[0031] The second aspect of the present invention provides a deep penetration particle transport parallel computing system, including a first data processing module, a second data processing module, and a calculation result output module.
[0032] The first data processing module is used to complete serial tasks through the MCNP program. Among them, the serial tasks include at least one of the following or a combination thereof: reading in simulation parameters, loading the cross section database, initializing the geometric model, and initializing random number seeds.
[0033] The second data processing module is used to call the MPI-based CPU / GPU collaborative algorithm through the MCNP program, divide the simulation tasks according to the actual computing capabilities and quantities of the CPU and the GPU, and map them to multiple independent computing units. Each independent computing unit tracks the movement trajectories of the assigned particles and records key physical quantities.
[0034] The calculation result output module is used to reduce the recorded key physical quantities after each independent calculation unit completes the tracking task of the motion trajectory, and output the final calculation result through the MCNP program.
[0035] The present invention aims to provide a deep-penetrating particle transport parallel computing system. After completing some necessary serial tasks through the MCNP program, based on the MPI-based CPU / GPU collaborative algorithm, the simulation tasks are divided according to the actual computing capabilities and quantities of the CPU and GPU, so as to parallelly process the subsequent computing tasks. This data processing method can improve the calculation accuracy of deep-penetrating shielding while reducing the calculation time cost, which is beneficial to improving the calculation efficiency.
[0036] A third aspect of the present invention provides an electronic device, including a memory and a processor. Among them, a program or instruction that can run on the processor is stored on the memory, and when the processor executes the program or instruction, the steps of the deep-penetrating particle transport parallel computing method in any of the above technical solutions are implemented. Therefore, the electronic device has the beneficial effects of any of the above technical solutions, which will not be elaborated here.
[0037] A fourth aspect of the present invention provides a readable storage medium, which stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the deep-penetrating particle transport parallel computing method in any of the above technical solutions are implemented. Therefore, the readable storage medium has the beneficial effects of any of the above technical solutions, which will not be elaborated here.
[0038] The additional aspects and advantages of the technical solution of the present invention will become obvious in the following description part, or be understood through the practice of the present invention. Description of the Drawings
[0039] Figure 1 Shows a flowchart of a deep-penetrating particle transport parallel computing method according to an embodiment of the present invention;
[0040] Figure 2 Shows a flowchart of a deep-penetrating particle transport parallel computing method according to another embodiment of the present invention;
[0041] Figure 3 Shows a flowchart of a deep-penetrating particle transport parallel computing method according to another embodiment of the present invention;
[0042] Figure 4 Shows a structural block diagram of a deep-penetrating particle transport parallel computing system according to an embodiment of the present invention;
[0043] Figure 5 Shows a structural block diagram of an electronic device according to an embodiment of the present invention;
[0044] Figure 6Shows a schematic diagram of a parallel algorithm for particle transport Monte Carlo simulation according to an embodiment of the present invention;
[0045] Figure 7 Shows a schematic diagram of multi-level task partitioning according to an embodiment of the present invention;
[0046] Figure 8 Shows a schematic diagram of multi-level parallel reduction according to an embodiment of the present invention.
[0047] Wherein, Figures 1 to 8 The corresponding relationship between the reference numerals and component names in the figures is as follows:
[0048] 200: Deep penetration particle transport parallel computing system; 210: First data processing module; 220: Second data processing module; 230: Calculation result output module; 300: Electronic device; 310: Memory; 320: Processor. Detailed implementation manners
[0049] In order to more clearly understand the above objects, features and advantages of the embodiments of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0050] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the embodiments of the present invention may be implemented in other ways different from those described herein. Therefore, the protection scope of the present application is not limited to the limitations of the specific embodiments disclosed below.
[0051] Next, refer to Figures 1 to 8 Describe a deep penetration particle transport parallel computing method, a deep penetration particle transport parallel computing system, an electronic device and a readable storage medium provided according to some embodiments of the present invention.
[0052] In an embodiment according to the present invention, as Figure 1 shown, the steps of the deep penetration particle transport parallel computing method include:
[0053] S102, complete serial tasks through the MCNP program; wherein, the serial tasks include at least one or a combination of the following: reading simulation parameters, loading a cross-section database, initializing a geometric model, and initializing a random number seed.
[0054] The Monte Carlo (MC) method is a computational method based on random numbers and is widely used in calculating problems such as particle transport. The MCNP code (Monte Carlo Neutron and Photo Transport Code) is a Monte Carlo method (i.e., the MC method, the Monte Carlo method) shielding calculation software based on the interactions of neutrons and γ photons with matter and is widely used in radiation shielding design.
[0055] Regarding nuclear particles: Nuclear particles mainly refer to particles that interact with atomic nuclei or are produced from atomic nuclei. These particles include neutrons, protons, α particles (helium-4 nuclei), β particles (electrons or positrons), γ photons, etc. Their generation and movement processes involve nuclear physics processes such as nuclear decay and nuclear reactions.
[0056] Regarding deeply penetrating particles: Deeply penetrating particles are defined from the perspective of particle penetration ability. In the field of nuclear radiation protection, etc., deeply penetrating particles refer to those particles that can penetrate a relatively deep distance in a medium (such as a shielding material). These particles usually have relatively high energies and low interaction cross-sections.
[0057] Deeply penetrating particles are part of nuclear particles. Only those particles in nuclear particles that have sufficient energy and appropriate interaction characteristics and can penetrate a relatively deep medium are called deeply penetrating particles.
[0058] The purpose of this step is to complete some necessary serial tasks through the MCNP code, and then perform parallel processing on subsequent calculation tasks (simulation tasks) through the cooperation of the CPU (central processing unit) and GPU (graphics processing unit). The MCNP code, as an important part of the entire computational method (parallel computational method for deeply penetrating particle transport), constructs the basic framework of the entire calculation by completing a series of serial tasks, laying the foundation for subsequent parallel calculations based on the CPU / GPU heterogeneous architecture.
[0059] When the number of serial tasks is one, the serial task only includes any one of reading simulation parameters, loading the cross-section database, initializing the geometric model, and initializing the random number seed. When the number of serial tasks is multiple, the serial tasks include any combination of reading simulation parameters, loading the cross-section database, initializing the geometric model, and initializing the random number seed.
[0060] Read in simulation parameters. Simulation parameters are various set values for the entire particle transport simulation process. Simulation parameters include, but are not limited to, the size of the simulated spatial range, the type of particles of interest, and the duration of the simulation. Accurate reading of simulation parameters can ensure that subsequent calculations are performed according to predetermined conditions and requirements. Different simulation scenarios may require different parameter settings. For example, when simulating particle transport in cabin X, the spatial range parameters will be set according to the actual size of cabin X.
[0061] It should be noted that the X-cabin is part of an X-powered ship, which is a ship that generates radioactivity during operation, such as a nuclear-powered ship.
[0062] Load the cross-section database. The cross-section database contains key data on the interaction between particles and matter, such as cross-section information on different types of reactions (such as scattering, absorption, etc.) between deep-penetrating particles and various substances. These data are the basis for calculating the probability of interaction between particles during transport in matter. During the calculation process, when a particle encounters a certain substance, by querying the loaded cross-section database, the probability of a specific reaction between the particle and the substance can be determined, thereby accurately simulating the particle's transport path and energy changes.
[0063] Initialize the geometric model. The geometric model describes the physical space structure of particle transport. For complex scenes such as the X-cabin, its internal structure is complex and diverse, including various equipment, pipelines, cabins, etc. Initializing the geometric model is to build a digital representation of this physical space and determine the position, shape, material properties and other information of each part. In this way, in subsequent calculations, the movement trajectory of particles in this geometric space can be accurately simulated, such as determining how particles reflect, refract or are absorbed when encountering the boundaries of different materials.
[0064] Initialize the random number seed. Since the Monte Carlo method is a calculation method based on random sampling, the initialization of the random number seed is very critical. A series of random number sequences can be generated based on the random number seed. In particle transport simulation, many processes such as the scattering direction and collision distance of particles require random sampling to determine. Different random number seeds will produce different random number sequences, thus affecting the randomness and statistics of the simulation results. Appropriate random number seed initialization can ensure the accuracy and reliability of the simulation results in a statistical sense.
[0065] S104, calling the MPI-based CPU / GPU collaborative algorithm through the MCNP program, dividing the simulation task according to the actual computing power and number of the CPU and GPU, and mapping them to multiple independent computing units, each of which tracks the motion trajectory of each assigned particle and records key physical quantities.
[0066] It should be noted that MPI (Message Passing Interface) is a programming interface standard for parallel computing.
[0067] The calculation method of the present invention (deep penetration particle transport parallel calculation method) is built on a CPU / GPU heterogeneous architecture in terms of hardware. In a heterogeneous hybrid parallel system, the differences between the CPU and the GPU are only reflected in the architecture and the calculation method. When dealing with large-scale computing tasks, both can be used as parallel computing resources. In addition to managing the GPU, the CPU can also be responsible for a part of the computing tasks, that is, the efficient cooperation between the CPU / GPU gives full play to the high performance of the CPU / GPU hybrid heterogeneous system.
[0068] The purpose of this step is to make full use of heterogeneous computing resources by calling the CPU / GPU cooperation algorithm based on MPI through the MCNP program. Among them, MPI plays the role of a bridge to achieve efficient communication and collaborative work between different computing units (CPU and GPU), so that the computing tasks (simulation tasks) can be reasonably allocated and executed in a distributed environment.
[0069] Fully consider the actual computing power and quantity of the CPU and the GPU to divide the simulation tasks, and parallelly process the subsequent computing tasks (simulation tasks) through the cooperation of the CPU and the GPU.
[0070] Consider the computing power: Different CPUs and GPUs have different computing powers. By evaluating their respective computing powers, such as parameters like the core frequency of the CPU, cache size, and the number of stream processors and video memory bandwidth of the GPU, the appropriate task volume that each computing unit can undertake can be determined, avoiding the situation where some computing units are overloaded while other computing units are idle, thereby realizing the optimized utilization of the overall computing resources.
[0071] Consider the quantity factor: The quantity of computing units also affects the task division. More computing units mean that the simulation tasks can be further decomposed into smaller subtasks, and each subtask is processed by an independent computing unit, which can greatly shorten the computing time, improve the computing efficiency, and give full play to the advantages of parallel computing.
[0072] After each independent computing unit receives the task, its main work is to track the movement trajectories of the allocated particles. In particle transport simulation, the movement trajectories of particles are affected by various factors, such as interactions with matter (collisions, scattering, etc.), the action of external fields, etc. The independent computing unit needs to accurately calculate the state changes of particles at each time step or spatial position according to the set physical model and algorithm, such as the update of particle position coordinates, velocity vectors, energy values, etc.
[0073] Meanwhile, the independent computing units record key physical quantities. The key physical quantities include, but are not limited to, the energy loss of particles during movement, the scattering angle distribution, and the number of interactions with specific substances. The recorded key physical quantities will provide important data support for subsequent result analysis and data statistics.
[0074] S106. After each independent computing unit completes the task of tracking the movement trajectory, reduce the recorded key physical quantities and output the final calculation result through the MCNP program.
[0075] Since the simulation task is divided and mapped onto multiple independent computing units (including the first computing unit of the CPU and the second computing unit of the GPU) for parallel execution, each independent computing unit tracks the movement trajectory of particles and records key physical quantities. However, these key physical quantities are scattered in each independent computing unit and cannot directly represent the final result of the entire simulation task. Therefore, a reduction operation is required to integrate and summarize the key physical quantities recorded by each independent computing unit to obtain a comprehensive and accurate calculation result.
[0076] From the perspective of computing efficiency, performing reduction directly after each independent computing unit finishes processing the data can avoid redundant storage and transmission of data between independent computing units, reduce unnecessary waste of computing resources, and quickly obtain the final calculation result for subsequent analysis or decision-making.
[0077] The present invention aims to provide a parallel computing method for deep penetration particle transport. After completing some necessary serial tasks through the MCNP program, based on the MPI-based CPU / GPU collaborative algorithm, the simulation task is divided according to the actual computing capabilities and quantities of the CPU and GPU, so as to parallelly process subsequent computing tasks. This data processing method can improve the computing efficiency while enhancing the computing accuracy of deep penetration shielding and reducing the computing time cost.
[0078] The CPU is mainly used for initialization, result output, and management of the GPU. The key processes of the Monte Carlo simulation of particle transport are undertaken by the GPU, mainly including particle initialization, calculation of the collision distance, determination of the reaction cross-section, sampling of the energy and direction of elastic and inelastic scattering, sampling of the velocity and direction cosine of the angle, etc. The CPU can also undertake part of the computing tasks to make full and reasonable use of computing resources.
[0079] It should be emphasized that this patent provides a computing method (parallel computing method for deep penetration particle transport) with simple operation and high parallel efficiency. The MPI-based CPU / GPU parallel computing can significantly shorten the shielding calculation time, improve the shielding design efficiency, and the parallel efficiency reaches more than 80%.
[0080] Among them, the formula for calculating the parallel efficiency is: single-core running time / N-core parallel running time × N.
[0081] The single-core running time refers to the time required to run the entire particle transport calculation task using only one core (which can be a CPU core or a hypothetical single-core processing unit). This time reflects the basic computational cost without taking advantage of parallel computing.
[0082] The N-core parallel running time refers to the time spent to complete the same particle transport calculation task using N cores for simultaneous calculation. In the actual calculation process, by dividing and mapping the task to multiple independent computing units, these independent computing units work simultaneously, which theoretically can greatly shorten the calculation time. N represents the total number of cores participating in parallel computing, and this core can be the sum of CPU cores or GPU cores.
[0083] Taking 100 cores as an example (the case where N is equal to 100), the parallel computing time is at least 80 times shorter than the single-core running time.
[0084] In some embodiments, optionally, the CPU includes multiple first computing units, the GPU includes multiple second computing units, and the multiple independent computing units include at least one first computing unit and at least one second computing unit.
[0085] In other words, the multiple independent computing units include at least one first computing unit of the CPU and at least one second computing unit of the GPU. This heterogeneous combination forms a powerful computing resource pool, which can give full play to the respective advantages of the CPU and GPU and cooperate to complete complex particle transport simulation tasks.
[0086] Through the MCNP program, the MPI-based CPU / GPU collaborative algorithm is called. The simulation task is divided according to the actual computing capabilities and quantities of the CPU and GPU, and mapped to multiple first computing units and multiple second computing units. Each first computing unit and each second computing unit track the movement trajectories of the assigned particles and record key physical quantities.
[0087] After each first computing unit and each second computing unit complete the task of tracking the movement trajectories, the recorded key physical quantities are reduced, and the final calculation result is output through the MCNP program.
[0088] By dividing the simulation task and thus parallelizing the subsequent calculation tasks, it is possible to improve the calculation accuracy of deep penetration shielding while reducing the calculation time cost, which is beneficial to improving the calculation efficiency.
[0089] In some embodiments, optionally, as Figure 2As shown, S104 (invokes the MPI-based CPU / GPU collaborative algorithm through the MCNP program, divides the simulation tasks according to the actual computing capabilities and quantities of the CPU and GPU, and maps them to multiple independent computing units. Each independent computing unit tracks the movement trajectories of the allocated particles and records key physical quantities), and the steps include:
[0090] S1042, the MCNP program invokes the MPI-based CPU / GPU collaborative algorithm, and maps the simulation tasks to the first computing unit and the second computing unit respectively to complete the first-level division of the simulation tasks.
[0091] Divide the simulation tasks according to the actual computing capabilities and quantities of the CPU and GPU, and map them to the first computing unit and the second computing unit.
[0092] The purpose of this step is that the MCNP program invokes the MPI-based CPU / GPU collaborative algorithm for the first-level task division. In this process, according to the different characteristics of the CPU and GPU, the simulation tasks are reasonably allocated to the first computing unit and the second computing unit. For example, for the preliminary preparations such as the initialization of the geometric model and the generation of random number seeds involved in particle transport simulation, since they have high requirements for logical control and data correlation processing, they are often allocated to the first computing unit of the CPU. For tasks that require large-scale parallel processing such as a large number of collision calculations of particles in the medium and the simulation of the scattering process, they are allocated to the second computing unit of the GPU. This level of division lays the foundation architecture for the entire parallel computing, enabling different types of tasks to be launched on the most suitable computing units.
[0093] S1044, map the simulation tasks allocated to the second computing unit to multiple CUDA threads respectively to complete the second-level division of the simulation tasks.
[0094] It should be noted that the second computing unit includes multiple CUDA (Compute Unified Device Architecture) threads. CUDA threads are a general parallel computing architecture, and this structure can enable the GPU to solve complex computing problems.
[0095] For the simulation tasks assigned to the second computing unit, they are further mapped to multiple CUDA threads respectively. CUDA is a general-purpose parallel computing architecture that can make full use of the parallel computing power of the GPU. By refining the tasks to CUDA threads, each CUDA thread can independently handle the relevant calculations of one or more particles. For example, when calculating the collision distance of particles, each CUDA thread can be responsible for calculating the collision distance of a specific particle within the current time step. Through the parallel work of multiple CUDA threads, the computing speed is greatly improved. This second-level division further explores the parallel potential of the GPU, enabling the computing tasks to be more finely allocated and processed within the GPU.
[0096] S1046, track the movement trajectories of the particles and record the key physical quantities.
[0097] After the computing tasks are allocated, each independent computing unit starts to track the movement trajectories of the particles. For the first computing unit, it may handle some parts of the particle trajectory tracking related to the overall computing logic control. For the second computing unit, it uses its parallel computing ability to massively process the calculation of the movement trajectories of particles in the medium, including judging whether the particles collide according to the collision distance, determining the collision type (elastic or inelastic), calculating the energy and direction changes of the particles after the collision, etc. During this process, the key physical quantities are recorded simultaneously, such as the energy change of the particles, the scattering angle, the number of collisions, etc. These recorded physical quantities will be used for subsequent result analysis and data statistics.
[0098] The computing method provided by the present invention (deep penetration particle transport parallel computing method) can perform multi-level task division on the simulation tasks (computing tasks), thereby improving the parallel efficiency and reducing the computing time cost. The first-level division: map the total computing tasks (simulation tasks) to multiple first computing units and multiple second computing units respectively. The second-level division: subdivide the computing tasks assigned to each second computing unit and map them to multiple CUDA threads.
[0099] In a specific embodiment, Figure 7 is a schematic diagram of multi-level task division. The total computing task is the simulation task to be allocated. The CPU computing unit is the first computing unit; the GPU computing unit is the second computing unit. Among them, the second computing unit includes multiple CUDA threads.
[0100] In some embodiments, optionally, as Figure 3 shown, S106 (after each independent computing unit completes the tracking task of the movement trajectory, reduce the recorded key physical quantities and output the final computing result through the MCNP program), the steps include:
[0101] S1062, after completing the task of tracking the motion trajectory, reduce the second calculation results of multiple CUDA threads.
[0102] Reduce the second calculation results of multiple CUDA threads to complete the first-level parallel reduction.
[0103] In the second computing unit of the GPU, multiple CUDA threads process the particle motion trajectory tracking and related computing tasks in parallel, and each thread generates partial calculation results. The purpose of the first-level parallel reduction is to aggregate and integrate these second calculation results scattered among numerous CUDA threads to obtain an overall result regarding the part of the tasks processed by the GPU.
[0104] S1064, reduce the first calculation results of the first computing unit.
[0105] The purpose of this step is to complete the second-level parallel reduction.
[0106] The first computing unit undertakes tasks such as initialization, partial logic control, and collaborative management with the GPU during the entire particle transport calculation process, and also generates a series of first calculation results. The second-level parallel reduction is to integrate these calculation results scattered in different CPU cores or threads (the first computing unit) to obtain an overall situation regarding the part of the tasks processed by the CPU.
[0107] S1066, the MCNP program outputs the final calculation result according to the first calculation result and the second calculation result.
[0108] The MCNP program is responsible for the final collation, conversion, and output of these calculation results (including the first calculation result and the second calculation result). According to the requirements of the pre-set output format, the MCNP program integrates the first calculation result and the second calculation result and then outputs the final calculation result.
[0109] The final calculation result is the comprehensive information obtained after simulating the entire particle motion process, such as the data related to the motion trajectory of the particle in the simulation space. The final calculation result includes, but is not limited to, the coordinate changes of the particle at different positions and the complete path from the starting position to the final position.
[0110] Taking the particle transport simulation in the X compartment as an example, the final calculation result can show the motion trajectory of the particle starting from the source (such as a reactor) and moving within the complex geometric structure of the X compartment (including various equipment, pipelines, bulkheads, etc.), including the path of the particle shuttling between different media (such as metal structures, coolant, etc.).
[0111] The calculation method provided by the present invention (deep penetration particle transport parallel calculation method) can perform multi-level parallel reduction on the calculation results, can improve the calculation accuracy of deep penetration shielding while reducing the calculation time cost, and is beneficial to improving the calculation efficiency. The first-level parallel reduction: reducing the second calculation results of multiple CUDA threads. The second-level parallel reduction: reducing the first calculation results of the first calculation unit.
[0112] In a specific embodiment, Figure 8 It is a schematic diagram of multi-level parallel reduction. Among them, the GPU calculation result is the second calculation result; the CPU calculation result is the first calculation result. The total calculation result is the final calculation result output by the MCNP program.
[0113] In some embodiments, optionally, the simulation tasks assigned to the GPU include at least one of the following or a combination thereof: particle initialization, calculation of collision distance, determination of reaction cross-section, sampling of energy and direction of elastic and inelastic scattering, sampling of velocity and direction cosine of the angle.
[0114] When the number of simulation tasks assigned to the GPU is one, the simulation task only includes any one of particle initialization, calculation of collision distance, determination of reaction cross-section, sampling of energy and direction of elastic and inelastic scattering, sampling of velocity and direction cosine of the angle.
[0115] When the number of simulation tasks assigned to the GPU is multiple, the simulation tasks only include any combination of particle initialization, calculation of collision distance, determination of reaction cross-section, sampling of energy and direction of elastic and inelastic scattering, sampling of velocity and direction cosine of the angle.
[0116] Particle initialization can be understood as initializing the particle model and setting particle parameters. Particle parameters include but are not limited to the position, velocity, and energy of the particle.
[0117] For the calculation of the collision distance, the GPU utilizes its parallel computing ability to simultaneously calculate the collision distances of numerous particles in the current medium. This calculation is based on factors such as the current velocity of the particles, the density of the medium, and the interaction cross-section between the particles and the medium.
[0118] The GPU is responsible for determining the reaction cross-section of the interaction between particles and matter, which is the key data for calculating the probabilities of various reactions between particles and matter. When facing different types of matter and particles, the GPU accurately obtains the corresponding reaction cross-section information according to the loaded cross-section database.
[0119] The GPU samples the energy and direction of elastic and inelastic scattering, as well as the velocity and cosine of the direction angle. These sampling processes are important parts of Monte Carlo simulation. By means of random sampling, parameters such as the energy change and scattering direction of particles during the scattering process are determined to simulate the randomness of the interaction between particles and matter.
[0120] Through the close cooperation of the CPU and GPU, the MPI-based deep penetration particle transport calculation system can operate efficiently and accurately.
[0121] In some embodiments, optionally, at least one second computing unit is used for particle initialization.
[0122] Map the simulation tasks assigned to the GPU to at least one second computing unit to complete particle initialization.
[0123] In some embodiments, optionally, at least one second computing unit is used for the calculation of the collision distance.
[0124] Map the simulation tasks assigned to the GPU to at least one second computing unit to complete the calculation of the collision distance.
[0125] In some embodiments, optionally, at least one second computing unit is used for the determination of the reaction cross section.
[0126] Map the simulation tasks assigned to the GPU to at least one second computing unit to complete the determination of the reaction cross section.
[0127] In some embodiments, optionally, at least one second computing unit is used for sampling the energy and direction of elastic and inelastic scattering.
[0128] Map the simulation tasks assigned to the GPU to at least one second computing unit to complete sampling the energy and direction of elastic and inelastic scattering.
[0129] In some embodiments, optionally, at least one second computing unit is used for sampling the velocity and cosine of the direction angle.
[0130] Map the simulation tasks assigned to the GPU to at least one second computing unit to complete sampling the velocity and cosine of the direction angle.
[0131] By mapping multiple simulation tasks (particle initialization, calculation of the collision distance, determination of the reaction cross section, sampling of the energy and direction of elastic and inelastic scattering, sampling of the velocity and cosine of the direction angle) assigned to the GPU to at least one second computing unit respectively, it is beneficial to improve the parallel efficiency and thus improve the data processing efficiency.
[0132] In some embodiments, optionally, at least one first computing unit is used for generating random number seeds.
[0133] By mapping the simulation tasks assigned to the CPU to at least one first computing unit, the generation of a random number seed is completed.
[0134] A series of random number sequences can be generated based on the random number seed. In particle transport simulation, many processes such as the scattering direction of particles and the collision distance need to be determined by random sampling. Different random number seeds will generate different random number sequences, thus affecting the randomness and statistics of the simulation results. Appropriate initialization of the random number seed can ensure the accuracy and reliability of the simulation results in a statistical sense.
[0135] In some embodiments, optionally, at least one first computing unit is used to divide the cache space of the GPU.
[0136] By mapping the simulation tasks assigned to the CPU to at least one first computing unit, the division of the cache space of the GPU is completed. By reasonably dividing the cache space of the GPU, it is beneficial to improve the efficiency of parallel computing of the GPU.
[0137] By mapping multiple simulation tasks (generating a random number seed, dividing the cache space of the GPU) assigned to the CPU to at least one first computing unit respectively, it is beneficial to improve the parallel efficiency, and further improve the data processing efficiency.
[0138] In one embodiment according to the present invention, as Figure 6 shown, the parallel algorithm for particle transport Monte Carlo simulation includes a CPU working range and a GPU working range. Among them, the CPU working range includes: initialization; generating a random number seed; dividing the GPU cache space; loading the CUDA computing core; merging results; and determining whether the average value and standard deviation meet the requirements.
[0139] The GPU working range includes: initialization; calculating the collision distance; calculating the collision cross section; sampling the particle velocity; simulating particle capture; selecting elastic scattering and inelastic scattering; calculating the velocity and direction of the outgoing particle; and determining whether the particle lifetime ends.
[0140] In one embodiment according to the present invention, as Figure 4 shown, the deep penetration particle transport parallel computing system 200 includes a first data processing module 210, a second data processing module 220, and a calculation result output module 230.
[0141] The first data processing module 210 is used to complete serial tasks through the MCNP program. Among them, the serial tasks include at least one of the following or a combination thereof: reading simulation parameters, loading the cross section database, initializing the geometric model, and initializing the random number seed.
[0142] The MCNP program completes some necessary serial tasks, and then the CPU (central processing unit) and GPU (graphics processing unit) work together to parallelize the subsequent computing tasks (simulation tasks). As an important part of the entire computing system (deep penetration particle transport parallel computing system 200), the MCNP program builds the basic framework of the entire computing by completing a series of serial tasks, laying the foundation for subsequent parallel computing based on the CPU / GPU heterogeneous architecture.
[0143] When the number of serial tasks is one, the serial task only includes any one of reading in simulation parameters, loading in cross-section database, initializing geometric model and initializing random number seed. When the number of serial tasks is multiple, the serial task includes any combination of reading in simulation parameters, loading in cross-section database, initializing geometric model and initializing random number seed.
[0144] Read in simulation parameters. Simulation parameters are various set values for the entire particle transport simulation process. Simulation parameters include, but are not limited to, the size of the simulated spatial range, the type of particles of interest, and the duration of the simulation. Accurate reading of simulation parameters can ensure that subsequent calculations are performed according to predetermined conditions and requirements. Different simulation scenarios may require different parameter settings. For example, when simulating particle transport in cabin X, the spatial range parameters will be set according to the actual size of cabin X.
[0145] It should be noted that the X-cabin is part of an X-powered ship, which is a ship that generates radioactivity during operation, such as a nuclear-powered ship.
[0146] Load the cross-section database. The cross-section database contains key data on the interaction between particles and matter, such as cross-section information on different types of reactions (such as scattering, absorption, etc.) between deep-penetrating particles and various substances. These data are the basis for calculating the probability of interaction between particles during transport in matter. During the calculation process, when a particle encounters a certain substance, by querying the loaded cross-section database, the probability of a specific reaction between the particle and the substance can be determined, thereby accurately simulating the particle's transport path and energy changes.
[0147] Initialize the geometric model. The geometric model describes the physical space structure of particle transport. For complex scenes such as the X-cabin, its internal structure is complex and diverse, including various equipment, pipelines, cabins, etc. Initializing the geometric model is to build a digital representation of this physical space and determine the position, shape, material properties and other information of each part. In this way, in subsequent calculations, the movement trajectory of particles in this geometric space can be accurately simulated, such as determining how particles reflect, refract or are absorbed when encountering the boundaries of different materials.
[0148] Initialize the random number seed. Since the Monte Carlo method is a computational method based on random sampling, the initialization of the random number seed is crucial. Based on the random number seed, a series of random number sequences can be generated. In particle transport simulation, many processes such as the scattering direction of particles and the collision distance need to be determined by random sampling. Different random number seeds will generate different random number sequences, thus affecting the randomness and statistical properties of the simulation results. Appropriate initialization of the random number seed can ensure the accuracy and reliability of the simulation results in a statistical sense.
[0149] The second data processing module 220 is used to call the MPI-based CPU / GPU collaborative algorithm through the MCNP program, divide the simulation tasks according to the actual computing capabilities and quantities of the CPU and GPU, and map them to multiple independent computing units. Each independent computing unit tracks the movement trajectories of the assigned particles and records the key physical quantities.
[0150] It should be noted that MPI (Message Passing Interface) is a programming interface standard for parallel computing.
[0151] The computing system of the present invention (the deep penetration particle transport parallel computing system 200) is built based on the CPU / GPU heterogeneous architecture in terms of hardware. In the heterogeneous hybrid parallel system, the differences between the CPU and GPU are only reflected in the architecture and computing methods. Both can be used as parallel computing resources when dealing with large-scale computing tasks. In addition to managing the GPU, the CPU can also be responsible for a part of the computing tasks, that is, the efficient cooperation between the CPU / GPU gives full play to the high performance of the CPU / GPU hybrid heterogeneous architecture.
[0152] The purpose of this step is to make full use of heterogeneous computing resources by calling the MPI-based CPU / GPU collaborative algorithm through the MCNP program. Among them, MPI plays the role of a bridge to achieve efficient communication and collaborative work between different computing units (CPU and GPU), so that the computing tasks (simulation tasks) can be reasonably allocated and executed in a distributed environment.
[0153] Fully consider the actual computing capabilities and quantities of the CPU and GPU to divide the simulation tasks, and parallelly process the subsequent computing tasks (simulation tasks) through the cooperation of the CPU and GPU.
[0154] Consider the computing power: Different CPUs and GPUs have different computing capabilities. By evaluating their respective computing capabilities, such as the core frequency of the CPU, cache size, and the number of stream processors 320 and memory bandwidth of the GPU and other parameters, the appropriate task volume that each computing unit can undertake can be determined, avoiding the situation where some computing units are overloaded while other computing units are idle, thus realizing the optimal utilization of the overall computing resources.
[0155] Consider the quantity factor: The number of computing units also affects the task division. More computing units mean that the simulation task can be further decomposed into smaller subtasks, with each subtask processed by an independent computing unit. This can significantly shorten the computing time, improve the computing efficiency, and give full play to the advantages of parallel computing.
[0156] After receiving the task, the main job of each independent computing unit is to track the motion trajectories of the assigned particles. In particle transport simulation, the motion trajectories of particles are affected by various factors, such as interactions with substances (collisions, scattering, etc.) and the action of external fields. The independent computing unit needs to accurately calculate the state changes of particles at each time step or spatial position according to the set physical model and algorithm, such as the update of particle position coordinates, velocity vectors, energy values, etc.
[0157] Meanwhile, the independent computing unit records key physical quantities. The key physical quantities include but are not limited to the energy loss of particles during motion, the scattering angle distribution, and the number of interactions with specific substances. The recorded key physical quantities will provide important data support for subsequent result analysis and data statistics.
[0158] The calculation result output module 230 is used to reduce the recorded key physical quantities and output the final calculation result through the MCNP program after each independent computing unit completes the task of tracking the motion trajectory.
[0159] Since the simulation task is divided and mapped to multiple independent computing units (including the first computing unit of the CPU and the second computing unit of the GPU) for parallel execution, each independent computing unit is tracking the motion trajectory of particles and recording key physical quantities. However, these key physical quantities are scattered in each independent computing unit and cannot directly represent the final result of the entire simulation task. Therefore, a reduction operation is required to integrate and summarize the key physical quantities recorded by each independent computing unit to obtain a comprehensive and accurate calculation result.
[0160] From the perspective of computing efficiency, performing reduction directly after each independent computing unit finishes processing the data can avoid redundant storage and transmission of data between each independent computing unit, reduce unnecessary waste of computing resources, and quickly obtain the final calculation result for subsequent analysis or decision-making.
[0161] The present invention aims to provide a deep penetration particle transport parallel computing system 200. After completing some necessary serial tasks through the MCNP program, based on the MPI-based CPU / GPU collaborative algorithm, the simulation tasks are divided according to the actual computing capabilities and quantities of the CPU and GPU, so as to parallel process the subsequent computing tasks. This data processing method can improve the calculation accuracy of deep penetration shielding while reducing the calculation time cost, which is beneficial to improving the computing efficiency.
[0162] The CPU is mainly used for initialization, result output and GPU management. The key processes of particle transport Monte Carlo simulation are undertaken by the GPU, mainly including particle initialization, calculation of collision distance, determination of reaction cross-section, sampling of energy and direction for elastic and inelastic scattering, sampling of velocity and direction cosine angle, etc. The CPU can also undertake part of the computing tasks to make full and reasonable use of computing resources.
[0163] It should be emphasized that this patent provides a computing system (deep penetration particle transport parallel computing system 200) with simple operation and high parallel efficiency. The MPI-based CPU / GPU parallel computing can greatly shorten the shielding calculation time, improve the shielding design efficiency, and the parallel efficiency reaches more than 80%.
[0164] In an embodiment according to the present invention, as Figure 5 shown, the electronic device 300 includes a memory 310 and a processor 320. Among them, a program or instruction that can run on the processor 320 is stored on the memory 310. When the processor 320 executes the program or instruction, the steps of the deep penetration particle transport parallel computing method in any of the above embodiments are implemented. Therefore, the electronic device 300 has the beneficial effects of any of the above embodiments, which will not be elaborated here.
[0165] In an embodiment according to the present invention, a readable storage medium stores a program or instruction. When the program or instruction is executed by a processor, the steps of the deep penetration particle transport parallel computing method in any of the above embodiments are implemented. Therefore, the readable storage medium has the beneficial effects of any of the above embodiments, which will not be elaborated here.
[0166] In the present invention, the terms "first", "second", "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance; the term "plural" means two or more, unless otherwise clearly defined. Terms such as "installed", "connected", "connected", "fixed" and other terms should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0167] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", "front", "rear", etc. is based on the orientation or positional relationship shown in the drawings. These are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention.
[0168] In the description of this specification, the description of terms such as "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or instance. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0169] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A deep penetration particle transport parallel computing method, characterized in that: include: The serial tasks are completed by the MCNP program; wherein the serial tasks include at least one of the following or a combination thereof: reading in simulation parameters, loading a cross-section database, initializing a geometric model, and initializing a random number seed; The MCNP program calls the MPI-based CPU / GPU collaborative algorithm, divides the simulation task according to the actual computing power and quantity of the CPU and the GPU, and maps them to multiple independent computing units, each of which tracks the motion trajectory of each assigned particle and records key physical quantities; After each of the independent computing units completes the task of tracking the motion trajectory, the recorded key physical quantities are reduced, and the final calculation results are output through the MCNP program.
2. The deep penetration particle transport parallel computing method according to claim 1, characterized in that: The CPU includes a plurality of first computing units, the GPU includes a plurality of second computing units, and the plurality of independent computing units include at least one of the first computing units and at least one of the second computing units.
3. The deep penetration particle transport parallel computing method according to claim 2, characterized in that: The MCNP program calls the MPI-based CPU / GPU collaborative algorithm, divides the simulation task according to the actual computing power and quantity of the CPU and the GPU, and maps it to multiple independent computing units. Each of the independent computing units tracks the motion trajectory of each assigned particle and records key physical quantities, including: The MCNP program calls the MPI-based CPU / GPU collaborative algorithm to map the simulation task to the first computing unit and the second computing unit respectively, so as to complete the first level division of the simulation task; Mapping the simulation tasks assigned to the second computing unit to a plurality of CUDA threads respectively, so as to complete the second level division of the simulation tasks; The motion trajectory of the particle is tracked, and the key physical quantity is recorded.
4. The deep penetration particle transport parallel computing method according to claim 3, characterized in that: After each of the independent computing units completes the task of tracking the motion trajectory, the recorded key physical quantities are reduced, and the final calculation results are output through the MCNP program, including: After completing the task of tracking the motion trajectory, reducing the second calculation results of the plurality of CUDA threads; reducing the first calculation result of the first calculation unit; The MCNP program outputs the final calculation result according to the first calculation result and the second calculation result.
5. The deep penetration particle transport parallel computing method according to any one of claims 1 to 4, characterized in that: The simulation tasks assigned to the GPU include at least one of the following or a combination thereof: particle initialization, calculation of collision distance, determination of reaction cross section, sampling of energy and direction of elastic and inelastic scattering, sampling of velocity and direction angle cosine.
6. The deep penetration particle transport parallel computing method according to any one of claims 2 to 4, characterized in that: At least one of the second computing units is used for particle initialization; and / or At least one of the second calculation units is used for calculating a collision distance; and / or At least one of said second calculation units is used for determining a reaction cross section; and / or At least one of the second calculation units is used for sampling the energy and direction of elastic and inelastic scattering; and / or At least one of the second calculation units is used for sampling of velocity and direction angle cosine.
7. The deep penetration particle transport parallel computing method according to any one of claims 2 to 4, characterized in that: At least one of the first computing units is used to generate the random number seed; and / or At least one of the first computing units is used to divide the cache space of the GPU.
8. A deep penetration particle transport parallel computing system, characterized in that: include: A first data processing module (210) is used to complete a serial task through an MCNP program; wherein the serial task includes at least one of the following or a combination thereof: reading in simulation parameters, loading a cross-section database, initializing a geometric model, and initializing a random number seed; A second data processing module (220) is used to call the MPI-based CPU / GPU collaborative algorithm through the MCNP program, divide the simulation task according to the actual computing power and quantity of the CPU and the GPU, and map it to multiple independent computing units, each of which tracks the motion trajectory of each assigned particle and records key physical quantities; A calculation result output module (230) is used to reduce the recorded key physical quantities after each independent calculation unit completes the task of tracking the motion trajectory, and output the final calculation result through the MCNP program.
9. An electronic device, characterized in that: include: A memory (310) and a processor (320), wherein the memory (310) stores a program or instruction that can be run on the processor (320), and when the processor (320) executes the program or the instruction, the steps of the deep penetration particle transport parallel computing method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the deep penetration particle transport parallel computing method according to any one of claims 1 to 7 are implemented.