A method and device for atomic dynamics Monte Carlo simulation of material irradiation damage

By adopting GPU accelerated parallel computing and double buffer strategy in atomic dynamics Monte Carlo simulation, the problem of low computing efficiency in the existing technology is solved, and efficient simulation of irradiation damage of nuclear reactor vessel materials is achieved.

CN119475671BActive Publication Date: 2025-04-29COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411410041.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-06-27
Filing Date
2024-10-10
Publication Date
2025-04-29
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The prior art is difficult to effectively simulate the radiation damage of nuclear reactor vessel materials, especially in large-scale and long-term simulations, with low computational efficiency and difficult to cope with the problems of safety and performance degradation.

Method used

The Monte Carlo method based on GPU acceleration is adopted to improve resource utilization and computing efficiency through parallel computing and double buffer strategy, and efficient simulation of material irradiation damage is achieved.

Benefits of technology

It significantly improves the resource utilization rate and computing efficiency of the simulation, can effectively deal with large-scale and long-term simulation problems, and improves the simulation accuracy and efficiency of irradiation damage to nuclear reactor vessel materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475671B_ABST
    Figure CN119475671B_ABST
Patent Text Reader

Abstract

A material irradiation damage atomic dynamics Monte Carlo simulation method includes: GPU obtains the vacant position in the surface area and the related adjacent positions of the vacant position in the current sector based on the atomic information array; determines the transition rate of the vacant position in the current sector based on the vacant position and the related adjacent positions; obtains the pre-fetched vacant position of the next sector and the related adjacent positions of the pre-fetched vacant position at the same time; the pre-fetched vacant position is not in the surface area or in the ghost area; determines and executes the event based on the transition rate, and updates the ghost area; the execution event refers to the exchange of the current vacant position with the first nearest neighbor position; when the accumulated time of the execution event is greater than the sector communication threshold, the current process synchronizes the update in the ghost area to the neighbor process, obtains the vacant position in the surface area of ​​the next sector at the same time, and calculates the transition rate of the next sector based on the vacant position and the pre-fetched vacant position in the surface area of ​​the next sector. The method improves the utilization rate of resources by overlapping the communication and calculation of the current sector.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of China on June 27, 2024, with application number 2024108480532 and application name “A method and device for atomic dynamics Monte Carlo simulation of material irradiation damage”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present invention relates to the field of high performance computing technology, and in particular to a method and device for atomic dynamics Monte Carlo simulation of material radiation damage. Background Art

[0003] Energy is the driving force behind the development of human productivity. With the gradual depletion of fossil energy, clean energy is gradually stepping onto the world stage. Nuclear energy, as a clean energy source, is playing an increasingly important role. However, nuclear leakage is very scary, so safety is particularly important for both the currently in-service nuclear fission reactors and the future nuclear fusion reactors. The Reactor Pressure Vessel (RPV) is the last barrier of the reactor core and the only irreplaceable core equipment in a pressurized water reactor during its life cycle. Its importance is self-evident. High-energy particle bombardment can cause degradation of the macroscopic properties of RPV materials, such as embrittlement. Radiation embrittlement is one of the main performance problems faced by RPV materials, so how to simulate radiation damage to related nuclear reactor vessels has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method, apparatus, computing device, computer storage medium and product including computer program for atomic dynamics Monte Carlo simulation of material irradiation damage, which can improve the existing CPU-based AKMC calculation strategy by using the atomic dynamics Monte Carlo method based on GPU acceleration, which is difficult to deal with large-scale and long-term simulation due to low parallel efficiency. The present invention can greatly improve resource utilization and computing efficiency.

[0005] In a first aspect, an embodiment of the present application provides an atomic dynamics Monte Carlo simulation method for material irradiation damage, which is applied to a computing device, wherein the computing device is provided with a GPU, and the computing device is used for atomic dynamics Monte Carlo simulation of material irradiation damage, wherein the simulation area of ​​the material is divided into a plurality of subdomains, each subdomain corresponds to a GPU process, and each subdomain is divided into a plurality of parts, each part being a sector, and an atomic information array of the material simulation area is stored in the computing device, and the method comprises: the GPU obtains a vacancy in a surface area of ​​the current sector and related adjacent bits of the vacancy based on the atomic information array; the adjacent bits include a first nearest neighbor and a second nearest neighbor; Based on the vacant positions and the related adjacent positions, the transition rate of the vacant positions in the current sector is determined; at the same time, the pre-fetched vacant positions of the next sector and the related adjacent positions of the pre-fetched vacant positions are obtained; the pre-fetched vacant positions are neither in the surface area nor in the ghost area; based on the transition rate, events are determined and executed to update the ghost area; the execution event refers to the exchange of the current vacant position with the first nearest neighbor position; when the accumulated time of the execution event is greater than the sector communication threshold, the current process synchronizes the updates in the ghost area to the neighboring process, and at the same time obtains the vacant positions in the surface area of ​​the next sector, and calculates the transition rate of the next sector based on the vacant positions and the pre-fetched positions in the surface area of ​​the next sector.

