Parallel control method in coupling mode construction of independent I / O process mode

CN122132156BActive Publication Date: 2026-09-11NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610003981.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-09-11
Estimated Expiration
2046-01-05

AI Technical Summary

Technical Problem

[0005]本申请旨在提出一种独立I/O进程模式在耦合模式构建中的并行控制方法,能够有效解决计算进程和I/O进程执行过程不一致带来的并行控制问题,提高并行控制效率

Benefits of technology

本方法通过对包含本分量模式和其他分量模式的目标耦合模式,创建本分量模式通信域和本分量模式与其他分量模式联合通信域;将本分量模式通信域中的通信组划分为计算进程通信组和I/O进程通信组;若判断当前进程为I/O进程通信组中的进程,则通过本分量模式通信域接收计算进程通信组中的输出数据并写入文件,直到接收完输出数据后结束本分量模式;若判断当前进程为计算进程通信组中的进程,则构建第一目标通信域和第二目标通信域,基于第一目标通信域和第二目标通信域进行耦合数据交互和时间积分,直到满足预设条件后注销第一目标通信域和第二目标通信域,并结束本分量模式。如此,通过将本分量模式通信域中的通信组划分为并行控制的计算进程通信组和I/O进程通信组,并判断当前进程是I/O进程通信组还是计算进程通信组中的进程,以采用不同方式进行不同数据的交互,既能够保持数值模式采用异步I/O进程带来的计算性能优化效果,又能够有效解决计算进程和I/O进程执行过程不一致带来的并行控制问题,提高并行控制效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132156B_ABST
    Figure CN122132156B_ABST
Patent Text Reader

Abstract

The application discloses a parallel control method of an independent I / O process mode in a coupling mode construction, which divides a communication group in a component mode communication domain into a calculation process communication group and an I / O process communication group; if it is judged that a current process is a process in the I / O process communication group, output data in the calculation process communication group is received through the component mode communication domain and written into a file until the output data is completely received and the component mode is ended; if it is judged that the current process is a process in the calculation process communication group, a first target communication domain and a second target communication domain are constructed, coupling data interaction and time integration are carried out based on the first target communication domain and the second target communication domain, and the first target communication domain and the second target communication domain are logged off until a preset condition is met and the component mode is ended. The application can effectively solve the parallel control problem caused by inconsistency between calculation process and independent I / O process execution processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Earth system science and technology, and in particular to a parallel control method for independent I / O process mode in coupled mode construction. Background Technology

[0002] As the resolution of numerical models increases, the slow speed of writing output data to files has gradually become the biggest bottleneck hindering the model's operation. To improve the computational efficiency of numerical models, researchers have proposed using independent asynchronous I / O (i.e., input / output) processes to handle the output file writing problem separately. A representative model is the MaCOM model developed by the China National Marine Environmental Forecasting Center.

[0003] Current methods involve registering component pattern information and performing data interaction on independent I / O processes. However, this approach faces several risks in practical implementation: First, the data structures of independent I / O processes often have unique characteristics, such as zero grid count and zero corresponding variable entities. It is unknown whether the coupler used supports these special cases. Second, the control logic of independent I / O processes is completely different from that of computation processes. Ensuring that the I / O processes are also synchronizing data exchange when the computation processes are performing data exchange operations is very difficult. Synchronizing data exchange too early or too late can easily lead to program deadlock or communication matching failure. Third, even if the I / O processes can synchronize data exchange at appropriate times, if the file writing time exceeds the computation time between two data exchange intervals, the data synchronization of the computation process will be affected by the I / O process's file writing, which will reduce the computational performance optimization brought by asynchronous I / O.

[0004] Therefore, existing technical solutions cannot effectively solve the parallel control problem caused by the inconsistency between the execution processes of computing and I / O processes. Summary of the Invention

[0005] This application aims to propose a parallel control method for independent I / O process mode in coupled mode construction, which can effectively solve the parallel control problem caused by the inconsistency between the execution processes of computing processes and I / O processes, and improve the parallel control efficiency.

[0006] In a first aspect, embodiments of this application provide a parallel control method for independent I / O process mode in coupled mode construction, the method comprising: For a target coupling mode that includes this component mode and other component modes, create a communication domain for this component mode and a joint communication domain for this component mode and other component modes; The communication groups in the component mode communication domain are divided into a computing process communication group and an I / O process communication group. If the current process is determined to be a process in the I / O process communication group, then the output data in the computing process communication group is received through the communication domain of this component mode and written to a file, until the output data is received and then the component mode ends. If the current process is determined to be a process in the computing process communication group, a first target communication domain and a second target communication domain are constructed. Coupled data interaction and time integration are performed based on the first target communication domain and the second target communication domain until a preset condition is met, at which point the first target communication domain and the second target communication domain are deregistered, and this component mode ends.

