Unlock instant, AI-driven research and patent intelligence for your innovation.

Fine-grained shared memory communication synchronization method based on OpenMP/MPI mixed parallel CFD computation

A shared memory and communication synchronization technology, applied in computing, inter-program communication, program control design, etc., can solve problems such as idle computing resources, thread performance degradation, and very sensitive sources, so as to avoid thread blocking, increase asynchronicity, and avoid The effect of synchronization overhead

Active Publication Date: 2018-12-04
XI AN JIAOTONG UNIV
View PDF7 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, the use of OpenMP / MPI hybrid programming in CFD simulation programs is mainly divided into two categories: the first category is to use OpenMP for fine-grained parallelism such as for loops and code segments in MPI processes, and its solutions are very sensitive to resources. There are not enough computing resources for granular parallelism, and frequent scheduling of threads will cause performance degradation. If computing resources are reserved, the computing resources will be idle for a long time in addition to fine-grained parallelism; the second type is to use OpenMP for coarse-grained parallelism. Parallel. At this time, the calculation task is completed by the OpenMP thread in the MPI process. The MPI process is only responsible for resource management and inter-process communication. Memory communication lacks a better synchronization method between threads. In the past, OpenMP’s extensive explicit fence synchronization was used, and most of the cases were not as efficient as pure MPI programs.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Fine-grained shared memory communication synchronization method based on OpenMP/MPI mixed parallel CFD computation
  • Fine-grained shared memory communication synchronization method based on OpenMP/MPI mixed parallel CFD computation
  • Fine-grained shared memory communication synchronization method based on OpenMP/MPI mixed parallel CFD computation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The present invention will be further described in detail below in conjunction with specific embodiments, which are explanations of the present invention rather than limitations.

[0035] A pseudo-code flow of a fine-grained shared memory communication synchronization method based on OpenMP / MPI hybrid parallel CFD calculation proposed by the present invention, as shown in Table 1, includes:

[0036] Step A, each MPI process initializes the memory buffer used for OpenMP shared buffer communication according to the total number of threads in the process, and initializes the mutex used for shared buffer synchronization.

[0037] Step A1, the MPI process according to the number of boundary surfaces that each thread needs to perform shared memory communication in the process, each boundary surface is provided with two double buffers for communication, the master and the backup, so that all threads in the process can access these shared memory buffer. For structured hexahedr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a fine-grained shared memory communication synchronization method based on OpenMP / MPI mixed parallel CFD computation. The method comprises the following steps: each MPI processinitializing a memory buffer used for OpenMP shared buffer communication according to the total number of threads in the process, and initializing mutually exclusive locks used for synchronization ofa shared buffer, and placing the mutually exclusive locks in a locked state; starting an OpenMP thread for iterative computation; each thread writing boundary data which needs communication into theshared buffer according to a flag word, and unlocking the synchronized mutually exclusive locks after the boundary data is written in the shared buffer; each thread reading the boundary data of otherthreads from the shared buffer synchronously by using the mutually exclusive locks; according to a judgment condition of the previous step, each thread continuing to judge whether the next surface ofthe thread needs communication and locking the read data; determining whether a flag byte is true or not, if the flag byte is true, returning to the start of polling and continuing locking reading judgement; otherwise, terminating a loop, and each thread obtaining the boundary data to be exchanged through the shared buffer.

Description

technical field [0001] The invention belongs to the intersection field of computational fluid dynamics and computer, and in particular relates to a shared memory communication synchronization method based on OpenMP / MPI hybrid parallel CFD calculation. Background technique [0002] Computational Fluid Dynamics (CFD) is an interdiscipline that uses numerical calculation and computer science to numerically simulate and analyze fluid dynamics problems, and provides cheap simulation and optimization methods for the theoretical and engineering research of fluid mechanics. . The CFD numerical algorithm was limited by computer hardware conditions in the early days, with small calculation scale and low simulation accuracy. With the development of computer technology, especially the maturity of parallel programming framework standards represented by MPI and OpenMP, in engineering applications, it is very common for parallel CFD simulation software to use tens of thousands of cores fo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54G06F17/50
CPCG06F9/544G06F30/20
Inventor 董小社何锋张兴军邹年俊肖兮李胜利肖强王靖桦
Owner XI AN JIAOTONG UNIV