[0006] In some possible implementations, vacancies in the surface area of ​​the current sector and related adjacent bits of the vacancies are obtained, including: obtaining atomic information of the current sector in the atomic information array, determining the vacancies in the atomic information, and determining a vacancy prefetch array based on the vacancies in the atomic information; traversing the vacancy prefetch array to obtain the local ID of each vacancy, and determining the local coordinates corresponding to the vacancy based on the local ID; and obtaining related adjacent bits of the current vacancy based on the local ID of the vacancy in the current sector.

[0007] In some possible implementations, a vacancy structure is stored in the vacancy prefetch array, and the vacancy structure is in the form of a local ID, a transition rate, and a valid bit.

[0008] In some possible implementations, the transition rate of the vacant position in the current sector is determined based on the vacant position and the related neighboring positions, including: the GPU is responsible for the calculation of one vacant position through one thread, and the number of threads is the same as the number of vacancies in the current sector; the current vacant position and the first neighbor related to the current vacant position are exchanged in turn, the system energy after the exchanged positions is calculated, and the positions are exchanged back; based on the system energy before and after the exchanged positions, the transition rate in each first neighbor direction is determined.

[0009] In some possible implementations, an event is determined and executed based on a transition rate, including: generating a first random number, the first random number being between 0 and 1; determining an expected rate based on the first random number and the transition rate; determining to execute the event based on the cumulative sum of the transition rates in each first neighboring direction and the expected rate; and the execution event represents a transition toward a first neighboring direction whose cumulative sum is greater than the expected rate.

[0010] In some possible implementations, calculating the accumulated time of executing the event includes: generating a second random number, where the second random number is between 0 and 1; executing the event, and determining a time increment based on a rate at which the event occurs and the second random number.

[0011] In some possible implementations, after the current process synchronizes updates in the ghost area to the neighbor process, the method further includes: communicating the modified portion of the surface area during the execution of the event to the neighbor process as well.

[0012] In some possible implementations, the current process synchronizes updates in the ghost region to neighbor processes through a message passing interface.

[0013] In a second aspect, an embodiment of the present application provides an atomic dynamics Monte Carlo simulation device for material irradiation damage, which is deployed on a computing device, the computing device is provided with a GPU, the computing device is used for atomic dynamics Monte Carlo simulation of material irradiation damage, the simulation area of ​​the material is divided into multiple subdomains, each subdomain corresponds to a GPU process, each subdomain is divided into several parts, each part is used as a sector, and the computing device stores an atomic information array of the material simulation area, the device includes: an acquisition module, used to obtain a vacancy in the surface area of ​​the current sector, and related adjacent bits of the vacancy; the adjacent bits include a first neighbor and a second neighbor; a processing module, used based on the vacancy and the related adjacent bits, Determine the transition rate of the vacant position in the current sector; the acquisition module is also used to simultaneously acquire the pre-fetched vacant position of the next sector and the related adjacent positions of the pre-fetched vacant position; the pre-fetched vacant position is neither in the surface area nor in the ghost area; the processing module is also used to determine and execute events based on the transition rate and update the ghost area; the execution event refers to the exchange of the current vacant position with the first neighbor position; the processing module is also used to synchronize the updates in the ghost area to the neighbor process by the current process when the cumulative time of the execution event is greater than the sector communication threshold, and at the same time acquire the vacant position in the surface area of ​​the next sector, and calculate the transition rate of the next sector based on the vacant position and the pre-fetched position in the surface area of ​​the next sector.