[0007] Compared with the prior art, the first aspect of this application has the following beneficial effects: This method creates a communication domain for this component mode and a joint communication domain for this component mode and other component modes by considering a target coupling mode that includes this component mode and other component modes. The communication groups within this component mode communication domain are divided into a computation process communication group and an I / O process communication group. If the current process is determined to be a process in the I / O process communication group, output data from the computation process communication group is received through this component mode communication domain and written to a file until all output data is received, at which point this component mode ends. If the current process is determined to be a process in the computation process communication group, a first target communication domain and a second target communication domain are constructed. Coupled data interaction and time integration are performed based on the first target communication domain and the second target communication domain until preset conditions are met, at which point the first target communication domain and the second target communication domain are deregistered, and this component mode ends. Thus, by dividing the communication group in this component mode communication domain into a parallel control computing process communication group and an I / O process communication group, and determining whether the current process is in the I / O process communication group or the computing process communication group, different methods can be used to interact with different data. This can maintain the computing performance optimization effect brought by the asynchronous I / O process in the numerical mode, and effectively solve the parallel control problem caused by the inconsistency between the execution processes of the computing process and the I / O process, thereby improving the parallel control efficiency.

[0008] In some implementations, the creation of the current component mode communication domain and the joint communication domain of the current component mode with other component modes includes: The communication domain of this component mode is created by calling the communication domain creation interface of the message passing interface, or by calling the communication domain creation interface provided by the coupler. Based on the communication domain of this component mode, a joint communication domain of this component mode and other component modes is created.

[0009] In some implementations, constructing the first target communication domain and the second target communication domain includes: Based on the computing process communication group, a computing process communication domain is generated; If the communication domain of this component mode is created by the communication domain creation interface of the message passing interface, then the computing process communication domain is taken as the first target communication domain. If the communication domain of this component mode is created by the communication domain creation interface provided by the coupler, then the communication domain creation interface provided by the coupler is called to declare the computing process communication domain as the first target communication domain; Based on the first target communication domain, a joint communication domain between the current component mode computing process and other component modes is created as the second target communication domain. The second communication domain is used for coupled data interaction between the current component mode and other component modes.

[0010] In some implementations, the step of performing coupled data interaction and time integration based on the first target communication domain and the second target communication domain, and deregistering the first target communication domain and the second target communication domain after a preset condition is met, includes: The first coupled data prepared in this component mode is sent to the other component modes through the second target communication domain; The second coupled data returned by the other component modes is received through the current component mode; In the first target communication domain, the second coupled data is processed to obtain the processed second coupled data; Based on the processed second coupling data, time integration is performed until the time integration reaches a preset threshold, at which point the first target communication domain and the second target communication domain are deregistered.

[0011] In some implementations, sending the first coupled data prepared in this component mode to the other component modes via the second target communication domain includes: Using non-blocking communication, the first coupled data prepared in this component mode is sent to the other component modes through the second target communication domain.

[0012] In some implementations, receiving the second coupling data returned by the other component modes through the current component mode includes: Using blocking communication, the second coupled data returned by other component modes is received through the current component mode.

[0013] In some embodiments, the step of processing the second coupled data to obtain processed second coupled data includes: The second coupled data is processed by unit unification and spatial unification to obtain the processed second coupled data.

[0014] Secondly, embodiments of this application also provide a parallel control system for independent I / O process mode in coupled mode construction, the system comprising: The first mode creation unit is used to create a communication domain for this component mode and a joint communication domain for this component mode and other component modes for a target coupling mode that includes this component mode and other component modes. A communication group partitioning unit is used to divide the communication groups in the component mode communication domain into a computing process communication group and an I / O process communication group. The I / O process control unit is used to receive output data from the computing process communication group and write it to a file through the component mode communication domain if it is determined that the current process is a process in the I / O process communication group, until the component mode ends after all the output data has been received. The computation process control unit is configured to, if it is determined that the current process is a process in the computation process communication group, construct a first target communication domain and a second target communication domain, perform coupled data interaction and time integration based on the first target communication domain and the second target communication domain, and then cancel the first target communication domain and the second target communication domain and end the current component mode after a preset condition is met.

