Co-design at POP CoE project

OpenMP Critical

Program's name: OpenMP Critical
Available version(s): OpenMP Critical (v0.0: critical section) · OpenMP Critical (v1.0: seq. reduction) · OpenMP Critical (v2.0: par. reduction) ·
Programming language(s): C++ ·
Programming model(s): OpenMP ·
Uses following algorithm(s):
Used in following discipline(s): Seismic Data Processing ·

An oil & gas code had the openmp-critical-section pattern and the computational aspects of the original code is recreated here. This application solves the 3D wave equation: $\frac{\partial^{2}u}{\partial t^{2}} = c^{2}\nabla^{2}u$ using the pseudospectral method.

However, for this version the Finite Difference Method was selected for the purpose of simplicity which re-created the computational profile of the original code.

Building the code

The code is built with the Intel C++ compiler which is the compiler used to build thee code. Simply use the provided Makefile to build by typing the CXX=icpc make command. Note that the -O2 flag is used to explicity enable optimisation in conjunction with the -g flag. If the -O2 flag is omitted, the compiler will default to -O0 (level zero) optimisation when using -g.

Executing the code

To control the problem size, the Ni, Nj, and Nk control the number of cells in the x-, y- and z-direction, respectively. The number of time steps is controlled by the Nt variable. The executable is called openmp-critical-section.exe.