[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising computer-readable instructions. When a computer reads and executes the computer-readable instructions, the computer executes the method described in any one of the first aspects.

[0015] In a fourth aspect, an embodiment of the present application provides a computing device, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method described in any one of the first aspects is executed.

[0016] In a fifth aspect, an embodiment of the present application provides a product comprising a computer program. When the computer program product runs on a processor, the processor executes the method as described in any one of the first aspects.

[0017] The present invention improves the existing CPU-based AKMC calculation strategy by using the GPU-accelerated atomic dynamics Monte Carlo method, which has low parallel efficiency and is difficult to cope with large-scale and long-term simulation problems. It can greatly improve resource utilization and computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0019] Figure 1 It is a flow chart of a method for atomic dynamics Monte Carlo simulation of material irradiation damage provided in an embodiment of the present application;

[0020] Figure 2 This is a schematic diagram of obtaining a current sector vacancy and vacancy-related neighbors provided by an embodiment of the present application;

[0021] Figure 3 It is a schematic diagram of calculating transition rate and data prefetching provided by an embodiment of the present application;

[0022] Figure 4 It is a schematic diagram of an algorithm flow for calculating transition rate provided in an embodiment of the present application;

[0023] Figure 5 This is a flow chart of a cumulative time determination method provided in an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of simultaneous communication and calculation provided by an embodiment of the present application;

[0025] Figure 7 It is a schematic diagram of the structure of an atomic dynamics Monte Carlo simulation device for material radiation damage provided by an embodiment of the present application;

[0026] Figure 8 It is a structural diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0029] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.

[0030] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0031] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.

[0032] To facilitate the understanding of the embodiments of the present application, the following will further explain and illustrate specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0033] The atomic kinetic Monte Carlo method is one of the important methods for simulating radiation damage. Atomic kinetic Monte Carlo (AKMC) is a method based on Markov processes, and the transition of the system from one state to another is memoryless. In material simulation, the AKMC method takes atoms as the basic research object, and randomly extracts events to change the state of the system, thereby promoting the continuous forward evolution of the system. In the existing methods of using AKMC for radiation damage simulation, it is mainly based on the central processing unit (CPU), and the synchronous sub-lattice (SL) algorithm is usually used to solve the conflict problem after parallelization. Specifically, all processes simultaneously query and calculate all vacancies outside the ghost area in the current sector and the transition rate of the vacancies. If the total transition rate is less than zero, it means that there are no empty spaces outside the ghost area of ​​the current sector of the process, and the process enters the communication waiting stage; if the total transition rate is greater than zero, an event is randomly selected and executed, and then all empty spaces outside the ghost area in the current sector and the transition rate of the empty space are re-queried and calculated until the cumulative time reaches the communication threshold. Finally, the message passing interface (MPI) MPI communication synchronizes the surface area and updates the ghost area. Although the MPI multi-process is used to divide the tasks and promote the system forward evolution through sector parallelism, the calculation transition rate within the sector is still serial. Although this CPU multi-process-based calculation method statically divides the simulation area to achieve sector calculation parallelism, it is limited by the calculation characteristics of the CPU, and the sector calculation still serially calculates the transition rate of each empty space. Due to the limited parallel computing capability of the CPU, when the number of empty spaces is large, the calculation of the total transition rate is very time-consuming, making it difficult for existing calculation methods to cope with large-scale and long-term simulation problems, and there is a problem of very low simulation efficiency. In view of this, an embodiment of the present application provides an atomic dynamics Monte Carlo simulation method for material irradiation damage, which uses a graphics processing unit (GPU) to parallelize and accelerate the calculation of vacancy transition rates, and adopts a double buffer strategy to pre-fetch data for the next sector. A rearrangement method is used to achieve overlap of post-fetch data calculation of the current sector and direct memory access (DMA) operation of pre-fetched data of the next sector, and overlap of MPI communication and calculation of pre-fetched data of the next sector, so as to improve resource utilization.

[0034] For example, Figure 1A schematic diagram of a method for atomic dynamics Monte Carlo simulation of material irradiation damage provided in an embodiment of the present application is shown. The method is applied to a computing device, and the computing device is provided with a GPU. Figure 1 As shown, the simulation method may include the following steps:

[0035] S11: The GPU obtains the empty bits and related adjacent bits in the surface area of ​​the current sector of the material.