[0015] Thirdly, embodiments of this application also provide an electronic device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to execute a parallel control method in a coupled mode construction of an independent I / O process mode as described above.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute a parallel control method in a coupled mode construction of an independent I / O process mode as described above.

[0017] It is understood that the beneficial effects of the second to fourth aspects compared with the related technologies are the same as the beneficial effects of the first aspect compared with the related technologies. Please refer to the relevant description in the first aspect above, which will not be repeated here. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart illustrating an embodiment of the parallel control method for the independent I / O process mode in coupled mode construction provided in this application; Figure 2 This is a schematic diagram of I / O process blocking computation process in the best embodiment of the parallel control method of independent I / O process mode in coupled mode construction provided in this application; Figure 3 This is a schematic diagram of the OA coupled mode communication domain in the best embodiment of the parallel control method for the independent I / O process mode in coupled mode construction provided in this application; Figure 4 This is a schematic diagram of the overall method flow in the best embodiment of the parallel control method in the construction of coupled mode for the independent I / O process mode provided in this application; Figure 5 This is a schematic diagram of the structure of an embodiment of the parallel control system in the coupled mode construction provided in this application, which features an independent I / O process mode. Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Detailed Implementation

[0019] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0020] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0021] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0022] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0023] To address the problem that existing technologies cannot effectively solve the parallel control issue caused by the inconsistency between the execution processes of computing and I / O processes, this application proposes a parallel control method for independent I / O process mode in coupled mode construction.

[0024] Reference Figure 1 This application provides a flowchart illustrating a parallel control method for an independent I / O process mode within a coupled mode construction. This parallel control method for an independent I / O process mode within a coupled mode construction is applied to an electronic device, which may be a server or a mobile terminal, etc. Figure 1 As shown, the parallel control method for this independent I / O process mode in coupled mode construction can include the following steps: Step S101: For a target coupling mode that includes this component mode and other component modes, create a communication domain for this component mode and a joint communication domain for this component mode and other component modes. Step S102: Divide the communication groups in this component mode communication domain into a computing process communication group and an I / O process communication group; Step S103: If it is determined that the current process is a process in the I / O process communication group, then the output data in the computing process communication group is received through the communication domain of this component mode and written to the file until the output data is received and then the component mode ends. Step S104: If the current process is determined to be a process in the computing process communication group, then construct the first target communication domain and the second target communication domain, perform coupled data interaction and time integration based on the first target communication domain and the second target communication domain, until the preset conditions are met, then cancel the first target communication domain and the second target communication domain, and end this component mode.

[0025] In this embodiment, a communication domain for this component mode and a joint communication domain for this component mode and other component modes are created by a target coupling mode that includes this component mode and other component modes. The communication groups in the communication domain of this component mode are divided into a computing process communication group and an I / O process communication group. If it is determined that the current process is a process in the I / O process communication group, the output data in the computing process communication group is received through the communication domain of this component mode and written to a file until the output data is received and the component mode ends. If it is determined that the current process is a process in the computing process communication group, a first target communication domain and a second target communication domain are constructed. Coupled data interaction and time integration are performed based on the first target communication domain and the second target communication domain until a preset condition is met, at which point the first target communication domain and the second target communication domain are deregistered and the component mode ends. Thus, by dividing the communication group in this component mode communication domain into a parallel control computing process communication group and an I / O process communication group, and determining whether the current process is in the I / O process communication group or the computing process communication group, different methods can be used to interact with different data. This can maintain the computing performance optimization effect brought by the asynchronous I / O process in the numerical mode, and effectively solve the parallel control problem caused by the inconsistency between the execution processes of the computing process and the I / O process, thereby improving the parallel control efficiency.

[0026] The aforementioned target coupling model includes this component model and other component models. For example, if the OA coupling model is taken as the target coupling model, the O model can be taken as the main component model, and the A model can be taken as other component models. Here, the O model can be an ocean model or an atmospheric model within the Earth system model, and the A model can be another model within the Earth system model.

[0027] In some implementations, creating a communication domain for this component mode and a joint communication domain for this component mode and other component modes includes: The communication domain of this component mode is created by calling the communication domain creation interface of the message passing interface, or by calling the communication domain creation interface provided by the coupler. Based on this component mode communication domain, create a joint communication domain for this component mode and other component modes.

