An astronomical cross-certification method for heterogeneous many-core processors
By employing a multi-node data allocation strategy based on declination and right ascension on heterogeneous many-core processors, combined with streaming computing and multi-threaded parallelism, the problem of cross-grid boundary verification in the cross-verification of large-scale star catalog data was solved, achieving more efficient computing performance and resource utilization.
Patent Information
- Application Number
- CN202410707860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Existing astronomical cross-verification systems suffer from cross-grid verification issues when processing large-scale star catalog data, leading to data redundancy and wasted computing resources, making it difficult to perform cross-verification efficiently on heterogeneous many-core processors.
A multi-node data allocation strategy based on declination and right ascension is adopted, combined with the computing power of heterogeneous many-core processors, and data rearrangement and task allocation are optimized through streaming computing and multi-threaded parallelism to reduce data redundancy and improve the efficiency of authentication calculation.
While ensuring computational accuracy, the parallelism of the astronomical cross-verification algorithm and the utilization efficiency of heterogeneous many-core processors were improved, data redundancy and memory access time were reduced, and computational performance was enhanced.
Smart Images

Figure CN118672772B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of high-performance computing technology in astronomy and computer science, and in particular to an astronomical cross-identification method for heterogeneous many-core processors. BACKGROUND
[0002] In the era of computing power assisting scientific research, high-performance computing technology plays an important role in many fields. As the basis for a series of astronomical research, the cross-identification of astronomical catalogs requires large-scale computing resources to achieve an efficient identification process.
[0003] The existing astronomical cross-identification system maps the data to the grid divided on the celestial sphere according to the right ascension and declination of the astronomical data, limits the identification calculation to the grid, avoids the cyclic identification of the entire catalog, and accelerates the cross-identification process on homogeneous or heterogeneous computer clusters. One problem with dividing the grid is that data at the grid boundary may have cross-grid identification. In existing systems, either the data that may have cross-grid identification is redundantly mapped to the corresponding grid through data redundancy, or inter-grid identification is introduced.
[0004] Currently, astronomical telescopes and sky survey projects generate increasingly large amounts of data, and the number of catalogs constructed gradually increases. The entries of a catalog can reach the order of billions. The cross-identification of a catalog of this size requires more memory and computing power than the existing astronomical cross-identification system can provide. To achieve cross-identification within a specified time, high-performance computing technology needs to be improved in terms of algorithms and computing power.
[0005] A general-purpose graphics processing unit (GPGPU) is a heterogeneous many-core processor with a widely used many-core architecture. It has strong computing power and stable computing power improvement speed. A computing cluster composed of nodes of a heterogeneous many-core processor can be widely used to process various general-purpose computing tasks and is expected to effectively improve the computing power of large-scale data. Therefore, on a computing cluster of a heterogeneous many-core processor, how to design a data processing strategy to better utilize the performance of CPU cores, reduce data redundancy caused by solving the problem of missing sources, improve the data memory efficiency of identification calculation on a heterogeneous many-core processor, and thus improve the performance of the astronomical cross-identification algorithm, is a technical problem that needs to be solved. SUMMARY
[0006] The purpose of the present application is to provide an astronomical cross-identification method for a heterogeneous many-core processor that solves the above technical problems.
[0007] To this end, the technical solution of the present application is as follows:
[0008] An astronomical cross-identification method for a heterogeneous many-core processor, the steps are as follows:
[0009] S1, for the star catalog A and the star catalog B to be identified, respectively according to the star catalog data of each star catalog, obtain the strip id based on declination and the multi-node data distribution in strip units;
[0010] S2, determine the number of heterogeneous many-core processors of each computing node, and the maximum number of threads that can be simultaneously run by each heterogeneous many-core processor;
[0011] S3, in strip units, rearrange the star catalog data within each strip, and divide it into a grid based on right ascension;
[0012] S4, determine whether the right ascension span of each strip is too large when internally identified, if the right ascension span of the strip is too large, execute the identification mode of step S5, if the strip does not exist right ascension span is too large, execute the identification mode of step S6;
[0013] S5, the CPU end adopts the multi-thread parallel mode to execute the individual identification calculation of the celestial body in the strip;
[0014] S6, according to the number and computing capacity of the heterogeneous many-core processor, the task is allocated in strip units, and the identification data is transmitted to the heterogeneous many-core processor in a streaming calculation mode, and the individual identification calculation of the celestial body in the grid is executed;
[0015] S7, in the identification results calculated by step S5 or step S6, select the three calculation results corresponding to the three stars with the smallest spherical distance d≤error radius r and spherical distance d as the identification selected results of the current star, and record the subscripts of the three stars;
[0016] S8, the subscript of the three stars recorded by step S7 is transmitted back to the CPU, and the CPU converts the subscript to obtain the ID of the three stars in the star catalog A and the star catalog B respectively.
[0017] Further, the specific implementation steps of step S1 are:
[0018] S101, set the strip height h to calculate the zone of each star id ,zone id = Dec / h, where Dec is the declination of the star;
[0019] S102, according to the calculation result of step S101, rearrange the star catalog data in the order of strip zone id ;
[0020] S103, set error radius r, calculate whether the bands calculated by the above step S101 are the same as the bands calculated by the declination Dec when the declination of each star is Dec+r and Dec-r: 1) if they are the same, no need to perform source complement; 2) if any of them is different, the original star data needs to be added to the different bands at the same time;
[0021] S104, determine the total number N of nodes participating in the calculation in the heterogeneous many-core processor, and obtain each band zone id based on the load balancing processing based on zone id and N. id ;
[0022] S105, according to the allocation result of step S104, pack and send all bands to each computing node respectively.
[0023] Further, in step S2, the computing capacity of each heterogeneous many-core processor is the maximum number of threads thread max that can be run at the same time, and the calculation formula is:
[0024] thread max =num CU ×num SIMD ×num wavefront ×X,
[0025] where num CU is the number of computing units in each heterogeneous many-core processor, num SIMD is the number of SIMDs in each computing unit, num wavefront is the number of vector computing units, and X is the size of the vector computing unit.
[0026] Further, the specific processing steps of step S3 are:
[0027] S301, at the CPU end, allocate a thread to each band to perform parallel processing on multiple bands in the same computing node;
[0028] S302, for the star catalog data in a single band, calculate the grid Grid id to which each star belongs according to the right ascension Ra of each star, and the calculation formula is:
[0029] Grid id = Ra / h;
[0030] S303, according to the calculation result of step S303, rearrange the star catalog data in each band in the order of grid Grid id sorting.
[0031] Further, in step S4, the method for determining whether the strip has too large a span in right ascension when being internally identified is:
[0032] S401, define the length L=h of the strip internal grid in the right ascension direction, and the span in the right ascension direction is
[0033] S402, determine according to the definition method of step S401:
[0034] When , it is determined that the strip has too large a span in right ascension when being internally identified;
[0035] When , it is determined that the strip does not have too large a span in right ascension when being internally identified.
[0036] Further, the specific implementation steps of step S6 are:
[0037] S601, according to the number n dcu of heterogeneous many-core processors and the computing power, divide the data of all strips that need to be calculated into the heterogeneous many-core processors one by one to balance the computing time of each processor;
[0038] S602, for each heterogeneous many-core processor, set the next subtask to be in the state of being transmitted to the heterogeneous many-core processor when the heterogeneous many-core processor performs identification calculation on the star table data in the current subtask;
[0039] S603, each heterogeneous many-core processor allocates data of one grid in the strip to each thread thereof when performing identification calculation;
[0040] S604, each thread thread id is responsible for performing identification calculation on the data of the grid Grid id and the two adjacent grids before and after it in the star table A and the star table B.
[0041] Further, the data division method of step S601 is:
[0042] S6011, determine the computing amount Cost i of each strip, the sum Cost sum of the computing amounts of all strips, the number num c of strips, the computing power S j of each heterogeneous many-core processor, the sum S sum of the computing powers of all heterogeneous many-core processors, and the number n dcu of heterogeneous many-core processors; wherein the computing amount Cost iis the sum of the calculation amount of all grids inside the strip; any grid Grid id The calculation amount of is m*n, m is the data amount of star table A in grid Grid id , n is the data amount of star table B in grid Grid id ; S j = thread max ;
[0043] S6012, according to the computing capacity S j of each heterogeneous many-core processor, the strips are assigned from high to low until the condition is first met:
[0044]
[0045] In the formula, start and end are the serial numbers of the first strip and the last strip in the plurality of strips assigned to the heterogeneous many-core processor, respectively;
[0046] S6013, for the plurality of strips assigned to any heterogeneous many-core processor, according to the computing capacity S j of the heterogeneous many-core processor, the computing task is further divided into subtasks in the smallest unit of strip, specifically:
[0047] 1) Determine the number of grids G i inside each strip, the processor computing capacity is S j , the number of strips is num c1 , and the strips are added to the current subtask one by one, and the following is ensured:
[0048]
[0049] In the formula, start and end are used to represent the range of strips assigned to a certain subtask, start is the serial number of the first strip, and end is the serial number of the last strip, from 0 to num c1 is added one by one;
[0050] 2) The same way as step 1) is used to assign the next subtask to the remaining unassigned strips, and the same is done in turn until the subtask assignment of all strips is completed.
[0051] Compared with the prior art, the astronomical cross-identification method for the heterogeneous many-core processor can ensure the calculation accuracy and integrity, improve the parallelism of the cross-identification algorithm and the use efficiency of the heterogeneous many-core processor, and improve the overall computing performance of the astronomical cross-identification. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 is a flowchart of the astronomical cross-identification method for the heterogeneous many-core processor of the present application. Detailed Implementation
[0053] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention.
[0054] See Figure 1 The specific implementation steps of this astronomical cross-verification method for heterogeneous many-core processors are as follows:
[0055] S1. For star catalog A and star catalog B to be verified, obtain the strip ID based on declination and the multi-node data allocation method based on strips, respectively, according to the star catalog data of each star catalog.
[0056] For each star catalog to be verified, the star catalog contains a large amount of star data, which is specifically composed of data of several stars; in this application, the data of each star needs to use the star's ID in the star catalog, as well as the star's declination and right ascension.
[0057] In step S1, the specific processing steps for each star identification table to be verified are as follows:
[0058] S101. Set the band height h to calculate the band to which each celestial body belongs. id ;
[0059] Among them, the strip zone id The specific calculation formula is as follows:
[0060] zone id =Dec / h,
[0061] In the formula, Dec is the declination of the celestial body; in this embodiment, h is set to 1 / 60;
[0062] S102. Based on the calculation results of step S101, according to the zone... id The star catalog data is rearranged using a sequential sorting method, meaning that data with the same declination belong to the same zone. id The stars are arranged together;
[0063] S103. Set the error radius r, and calculate whether the bands obtained by the above step S101 are the same as the bands obtained by the declination Dec when the declination of each star is Dec+r and Dec-r.
[0064] 1) If the stripe calculated based on Dec+r or Dec-r is the same as the original stripe, then there is no need to perform leak source supplementation;
[0065] 2) If any of the strips calculated based on Dec+r or Dec-r are different, then source leakage supplementation is required. The source leakage supplementation method is to add the original star data (i.e. ID, Dec and Ra) to the different strips at the same time to solve the source leakage problem in the declination direction.
[0066] In this embodiment, the error radius r is calculated according to the following formula: The calculation shows that R_A and R_B are the precisions of star catalog A and star catalog B, respectively, with a specific value of 0.001388889 / 5.
[0067] S104. Determine the total number N of nodes participating in computation in the heterogeneous many-core processor, based on zone... id Load balancing with N yields each stripe zone. id Corresponding computing node Node id Its expression is:
[0068] Node id =zone id %N;
[0069] S105. Based on the allocation results of step S104, all stripes are packaged and sent to each computing node.
[0070] S2. Determine the number of heterogeneous many-core processors on each computing node, and the maximum number of threads that each heterogeneous many-core processor can run simultaneously;
[0071] The specific processing steps for step S2 are as follows:
[0072] S201. Determine each computing node. id The number of internal heterogeneous many-core processors n dcu
[0073] S202. Determine the computing power of each heterogeneous many-core processor (DCU) to obtain the maximum number of threads that can run simultaneously. max The calculation formula is as follows:
[0074] thread max =num CU ×num SIMD ×num wavefront ×X,
[0075] In the formula, num CU The number of compute units (CUs) in each heterogeneous many-core processor, num SIMD The number of SIMDs in each computing unit, num wavefrontThe number of wavefronts is X, and X is the size of the wavefront, which is related to the model of the heterogeneous many-core processor. In this embodiment, the heterogeneous many-core processor uses the DCU developed by SKYSUN, and the value of X is 64.
[0076] S3, rearranging the star catalog data in each strip in units of strips, and dividing into grids based on right ascension;
[0077] The specific processing steps of this step S3 are:
[0078] S301, at the CPU end, a thread is allocated for each strip to perform parallel processing on multiple strips in the same computing node;
[0079] S302, for the star catalog data in a single strip, the grid Grid id to which each star belongs is calculated according to the right ascension Ra of each star.
[0080] Grid id = Ra / h;
[0081] S303, according to the calculation result of step S303, the star catalog data in each strip is rearranged in the order of grid Grid id , that is, the stars belonging to the same grid Grid id are arranged together based on the same right ascension.
[0082] S4, judging whether the right ascension span of each strip is too large during internal certification, and assigning an internal certification method according to the judgment result;
[0083] The specific judgment steps of this step S4 are:
[0084] S401, define the length L = h of the grid in the right ascension direction, and the span in the right ascension direction
[0085] S402, judge according to the definition method of step S401:
[0086] When , the span may exceed the adjacent grid, that is, the missing source problem cannot be solved in the heterogeneous many-core processor calculation, and it is determined that the right ascension span of the strip during internal certification is too large;
[0087] When , it indicates that the missing source problem only occurs between adjacent grids, and the same calculation process has good parallelism, and it is determined that there is no problem of too large right ascension span during internal certification of the strip;
[0088] S403. When the determination result of step S402 is that the right ascension span is too large, the star and bar data of the strip is stored in vector I, and the verification method of step S5 is subsequently executed; when the determination result of step S402 is that there is no right ascension span that is too large, the star and bar data of the strip is stored in vector II, and the step S6 is subsequently executed, that is, allocated to the heterogeneous many-core processor to accelerate the calculation.
[0089] S5. The CPU reads vector I and uses a multi-threaded parallel approach to perform the identification calculation of each celestial body within the strip. In this step, the specific calculation method for the data to be identified in the two star catalogs is a known calculation method.
[0090] S6. Based on the number and computing power of the heterogeneous many-core processors, tasks are allocated in stripes, and the data to be verified is transmitted to the heterogeneous many-core processors in a streaming computing manner, and the verification calculation of each celestial body within the strip is performed.
[0091] The specific judgment steps for step S6 are as follows:
[0092] S601, Based on the number n of heterogeneous many-core processors determined in step S2 dcu In terms of computing power, the data is divided into stripes that need to be fed into the heterogeneous many-core processor for computation, so as to balance the computation time of each processor.
[0093] Specifically, the data partitioning method in step S601 is as follows:
[0094] S6011. Determine the cost (Cost) for each stripe. i The sum of computational costs for all stripes: Cost sum Number of stripes (num) c And the computing power S of each heterogeneous many-core processor j (S j =thread max The sum of the computing power of all heterogeneous many-core processors, S sum The number of heterogeneous many-core processors n dcu ;
[0095] Among them, the computational cost of any one strip is Cost i This is the sum of the computational costs of all grids within the strip; any grid... id The computational cost is m×n, where m is the number of elements from star table A in the grid. id The amount of data in the grid, n is the number of data points in the star table B. id The amount of data contained therein (i.e., the number of celestial bodies it contains);
[0096] S6012, based on the computing power of each heterogeneous many-core processor S jAssign the strips from high to low until the first condition is met:
[0097]
[0098] In the formula, start and end are used to represent the range of strips assigned to a certain processor, start is the serial number of the first strip, and end is the serial number of the last strip, from 0 to num c Join the assignment one by one;
[0099] S6013, for the plurality of strips assigned to any heterogeneous many-core processor, according to the computing power S j (S j = thread max ), the computing task is further divided into sub-tasks with strips as the minimum unit;
[0100] Specifically, the specific way of sub-task division is:
[0101] 1) Determine the number of grids G i inside each strip, the processor computing power S j , the number of strips num c1 , add the strips one by one to the current sub-task, and ensure that:
[0102]
[0103] In the formula, start and end are used to represent the range of strips assigned to a certain processor, start is the serial number of the first strip, and end is the serial number of the last strip, from 0 to num c1 Join the assignment one by one;
[0104] 2) Use the same way as step 1) to assign the next sub-task to the remaining unassigned strips, and proceed in turn until the sub-task assignment of all strips is completed;
[0105] After the above steps 1) and 2), the computing task is divided into multiple sub-tasks, each sub-task corresponds to a heterogeneous many-core processor, and each sub-task contains at least one strip;
[0106] After the above step S601, while ensuring that the number of threads required for the operation of the sub-task does not exceed thread max , the maximum computing amount corresponding to the sub-task is realized;
[0107] S602, for each heterogeneous many-core processor, set the next subtask in a state of being transmitted to the heterogeneous many-core processor when the heterogeneous many-core processor performs the identification calculation on the star table data in the current subtask, so as to reduce the calculation time on the heterogeneous many-core processor by means of stream computing;
[0108] S603, each heterogeneous many-core processor allocates data of one grid in the strip to each thread of the heterogeneous many-core processor when performing the identification calculation, specifically: determining the number of threads thread id of the heterogeneous many-core processor, and the number of grids Grid id in the strip, and then allocating data of one grid Grid i to each thread thread id .
[0109] S604, each thread thread id performs the identification calculation on the data in the corresponding grid Grid id in the star table A and the star table B.
[0110] Specifically, the identification calculation method is: performing the identification calculation on the data in the grid Grid id in the star table A and the data in the grid Grid id in the star table B, and the data in the two adjacent grids (i.e. the identification data in the previous grid Grid id of the grid Grid id—1 and the identification data in the next grid Grid id of the grid Grid id+1 ); in this step, the specific calculation method of the identification data in the two star tables is a known calculation method. The advantage of this identification calculation method is that it can solve the problem of missing sources in the current grid in the right ascension direction;
[0111] S7, in the identification result calculated by step S5 or step S6, select three pairs of stars corresponding to the three smallest spherical distances d≤error radius r as the identification selected result, and record the subscripts of the three pairs of stars.
[0112] The calculation formula of the spherical distance d is:
[0113]
[0114] S8, return the subscript of the three pairs of stars recorded by step S7 to the CPU, and convert the subscript to obtain the ID of each pair of stars in the star table A and the star table B by the CPU.
[0115] In the actual identification process, the number ID of the celestial body in the star catalog will be read together. After reading the vector from the star catalog, there will be an index. The change before and after the index will be recorded during the data rearrangement process to ensure that the index can be converted back to its ID in the star catalog. Therefore, in this step, the CPU converts the ID of the three celestial bodies in the star catalog according to the index of the result.
[0116] In practical applications, the identification method of the present application has the following advantages compared with existing identification methods: 1) better performance of CPU multi-core, 2) reduction of data redundancy caused by solving the missing source problem, and 3) improvement of data access efficiency of identification calculation on heterogeneous many-core processors; Specifically,
[0117] In terms of CPU multi-core performance, the multi-node data distribution of step S1 of the present application ensures that data between strips will not conflict with rearrangement, allocates a thread to each strip, and there will be no data redundancy in the right ascension direction, which can ensure the efficiency of multi-core parallelism. In the data rearrangement of step S3 of the present application, due to the scattered distribution of data in the original scheme, multi-thread rearrangement will inevitably cause multiple threads to write data to the same grid, and multiple threads will simultaneously expand the memory space of different grids. When performing data redundancy operations, additional writing is required. Due to the fact that Vector in C++ STL is not thread-safe, locking will affect the efficiency of data rearrangement when multi-core parallelism is performed. In addition, in step S4 of the present application, based on whether the right ascension has a span that is too large in the identification process, the identification calculation of the data is divided into two forms. When transmitting data to the heterogeneous many-core processor, the CPU does not perform calculation, and the multi-core CPU can completely perform single-thread data transmission, and other threads perform calculation. At the same time, the strips that are not suitable for calculation on the heterogeneous many-core processor are stored separately. While the heterogeneous many-core processor is calculating, the CPU performs identification calculation on these strips through multi-core parallelism.
[0118] In reducing data redundancy caused by the missing source problem, firstly, the missing source problem is caused by the division. If the cross identification of the star catalog is to be optimized, that is, the sky is divided into small grids, and the identification process is limited within the grid. Since the range of celestial body identification is a spherical surface with the celestial body as the center and the error radius as the radius, the celestial bodies on the boundary of the grid will inevitably be identified with the grid outside the boundary, thus causing the missing source problem. Therefore, only by redundantly arranging the celestial bodies that may cause this problem in other possible grids can the problem be solved. However, the more the number of divided grids, the more serious the missing source problem, and the more data redundancy is needed. The HEALPix division is approximately a rhombus division, and the redundancy needs to be considered in the right ascension and declination directions and perpendicular to the grid boundary. In the present application, the multi-node data distribution of step S1 makes the data only need to be redundant in the declination direction, and the number of strips divided by the method is much smaller than the number of grids divided by HEALPix, so the data redundancy is obviously less. Although the present application does not need to be redundant in the declination direction, the present application solves the missing source problem in the right ascension direction by data reuse between threads on the heterogeneous many-core processor.
[0119] In improving the data access efficiency of the authentication calculation on the heterogeneous many-core processor, it is specifically for the existing two cross-authentication schemes based on the heterogeneous many-core processor. Specifically, the first authentication scheme is cross-authentication without data redundancy. Threads need to calculate the sky objects for cross-authentication, and then perform authentication. The second authentication scheme is cross-authentication with data redundancy. Threads do not need any additional calculation. The corresponding grid contains all possible authentication data of the sky objects, because each sky object data is redundantly stored in all possible authentication grids. For the first authentication scheme, the data transmitted to the heterogeneous many-core processor is distributed in the memory according to the grid in one dimension, which means that the possible authentication grids in the memory are not adjacent, and often span a data amount of a strip. In a star catalog with a data amount of 1 billion, even if the data is divided into 180*60 strips, each strip has nearly 100,000 data. This high-frequency, long-distance memory interval access will cause serious performance problems compared with continuous memory access. For the second authentication scheme, on the one hand, it avoids long-distance memory interval access, because the possible authentication of the sky objects occurs within the grid, and the data within the grid is stored continuously in the memory. On the other hand, it reduces the amount of calculation during authentication, because each sky object does not authenticate with other sky objects that are not redundantly stored in the grid. In the method of the present application, considering the computing characteristics on the heterogeneous many-core processor, the data transmission to the heterogeneous many-core processor occupies 52% of the actual application time, and the computing time is divided into data access from the display memory to the processor and floating point unit calculation, which only accounts for 10%. This means that the floating point unit calculation time is much less than the data transmission and the data access from the display memory to the processor. Therefore, the data rearrangement strategy of the present application reduces the data redundancy and the amount of data transmission and access, while utilizing the data reuse between adjacent threads to increase the computing time of part of the floating point unit at the cost of reducing the occupation of the cache near the processor by the redundant data in the right ascension direction, so that the same size cache can be provided for more threads, reducing the cache contention of the threads in the running process when the data amount of the grid corresponding to the thread is too large, thereby improving the data access efficiency on the heterogeneous many-core processor.
[0120] To further prove the superiority of the astronomical cross-authentication method for the heterogeneous many-core processor of the present application over the existing authentication scheme, the following comparison experiments are used to prove it.
[0121] Specifically, the comparison experiments are verified on the Dawning computing cluster, and the authentication experimental results of the first 100 million data in the psc_all data set are compared to ensure that the comparison experiments are performed in a consistent experimental environment. For example,Figure 1 As shown, the technical features between the mgrid experiment and the mgrid3 experiment are different in the following aspects Figure 1 In the blue box part of the steps, specifically, the mgrid experiment corresponding to the prior art makes data redundancy in the right ascension and declination directions to solve the missing source problem; and the mgrid3 experiment corresponding to the present application uses data multiplexing to optimize cross identification, so when dividing the strip, only data redundancy is made in the declination direction.
[0122] The specific experimental results of the two experiments are shown in Table 1 as follows:
[0123]
[0124] From the test results in Table 1, it can be seen that, in terms of the running time of identification operation, the identification method of the present application in the mgrid3 experiment part has obvious advantages compared with the existing scheme corresponding to the mgrid experiment part; specifically, the efficiency of the data rearrangement part of the present application is significantly improved, and the calculation on the GPU is increased by nearly three times the calculation and memory access amount; it can be seen that using the method of the present application can optimize the data memory access on the GPU, and the running time is only increased by about one third.
Claims
1. A cross-validation method for astronomical systems targeting heterogeneous many-core processors, characterized in that, The steps are as follows: S1. For star catalog A and star catalog B to be verified, obtain the strip ID based on declination and the multi-node data allocation in strip units based on the star catalog data of each star catalog. S2. Determine the number of heterogeneous many-core processors on each computing node, and the maximum number of threads that each heterogeneous many-core processor can run simultaneously; S3. Rearrange the star catalog data within each strip, and divide it into grids based on right ascension; S4. Determine whether the right ascension span of each band is too large during internal verification. If the right ascension span of the band is too large, then execute the verification method in step S5. If the right ascension span of the band is not too large, then execute the verification method in step S6. S5, the CPU uses a multi-threaded parallel approach to perform the verification calculations for each celestial body within the stripe; S6. Based on the number and computing power of heterogeneous many-core processors, tasks are allocated in stripes, and the data to be verified is transmitted to the heterogeneous many-core processors in a streaming computing manner, and the verification calculation of celestial bodies within the grid is performed one by one. S7. Among the verification results calculated by step S5 or step S6, select the three celestial bodies corresponding to the three calculation results with the smallest spherical distance d ≤ error radius r and the smallest spherical distance d as the current verification selection results of the celestial bodies, and record the subscripts of the three celestial bodies; S8. The indices of the three celestial bodies recorded in step S7 are returned to the CPU. The CPU converts the indices to obtain the IDs of the three celestial bodies in star table A and star table B respectively.
2. The astronomical cross-verification method for heterogeneous many-core processors according to claim 1, characterized in that, The specific implementation steps of step S1 are as follows: S101. Set the band height h to calculate the band to which each celestial body belongs. id zone id = Dec / h, where Dec is the declination of the celestial body; S102. Based on the calculation results of step S101, according to the zone... id The star catalog data is rearranged using a sequential sorting method; S103. Set the error radius r, and calculate whether the bands obtained by the above step S101 are the same as the bands obtained by the declination Dec when the declination of each star is Dec+r and Dec-r: 1) If they are the same, there is no need to supplement the missing source; 2) If any of them are different, the original star data of the three stars need to be added to different bands at the same time. S104. Determine the total number N of nodes participating in computation in the heterogeneous many-core processor, based on zone... id Load balancing with N yields each stripe zone. id Corresponding computing node Node id ; S105. Based on the allocation results of step S104, all stripes are packaged and sent to each computing node.
3. The astronomical cross-verification method for heterogeneous many-core processors according to claim 1, characterized in that, In step S2, the computing power of each heterogeneous many-core processor is the maximum number of threads that can run simultaneously. max The calculation formula is as follows: thread max =num CU ×num SIMD ×num wavefront ×X, In the formula, num CU The number of computing units in each heterogeneous many-core processor, num SIMD The number of SIMDs in each computational unit, num wavefront X represents the number of vector computation units, and X represents the size of the vector computation units.
4. The astronomical cross-verification method for heterogeneous many-core processors according to claim 1, characterized in that, The specific processing steps of step S3 are as follows: S301. On the CPU side, allocate one thread for each stripe to process multiple stripes in parallel within the same compute node; S302. For star catalog data within a single strip, calculate the grid to which each star belongs based on its right ascension Ra. id The calculation formula is as follows: Grid id =Ra / h; S303. Based on the calculation results of step S303, according to the grid... id The star catalog data within each strip is rearranged using a sequential sorting method.
5. The astronomical cross-verification method for heterogeneous many-core processors according to claim 1, characterized in that, In step S4, the method for determining whether the right ascension span is too large during internal verification of the strip is as follows: S401. Define the length L = h of the internal grid of the strip along the right ascension direction, and the span along the right ascension direction as... S402. Make a judgment based on the definition in step S401: when If so, it is determined that the right ascension span of the band is too large during internal verification; when If so, it is determined that the band does not have an excessively large right ascension span during internal verification.
6. The astronomical cross-verification method for heterogeneous many-core processors according to claim 1, characterized in that, The specific implementation steps of step S6 are as follows: S601, based on the number n of heterogeneous many-core processors dcu In terms of computing power, the data is divided into stripes that need to be fed into the heterogeneous many-core processor for computation, so as to balance the computation time of each processor. S602. For each heterogeneous many-core processor, when the heterogeneous many-core processor performs authentication calculation on the star table data in the current subtask, the next subtask is in the state of transmitting to the heterogeneous many-core processor. S603. When performing authentication calculations, each heterogeneous many-core processor allocates data from one grid in a stripe to each of its threads. S604, each thread id Responsible for the grids in star catalog A and star catalog B id The data from the two adjacent grids are used for verification calculations.
7. The astronomical cross-verification method for heterogeneous many-core processors according to claim 6, characterized in that, The data partitioning method in step S601 is as follows: S6011. Determine the cost (Cost) for each stripe. i The sum of computational costs for all stripes: Cost sum Number of stripes (num) c And the computing power S of each heterogeneous many-core processor j The sum of the computing power of all heterogeneous many-core processors, S sum The number of heterogeneous many-core processors n dcu Among them, the computational cost of any one band is Cost. i This is the sum of the computational costs of all grids within the strip; any grid... id The computational cost is m×n, where m is the number of elements from star table A in the grid. id The amount of data in the grid, n is the number of data points in the star table B. id The amount of data in S; j =thread max ; S6012, based on the computing power of each heterogeneous many-core processor S j Distribute strips from high to low until the condition is met for the first time: In the formula, start and end are the sequence numbers of the first and last stripes among the multiple stripes allocated to the heterogeneous many-core processor, respectively; S6013. For multiple stripes allocated to any heterogeneous many-core processor, based on the computing power S of the heterogeneous many-core processor... j The computational task is further divided into subtasks, with stripes as the smallest unit, as follows: 1) Determine the number of grid cells G within each strip. i The processor's computing power is S j The number of stripes is num c1 Add stripes one by one to the current subtask, ensuring that: In the formula, start and end represent the range of stripes assigned to a specific subtask. start is the index of the first stripe, and end is the index of the last stripe, ranging from 0 to num. c1 Add them to the allocation one by one; 2) Using the same method as in step 1), assign the next subtask to the remaining unassigned stripes, and so on, until all stripes have been assigned subtasks.
Citation Information
Patent Citations
Parallel astronomical cross identification method
CN102768675A
Proximal point query method and query apparatus
CN107402983A