[0036] In this embodiment, the simulation area of ​​the material is determined, and the simulation area is divided into multiple subdomains, each of which can correspond to a GPU process. Each subdomain is evenly divided into several parts (for example, 4 parts, 8 parts, etc.), and 8 parts are used as an example in the embodiment, each of which is a sector. Each sector includes a surface area and a ghost area. The surface area (surface region), also known as the surface area, is a term used to describe the surface layer or boundary layer of the material in the field of material science and simulation. This layer may receive special attention in simulations and experiments because of its unique physical and chemical properties. In the simulation of material radiation damage, the surface area usually refers to the boundary part of the simulation area. In the atomic dynamics Monte Carlo (AKMC) simulation, the material is divided into multiple small areas and sectors, each of which has its own boundary. These boundary areas may have different physical properties or boundary conditions from the internal area, for example, they may have material exchange or energy exchange with the external environment. During the simulation process, vacancies and atoms in the "surface area" may have different behavior patterns because they are affected by the boundary conditions. Therefore, special attention is required. After partitioning the material, the GPU obtains the empty spaces in the surface area of ​​each sector of the material, and the adjacent spaces adjacent to the empty spaces. The adjacent spaces may include the first neighbor and the second neighbor of the current empty space. The empty space information is stored in an array, which is called the post-fetch empty space array, also known as the empty space pre-fetch array. The empty space pre-fetch array is a structure array. The related neighbors are also stored in the array, which is called the adjacent post-fetch array. The adjacent post-fetch array is also a structure array.

[0037] For some possible embodiments, please refer to Figure 2 , Figure 2 FIG. 1 shows a schematic diagram of obtaining the current sector vacancy and the vacancy-related neighbors. Figure 2 As shown, obtaining the empty bits and related adjacent bits in the surface area in the current sector may include:

[0038] S111: traverse the empty position pre-fetch array, obtain the local ID of each empty position, and determine the local coordinates corresponding to the empty position according to the local ID.

[0039] In this embodiment, a vacancy prefetch array of the simulation area is stored in the computing device. In the vacancy prefetch array, a vacancy structure can be stored in the form of a local ID, a transition rate, and a valid bit. Among them, the local ID represents the local ID of the vacancy in the subdomain to which the current process is divided, which is called the first ID; the transition rate is an array of size 8, which represents the transition rate in 8 directions of the vacancy; the valid bit indicates whether the vacancy still participates in the next calculation. If the vacancy transitions to the ghost area (ghost area), it will no longer participate in the next calculation. In scientific computing and numerical simulation, especially in the field of parallel computing, it is a term used to describe the area near the boundary of the simulation domain. In scientific computing and parallel computing, the ghost area is usually outside the computing area (local area) responsible for each process, but adjacent to the boundary of the local area. It is a buffer used to transmit information in parallel computing, referring to those local areas that do not belong to the current computing node or process, but the data of these areas are required to correctly perform boundary condition processing or data exchange. These areas store boundary data received from adjacent processes so that the influence of boundary conditions and adjacent areas can be considered during calculation. According to the SL algorithm, each process in the GPU performs calculations for a sector at the same time. First, determine whether the elements in the initial atomic information group are in the current sector. If they are in the current sector, select the vacant position in the current sector and store the vacant position in the vacant position array. Specifically, in the atomic information array, each element consists of a local ID and an atom type. The type of the atom with the local ID can be determined based on the atom type. Convert the local ID of the vacant position into local coordinates. Taking the two-dimensional case as an example, assuming that the local ID of a vacant position is z, and the size of the subdomain responsible for the current process is x*y, the local coordinates corresponding to the local ID are (z / x, zx*(z / x)), where the divisor is rounded down. Then determine whether the vacant position is in the surface area of ​​the current sector based on the local coordinates. If it is, store it in the vacant position and then take it into the array. Since GPU is used for acceleration, a vacant position structure is designed to represent the relevant information of a vacant position.

[0040] S112: Based on the current sector vacancy, obtain the related adjacent bits of the current vacancy.

[0041] In this embodiment, according to the vacancy post-retrieval array, the vacancies in the array are traversed to obtain each current vacancy. The first neighbor, the second neighbor, the first neighbor of the first neighbor, and the second neighbor of the first neighbor of the current vacancy are stored in the neighbor post-retrieval array in sequence. The neighbor bit structure stored in the neighbor post-retrieval array is in the form of local ID and type. Among them, the local ID represents the local ID of the neighbor in the subdomain divided by the current process, which is called the second ID; the type represents the atomic type of the neighbor. Calculating the system energy of a vacancy requires its 8 first neighbors and 6 second neighbors. Since the calculation process requires the vacancy to exchange positions with the first neighbor, and then calculate the system energy after the exchange position, the atomic information of the first neighbors of 64 first neighbors and the second neighbors of 48 first neighbors is also required. Traverse the vacancy array, query the atomic information of the 8 first neighbors, 6 second neighbors, 64 first neighbors, and 48 second neighbors of each vacancy, and store the obtained neighbors in the neighbor post-retrieval array. The 126 neighbor atoms are stored in the neighbor array in sequence, so the 126 elements of the neighbor array correspond to 1 element of the empty bit array, which facilitates sequential memory access during the calculation process and improves the cache hit rate.