[0028] In this embodiment, by creating a communication domain for this component mode and a joint communication domain for this component mode and other component modes, the parallel operation of each component mode can be better controlled.

[0029] In some implementations, constructing a first target communication domain and a second target communication domain includes: Based on the computing process communication group, a computing process communication domain is generated; If the communication domain of this component mode is created by the communication domain creation interface of the message passing interface, then the computing process communication domain will be used as the first target communication domain. If the communication domain of this component mode is created by the communication domain creation interface provided by the coupler, then the communication domain creation interface provided by the coupler is called to declare the computation process communication domain as the first target communication domain; Based on the first target communication domain, a joint communication domain between the computation process of this component mode and other component modes is created as the second target communication domain. The second communication domain is used for coupled data interaction between this component mode and other component modes.

[0030] In this embodiment, by constructing a first target communication domain and a second target communication domain, a good data foundation can be laid for coupled data interaction, and parallel control efficiency can be provided.

[0031] In some implementations, coupled data interaction and time integration are performed based on a first target communication domain and a second target communication domain, until a preset condition is met, at which point the first target communication domain and the second target communication domain are deregistered, including: The first coupled data prepared in this component mode is sent to other component modes through the second target communication domain; This component mode receives second coupled data returned by other component modes; In the first target communication domain, the second coupled data is processed to obtain the processed second coupled data; The time integral is calculated based on the processed second coupling data until the time integral reaches a preset threshold, at which point the first target communication domain and the second target communication domain are deregistered.

[0032] In this embodiment, the first coupled data prepared by this component mode is sent to other component modes through the second target communication domain; the second coupled data returned by other component modes is received through this component mode; in the first target communication domain, the second coupled data is processed to obtain processed second coupled data; time integration is performed based on the processed second coupled data until the time integral reaches a preset threshold, at which point the first and second target communication domains are deregistered. Thus, this component mode ends only when the time integral reaches the preset threshold, effectively solving the parallel control problem caused by the inconsistency between the execution processes of the computation process and the I / O process, and improving parallel control efficiency.

[0033] In some implementations, transmitting the first coupled data prepared in this component mode to other component modes via a second target communication domain includes: Using non-blocking communication, the first coupled data prepared in this component mode is sent to other component modes through the second target communication domain.

[0034] In this embodiment, non-blocking communication is used to send the first coupled data prepared in this component mode to other component modes through the second target communication domain, which can accelerate the execution of the program and improve the efficiency of data communication.

[0035] In some implementations, receiving second coupled data returned by other component modes through this component mode includes: Using blocking communication, the second coupled data returned by other component modes is received through this component mode.

[0036] In this embodiment, by employing blocking communication and receiving the second coupling data returned by other component modes through this component mode, the correctness of subsequent calculations can be ensured.

[0037] In some implementations, the second coupling data is processed to obtain processed second coupling data, including: The second coupled data is processed by unifying units and space to obtain the processed second coupled data.

[0038] In this embodiment, by performing unit and spatial unification processing on the second coupling data, they are transformed into data that can be directly used by the component mode, laying a good data foundation for subsequent time integration solutions, ensuring the correctness of subsequent calculations, and improving computational efficiency.

[0039] To facilitate understanding by those skilled in the art, a set of preferred embodiments is provided below: As the resolution of numerical models increases, the slow speed of writing output data to files has gradually become the biggest bottleneck hindering the model's operation. To improve the computational efficiency of numerical models, researchers have proposed using independent asynchronous I / O (i.e., input / output) processes to handle the output file writing problem separately. A representative model is the MaCOM model developed by the China National Marine Environmental Forecasting Center.

[0040] However, because this type of pattern employs an independent I / O process design, it presents new challenges to the construction of coupled patterns. While this approach achieves asynchronous I / O functionality and accelerates program execution, the inconsistency between the data processing flows of the I / O process and the computation process introduces parallel control difficulties.