[0042] S12: Calculate the transition rate of the vacancy in the current sector, and obtain the pre-fetched vacancy and related adjacent bits of the next sector. The pre-fetched vacancy is a vacancy that is neither in the surface area nor in the ghost area.

[0043] In this embodiment, please refer to Figure 3 , the GPU adopts a strategy of one thread responsible for calculating one vacancy, starts the same number of threads as the number of vacancies after the current sector to calculate the transition rate, and at the same time, obtains the pre-fetched vacancies and related neighbors of the next sector. The number can be obtained by traversing the array. The GPU kernel function adopts a vacancy parallel strategy, and one GPU thread calculates the transition rate of one vacancy. Specifically, start a number of GPU threads equal to the number of vacancies, and one GPU thread is responsible for calculating the transition rates of one vacancy in 8 directions. Each thread calculates the system energy of the current vacancy respectively. The vacancy is exchanged with one of the first neighbors in turn. Based on the first and second neighbors, the system energy after the exchange is calculated. Then the position is exchanged back. The transition rate in the direction of the first neighbor is calculated based on the system energy before and after the exchange. Repeat these steps until the transition rates in the 8 directions are calculated. At the same time, the vacancies in the next sector that are neither in the surface area nor in the ghost area, as well as the neighboring bits related to each vacancy, are obtained through DMA.

[0044] For example, Figure 4 Schematic diagram of the algorithm flow for calculating the transition rate is shown in FIG. 1 , where i represents the i-th first neighbor of the vacancy. Figure 4As shown in the figure, the specific process of the GPU transition rate calculation algorithm includes: calculating the total system energy at the initial stage of the current vacancy. Starting from the first first neighbor, determine whether the atom type of the first neighbor that needs to exchange positions is a vacancy. If not, exchange the positions of the vacancy and its first neighbor atoms, and calculate the total system energy of the vacancy after the exchange. According to the total system energy of the vacancy before and after the exchange, calculate the transition rate of the vacancy in this direction. If so, do not exchange positions with the first neighbor, and re-judge starting from the next first neighbor until all 8 first neighbors have completed the calculation.

[0045] S13: Select and execute an event, and determine whether to perform an event loop in the sector based on the accumulated time and the sector communication threshold.

[0046] In this embodiment, please refer to Figure 5 , Figure 5 The flowchart of the cumulative time judgment method is shown. Since the total transition rate is obtained by summing up the transition rates of the eight directions of each vacancy, the current vacancy and one of its first neighbors are exchanged as an event. A random number between 0 and 1 is randomly generated, and the random number is multiplied by the total transition rate to obtain an expected rate. The transition rates of the eight directions of each vacancy are accumulated one by one. If the accumulated value is greater than the expected rate, the vacancy is selected to transition in that direction as the event to be executed this time. The selected event is executed, and the selected vacancy is exchanged with its first neighbor. A random number between 0 and 1 is randomly generated again, and the random number is used to calculate the time increment, and the time increment is accumulated to the cumulative time. If the cumulative time is less than the set sector communication threshold, the transition rate of the vacancy in the sector is recalculated, and the time is reselected and executed; if the cumulative time is greater than the set sector communication threshold, the execution event is no longer selected.

[0047] S14: Perform MPI communication and GPU kernel function calculation.

[0048] In this embodiment, when the accumulated time of the current sector is greater than the sector communication threshold, the event loop is no longer performed and the communication phase is entered. In the communication phase, each process synchronizes the updates in the ghost area to the neighboring process in order to synchronize the corresponding surface area. The process where the current sector is located must also receive updates to the ghost area of ​​the neighboring process. Next, the modified part of the surface area during the sector execution event is also communicated to the neighboring process to ensure that when the next sector is executed, the data in its ghost area is the latest. In the process of data synchronization, MPI's non-blocking communication is adopted, and the process can continue to perform subsequent operations without waiting for the communication to end. After receiving the update of the ghost area of ​​the neighboring process, the data of the surface area is updated. While communicating, the GPU obtains the vacant space in the surface area, and calculates the transition rate of the next sector in combination with the pre-acquired pre-fetched space of the next sector. Repeat this process until all sectors are calculated. For example, please refer to Figure 6 , Figure 6 A schematic diagram of simultaneous communication and calculation is shown. MPI communication first reads all the empty spaces that jump to the ghost area during the calculation process of the current sector into the send buffer, and then sends the data in the send buffer to the corresponding neighbor process in sequence through the MPI_Isend function. The neighbor process detects whether there is data to be received through the MPI_Probe function. If so, a receive buffer of the corresponding size is opened, and then the data is received into the receive buffer. If not, it means that there is no data to be received. The surface area of ​​the subdomain is transmitted to the neighbor process in the same way. At the same time, the GPU kernel function is started to calculate the pre-fetched data of the next sector. In this way, MPI communication and calculation overlap can be achieved.

[0049] In order to verify the feasibility of this scheme, this method and the method based on CPU multi-process irradiation damage AKMC simulation software were used to calculate the time consumption and determine the acceleration ratio. The acceleration ratio is used to characterize the ratio of CPU calculation time to GPU calculation time. The solute concentration is set to 1.34*10 -2 , the total number of simulated atoms is 2*10 6 , the total number of event iterations is 2000. During the experiment, the vacancy concentration was increased from 8*10 -4 Gradually increase to 5*10 -1 To evaluate the specific acceleration effect. The experimental results are shown in Table 1.

[0050] Table 1

[0051] Vacancy concentration CPU calculation time (seconds) GPU calculation time (seconds) Speedup <![CDATA[8*10 -4 ]]> 9.19 4.76 1.93 <![CDATA[4*10 -3 ]]> 44.9 5.01 8.96 <![CDATA[2*10 -2 ]]> 240.23 5.4 44.49 <![CDATA[10 -1 ]]> 1175.75 7.14 164.67 <![CDATA[5*10 -1 ]]> 4742.09 31.75 149.36

[0052] From the experimental data in Table 1, we can intuitively see that this method has a very good effect. Compared with the existing CPU-based calculation method, its acceleration ratio can reach 164.67, which greatly improves the efficiency of the simulation.

[0053] The above is an introduction to the atomic dynamics Monte Carlo simulation method for material irradiation damage provided by the embodiment of the present application. The data pre-fetching of the next sector is realized by a double buffer, and the DMA operation overlap, MPI communication and calculation overlap of the pre-fetched data of the next sector are realized by a rearrangement method to improve the utilization of resources. In addition, the parallel computing capability of the GPU is utilized to accelerate the calculation of the transition rate of the vacancy to improve the efficiency of the AKMC simulation. The method effectively solves the problem that the existing method is difficult to support large-scale and long-term simulation. On the other hand, the method of parallelizing and accelerating the calculation of the transition rate of the vacancy by using the GPU can also increase the cache hit rate. In the prior art, the neighbor of a vacancy needs to be queried in a three-dimensional array through local coordinates. Since all the atomic information in the current subdomain is stored in the three-dimensional array, it is impossible to read it all into the cache, which will result in that when accessing different neighbors, its cache hit rate will be very low. This method stores all the neighbors required for vacancy calculation in a one-dimensional array in sequence, and the vacancy query of different neighbors is presented as a sequential traversal of the one-dimensional array, which will greatly improve the cache hit rate.

[0054] It is understandable that the size of the sequence number of each step in the above-mentioned embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, in some possible implementations, the steps in the above-mentioned embodiments can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here. All or part of any feature of any embodiment of the present application can be freely and arbitrarily combined without contradiction. The combined technical solution is also within the scope of the present application.

[0055] Based on the method in the above embodiment, the present application embodiment also provides an atomic dynamics Monte Carlo simulation device for material irradiation damage. For example, Figure 7 A material irradiation damage atomic dynamics Monte Carlo simulation device is shown, which is deployed on a computing device, the computing device is provided with a GPU, the computing device is used for material irradiation damage atomic dynamics Monte Carlo simulation, the material simulation area is divided into multiple subdomains, each subdomain corresponds to a GPU process, each subdomain is divided into several parts, each part is a sector, and the computing device stores the atomic information array of the material simulation area. The material irradiation damage atomic dynamics Monte Carlo simulation device 700 includes: an acquisition module 701 and a processing module 702.