[0041] A common coupler-based solution involves registering component mode information and performing data exchange on independent I / O processes. This is because the coupler doesn't concern itself with the complete consistency of instructions across the component modes; it only focuses on the consistency of operations related to the coupling interface. Therefore, theoretically, as long as the same coupling interface is called at the relevant location in the I / O process, even without actual execution, the coupler's synchronization requirements are met, and the coupling process can continue. However, this method faces several risks in practice: First, the data structures of independent I / O processes often have unique characteristics, such as a grid count of 0 and a corresponding variable entity count of 0. Whether the coupler supports these special cases is unknown. Second, the control logic of independent I / O processes is completely different from that of computation processes. Ensuring that the I / O processes are also performing data exchange synchronization while the computation processes are performing data exchange operations is very difficult. Premature or delayed data exchange synchronization can easily lead to program deadlock or communication matching failure. Third, even if the I / O process can synchronously exchange data at appropriate times, if the file writing time exceeds the computation time within the interval between two data exchanges, then the data synchronization of the computation process will be affected by the file writing by the I / O process. This will reduce the computational performance optimization brought about by asynchronous I / O, such as... Figure 2 As shown.

[0042] Through communication domain management technology, it is crucial to achieve efficient and smooth parallel operation of numerical models employing independent asynchronous I / O processes within coupled modes. Therefore, this embodiment proposes a parallel control method using independent asynchronous independent I / O process modes in coupled mode construction.

[0043] Taking the OA coupling pattern construction as an example (O represents the numerical pattern using independent asynchronous I / O processes, and A represents other numerical patterns that need to be coupled), normally, the coupler allocates only one independent communication domain for each component pattern, and data communication between component patterns is carried out through the pattern union communication domain (e.g., Figure 3The AO joint communication domain in O mode). However, due to the significant differences between computational processes and I / O processes in O mode, the coupler needs to allocate a separate communication domain for the computational processes in O ocean mode (such as...). Figure 3 In this case, the dashed line indicates that the coupler has not allocated a separate communication domain for the I / O process. Therefore, mode A only needs to exchange data with the computation process in mode O (via...). Figure 3 (The AO computation joint communication domain). It should be noted that the computation process communication domain is a sub-communication domain of the O component mode communication domain.

[0044] Reference Figure 4 The specific steps of this embodiment are as follows: 1. After component mode starts running, the communication domain for this component mode is created first. This communication domain can be created by calling the communication domain creation interface of the Message Passing Interface (MPI) or by calling the communication domain creation interface provided by the coupler. The communication domain cannot be defined as MPI_COMM_WORLD. Then, within this component mode communication domain (e.g., ... Figure 3 Based on the O mode, this component mode is created to create other component modes (e.g., O mode). Figure 3 Mode A in the joint communication domain (e.g., Mode A) Figure 3 The joint communication domain (AO domain in the context of the component mode) is derived from the global communication domain MPI_COMM_WORLD, containing the communication groups of this component mode and other component modes. Specifically, when only two modes are coupled, the joint communication domain of this component mode and other component modes is the global communication domain MPI_COMM_WORLD. If a joint communication domain is created through a coupler, the names of both parties to the joint communication domain must be specified in the configuration file.

[0045] 2. Begin initializing this component mode, further splitting the communication group under the jurisdiction of the communication domain of this component mode created in step 1 into a computing process communication group and an I / O process communication group, and generating a computing process communication domain and an I / O process communication domain based on these communication groups respectively.

[0046] 3. After initialization, this component mode determines whether the current process is a computation process. If it is not a computation process, it is determined to be an I / O process. The I / O process continuously receives output data from the computation process's communication group and writes it to a file through the communication domain of this component mode until the program terminates.

[0047] 4. If the current process is a computation process, then the loop time advancement phase begins. The component mode first creates the communication domain for this component mode computation process (i.e., the first target communication domain, for example...). Figure 3The computation process communication domain in step 1). If the creation of this component mode communication domain in step 1 is achieved by calling the MPI communication domain creation interface, then the computation process communication domain of this component mode is the same as the computation process communication domain created in step 2. If the creation of this component mode communication domain in step 1 is achieved by calling the communication domain creation interface provided by the coupler, then the communication domain creation interface provided by the coupler needs to be called again to declare the computation process communication domain created in step 2 as the computation process communication domain of this component mode. This computation process communication domain of this component mode must be declared as a sub-communication domain of this component mode communication domain. Subsequently, based on the computation process communication domain of this component mode, a joint communication domain of this component mode computation process and other component modes (i.e., the second target communication domain, for example) is created. Figure 3 The AO computation joint communication domain is created using the same method as the joint communication domain creation method in step 1. If a second target communication domain is created through a coupler, the names of both parties to be constructed in the joint communication domain must be specified in the configuration file. In the future, data interaction between other component modes and this component mode will only be achieved through the joint communication domain between this component mode's computation process and other component modes.