[0056] The acquisition module is used to acquire a vacant position in the surface area of ​​the current sector and a related adjacent position of the vacant position; the adjacent position includes a first neighbor and a second neighbor;

[0057] A processing module, configured to determine a transition rate of an empty position in a current sector based on the empty position and the related adjacent positions;

[0058] The acquisition module is further used to simultaneously acquire a pre-fetched space of the next sector and a related adjacent position of the pre-fetched space; the pre-fetched space is neither in the surface area nor in the ghost area;

[0059] The processing module is further used to determine and execute an event based on the transition rate to update the ghost area; the execution event refers to the current empty position being exchanged with the first neighbor position;

[0060] The processing module is also used for, when the accumulated time of the execution event is greater than the sector communication threshold, the current process synchronizes the updates in the ghost area to the neighbor process, and simultaneously obtains the vacant space in the next sector surface area, and calculates the transition rate of the next sector based on the vacant space in the next sector surface area and the pre-fetched space.

[0061] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method, which will not be repeated here.

[0062] The present application also provides a computing device 800, which may be an FPGA disposed on the aforementioned edge device. Figure 8 As shown, the computing device 800 includes: a bus 802, a processor 804, a memory 806, and a communication interface 808. The processor 804, the memory 806, and the communication interface 808 communicate through the bus 802. The computing device 800 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 800.

[0063] The bus 802 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8The bus 804 is represented by only one line, but does not mean that there is only one bus or one type of bus. The bus 804 may include a path for transmitting information between various components of the computing device 800 (eg, the memory 806, the processor 804, and the communication interface 808).

[0064] The processor 804 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0065] The memory 806 may include a volatile memory, such as a random access memory (RAM). The processor 804 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0066] The memory 806 stores executable program codes, and the processor 804 executes the executable program codes to respectively implement the functions of the acquisition module 701 and the processing module 702, thereby implementing all or part of the steps of the method in the above embodiment. That is, the memory 806 stores instructions for executing all or part of the steps in the method in the above embodiment.

[0067] Alternatively, the memory 806 stores executable codes, and the processor 804 executes the executable codes to respectively implement the functions of the aforementioned material irradiation damage atomic dynamics Monte Carlo simulation device 700, thereby implementing all or part of the steps in the above-mentioned embodiment method. That is, the memory 806 stores instructions for executing all or part of the steps in the above-mentioned embodiment method.

[0068] The communication interface 808 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 800 and other devices or communication networks.

[0069] Based on the methods in the above embodiments, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the methods in the above embodiments.

[0070] Based on the methods in the above embodiments, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the methods in the above embodiments.

[0071] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0072] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0073] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0074] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A method for atomic dynamics Monte Carlo simulation of material irradiation damage, characterized in that: The method is applied to a computing device, the computing device is provided with a GPU, the computing device is used for atomic dynamics Monte Carlo simulation of material irradiation damage, the simulation area of ​​the material is divided into multiple subdomains, each of the subdomains corresponds to a GPU process, each of the subdomains is divided into several parts, each part is used as a sector, and the computing device stores an atomic information array of the material simulation area. The method includes: The GPU obtains the vacant position in the surface area of ​​the current sector and the related adjacent positions of the vacant position based on the atomic information array; the adjacent positions include the first nearest neighbor and the second nearest neighbor; wherein, the obtaining of the vacant position in the surface area of ​​the current sector and the related adjacent positions of the vacant position comprises: obtaining the atomic information of the current sector in the atomic information array, determining the vacant position in the atomic information, and determining the vacant position prefetch array based on the vacant position in the atomic information; traversing the vacant position prefetch array, obtaining the local ID of each vacant position, and determining the local coordinates corresponding to the vacant position according to the local ID; obtaining the related adjacent positions of the current vacant position based on the local ID of the vacant position in the current sector; the vacant position prefetch array stores a vacant position structure, and the vacant position structure is in the form of a local ID, a transition rate, and a valid position; Based on the vacant position and the related adjacent position, determine the transition rate of the vacant position in the current sector; simultaneously obtain the pre-fetched vacant position of the next sector and the related adjacent position of the pre-fetched vacant position; the pre-fetched vacant position is neither in the surface area nor in the ghost area; based on the vacant position and the related adjacent position, determine the transition rate of the vacant position in the current sector, including: the GPU is responsible for the calculation of one vacant position through one thread, and the number of threads is the same as the number of vacant positions in the current sector; the current vacant position and the first neighbor related to the current vacant position are exchanged in turn, the system energy after the exchange position is calculated, and the position is exchanged back; according to the system energy before and after the exchange position, the transition rate of each first neighbor direction is determined; Based on the transition rate, determining and executing an event to update the ghost area; the execution event refers to exchanging the current empty position with the first neighbor position; When the accumulated time of the execution event is greater than the sector communication threshold, the current process synchronizes the update in the ghost area to the neighbor process, and simultaneously obtains the vacant space of the next sector surface area, and calculates the transition rate of the next sector based on the vacant space of the next sector surface area and the pre-fetched space.

2. The method according to claim 1, characterized in that The determining and executing an event based on the transition rate comprises: Generate a first random number, where the first random number is between 0 and 1; Determining an expected rate based on the first random number and the transition rate; An execution event is determined based on the accumulated sum of the transition rates in each first neighboring direction and the expected rate; the execution event represents a transition toward the first neighboring direction where the accumulated sum is greater than the expected rate.

3. The method according to claim 2, characterized in that The cumulative time calculation of the execution event includes: Generate a second random number, where the second random number is between 0 and 1; Events are executed, and time increments are determined based on a rate at which the events occur and the second random number.

4. The method according to claim 1, characterized in that: After the current process synchronizes the updates in the ghost area to the neighbor process, the method further includes: communicating the modified portion of the surface area during the execution of the event to the neighbor process as well.

5. The method according to claim 1, characterized in that The current process synchronizes updates in the ghost area to neighbor processes via a message passing interface.

6. A material irradiation damage atomic dynamics Monte Carlo simulation device, characterized in that: Deployed on a computing device, the computing device is provided with a GPU, the computing device is used for atomic dynamics Monte Carlo simulation of material irradiation damage, the simulation area of ​​the material is divided into multiple subdomains, each of the subdomains corresponds to a GPU process, each of the subdomains is divided into several parts, each part is a sector, the computing device stores the atomic information array of the material simulation area, the device includes: An acquisition module is used to acquire the vacant position in the surface area of ​​the current sector, and the related adjacent positions of the vacant position; the adjacent positions include the first nearest neighbor and the second nearest neighbor; wherein, the acquisition of the vacant position in the surface area of ​​the current sector, and the related adjacent positions of the vacant position, comprises: acquiring the atomic information of the current sector in the atomic information array, determining the vacant position in the atomic information, and determining the vacant position pre-fetch array based on the vacant position in the atomic information; traversing the vacant position pre-fetch array, acquiring the local ID of each vacant position, and determining the local coordinates corresponding to the vacant position according to the local ID; acquiring the related adjacent positions of the current vacant position based on the local ID of the vacant position in the current sector; the vacant position pre-fetch array stores a vacancy structure, and the vacancy structure is in the form of a local ID, a transition rate, and a valid position; A processing module, used to determine the transition rate of the vacant position in the current sector based on the vacant position and the related adjacent positions; the determining the transition rate of the vacant position in the current sector based on the vacant position and the related adjacent positions, including: the GPU is responsible for the calculation of one vacant position through one thread, and the number of threads is the same as the number of vacant positions in the current sector; the current vacant position and the first nearest neighbor related to the current vacant position are exchanged in sequence, the system energy after the exchanged position is calculated, and the position is exchanged back; according to the system energy before and after the exchanged position, the transition rate of each first nearest neighbor direction is determined; The acquisition module is further used to simultaneously acquire a pre-fetched space of the next sector and a related adjacent position of the pre-fetched space; the pre-fetched space is neither in the surface area nor in the ghost area; The processing module is further used to determine and execute an event based on the transition rate to update the ghost area; the execution event refers to the current empty position being exchanged with the first neighbor position; The processing module is also used for synchronizing the updates in the ghost area to the neighbor process in the current process when the accumulated time of the execution event is greater than the sector communication threshold, and obtaining the vacant space in the surface area of ​​the next sector at the same time, and calculating the transition rate of the next sector based on the vacant space in the surface area of ​​the next sector and the pre-fetched space.

Citation Information

Patent Citations

  • Multi-GPU molecular dynamics simulation method for structural material radiation damage

    CN105787227A

  • Communication optimization method and system for dynamic Monte Carlo parallel simulation

    CN107239352A