[0048] 5. After the communication domain is created, this component mode begins preparing the coupled data to be transmitted. For example, the ocean mode generally needs to prepare sea surface information, and the atmospheric mode generally needs to prepare ocean driving field information.

[0049] 6. After the coupled data to be sent in this component mode (i.e., the first coupled data) is ready, the first coupled data is sent. The first coupled data is exchanged with other component modes through the joint communication domain of this classification mode's calculation process. The transmission of the first coupled data can use non-blocking communication to accelerate program execution. Immediately afterwards, this component mode receives the second coupled data, i.e., obtains the required second coupled data from other component modes. The reception of the second coupled data must use blocking communication to ensure the correctness of subsequent calculations. The data transmission and reception period is determined by the coupling frequency and coupling delay set by the system.

[0050] 7. After the current component model has received the second coupled data, it needs to further process the second coupled data in the communication domain of the current component model's computation process to transform it into data that the current component model can directly use. The processing of the second coupled data mainly involves two aspects: First, unifying units. For example, some models use degrees Celsius for temperature, while others use Kelvin. This component model needs to convert the second coupled data to the units required by the current model before using it. Second, unifying the spatial representation. For example, some models have multiple grids, with temperature data stored at the grid center and velocity information stored at the grid edge centers. If only the grid center location information is provided during grid remapping, the data may require additional interpolation before use. Furthermore, some model grids have undergone localized coordinate processing; therefore, the coupled data also needs to be rotated to local coordinates before use.

[0051] 8. Only after the second coupled data received by this component mode has been properly processed can time integration (i.e., solving for time integration) begin, thereby advancing the simulation. The above data interaction and time integration process is repeated until this component mode meets the termination condition (which may be when the time integration reaches a preset threshold, and the preset threshold can be adjusted according to the actual situation; this embodiment does not impose a specific limitation).

[0052] 9. Before the end of this component mode, the relevant communication domains must be deregistered to release the memory resources they occupy. If the communication domains were generated earlier by calling the coupler communication domain generation interface, then the deregistration of the communication domains must also be completed by calling the coupler communication domain deregistration interface.

[0053] Compared with the prior art, the technical solution of this embodiment has the following beneficial effects: This embodiment maintains the performance optimization effect brought by the use of asynchronous I / O processes in the numerical model, and effectively solves the parallel control problem caused by the inconsistency between the execution of the computation process and the I / O process.

[0054] Reference Figure 5 This application also provides a parallel control system for constructing an independent I / O process mode in a coupled mode. The system includes a first mode creation unit 501, a communication group partitioning unit 502, an I / O process control unit 503, and a computing process control unit 504, wherein: The first mode creation unit 501 is used to create a communication domain for this component mode and a joint communication domain for this component mode and other component modes for a target coupling mode that includes this component mode and other component modes. The communication group partitioning unit 502 is used to divide the communication groups in this component mode communication domain into a computing process communication group and an I / O process communication group. I / O process control unit 503 is used to receive output data from the computing process communication group and write it to a file through the component mode communication domain if it is determined that the current process is a process in the I / O process communication group, until the component mode ends after all the output data has been received. The computation process control unit 504 is used to construct a first target communication domain and a second target communication domain if it is determined that the current process is a process in the computation process communication group, and to perform coupled data interaction and time integration based on the first target communication domain and the second target communication domain until the preset conditions are met, then cancel the first target communication domain and the second target communication domain, and end the current component mode.

[0055] It should be noted that since the parallel control system of an independent I / O process mode in coupled mode construction in this embodiment is based on the same inventive concept as the parallel control method of an independent I / O process mode in coupled mode construction described above, the corresponding content in the method embodiment is also applicable to this system embodiment, and will not be described in detail here.

[0056] Reference Figure 6 This application also provides an electronic device, which includes: At least one memory; At least one processor; At least one program; The program is stored in memory, and the processor executes at least one program to implement the parallel control method of the independent I / O process mode in coupled mode construction described above in this disclosure.

[0057] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.

[0058] The electronic devices according to embodiments of this application will now be described in detail.

[0059] The processor 1600 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure. The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700, and the processor 1600 calls and executes the parallel control method of the independent I / O process mode in the coupled mode construction of the embodiments of this disclosure.

[0060] The input / output interface 1800 is used to implement information input and output. The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900); The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.

[0061] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described parallel control method in the construction of a coupled mode for an independent I / O process mode.

[0062] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0063] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.

[0064] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0065] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0066] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0067] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0068] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. The embodiments of this application have been described in detail above with reference to the accompanying drawings, but this application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of this application.

[0073] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.

Claims

1. A parallel control method for independent I / O process mode in coupled mode construction, characterized in that, The method includes: For a target coupling mode that includes this component mode and other component modes, create a communication domain for this component mode and a joint communication domain for this component mode and other component modes; The communication groups in the component mode communication domain are divided into a computing process communication group and an I / O process communication group. If the current process is determined to be a process in the I / O process communication group, then the output data in the computing process communication group is received through the communication domain of this component mode and written to a file, until the output data is received and then the component mode ends. If the current process is determined to be a process in the computing process communication group, a first target communication domain and a second target communication domain are constructed. Coupled data interaction and time integration are performed based on the first target communication domain and the second target communication domain until a preset condition is met, at which point the first target communication domain and the second target communication domain are deregistered, and this component mode ends.

2. The parallel control method for independent I / O process mode in coupled mode construction according to claim 1, characterized in that, The creation of the communication domain for this component mode and the joint communication domain for this component mode with other component modes includes: The communication domain of this component mode is created by calling the communication domain creation interface of the message passing interface, or by calling the communication domain creation interface provided by the coupler. Based on the communication domain of this component mode, a joint communication domain of this component mode and other component modes is created.

3. The parallel control method for independent I / O process mode in coupled mode construction according to claim 1, characterized in that, The construction of the first target communication domain and the second target communication domain includes: Based on the computing process communication group, a computing process communication domain is generated; If the communication domain of this component mode is created by the communication domain creation interface of the message passing interface, then the computing process communication domain is taken as the first target communication domain. If the communication domain of this component mode is created by the communication domain creation interface provided by the coupler, then the communication domain creation interface provided by the coupler is called to declare the computing process communication domain as the first target communication domain; Based on the first target communication domain, a joint communication domain between the current component mode computing process and other component modes is created as the second target communication domain. The second communication domain is used for coupled data interaction between the current component mode and other component modes.

4. The parallel control method for independent I / O process mode in coupled mode construction according to claim 1, characterized in that, The process of coupling data interaction and time integration based on the first target communication domain and the second target communication domain, and then deregistering the first target communication domain and the second target communication domain after a preset condition is met, includes: The first coupled data prepared in this component mode is sent to the other component modes through the second target communication domain; The second coupled data returned by the other component modes is received through the current component mode; In the first target communication domain, the second coupled data is processed to obtain the processed second coupled data; Based on the processed second coupling data, time integration is performed until the time integration reaches a preset threshold, at which point the first target communication domain and the second target communication domain are deregistered.

5. The parallel control method for independent I / O process mode in coupled mode construction according to claim 4, characterized in that, The step of sending the first coupled data prepared in this component mode to the other component modes through the second target communication domain includes: Using non-blocking communication, the first coupled data prepared in this component mode is sent to the other component modes through the second target communication domain.

6. The parallel control method for independent I / O process mode in coupled mode construction according to claim 4, characterized in that, The receiving of the second coupled data returned by the other component modes through the current component mode includes: Using blocking communication, the second coupled data returned by other component modes is received through the current component mode.

7. The parallel control method for independent I / O process mode in coupled mode construction according to claim 4, characterized in that, The step of processing the second coupled data to obtain processed second coupled data includes: The second coupled data is processed by unit unification and spatial unification to obtain the processed second coupled data.

8. A parallel control system in a coupled mode construction with an independent I / O process mode, characterized in that, The system includes: The first mode creation unit is used to create a communication domain for this component mode and a joint communication domain for this component mode and other component modes for a target coupling mode that includes this component mode and other component modes. A communication group partitioning unit is used to divide the communication groups in the component mode communication domain into a computing process communication group and an I / O process communication group. The I / O process control unit is used to receive output data from the computing process communication group and write it to a file through the component mode communication domain if it is determined that the current process is a process in the I / O process communication group, until the component mode ends after all the output data has been received. The computation process control unit is configured to, if it is determined that the current process is a process in the computation process communication group, construct a first target communication domain and a second target communication domain, perform coupled data interaction and time integration based on the first target communication domain and the second target communication domain, and then cancel the first target communication domain and the second target communication domain and end the current component mode after a preset condition is met.

9. An electronic device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the parallel control method in coupled mode construction as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the parallel control method in a coupled mode construction as described in any one of claims 1 to 7.