Starting from:

$25

SWE3021- Project #2: OpenMP: 3D EW Solved

1           Introduction
In this project, you will improve the performance of 3D Elastic Wave Modeling (3D-EW) code using OpenMP.

3D-EW is a wave field extrapolation method to simulate the propagation of elastic wave in isotropic elastic medium. In this code, the P-wave and S-wave are simulated separately, so as to achieve a better understanding of the P-wave and S-wave propagation in the elastic medium. This method simulates the propagation of elastic waves through high-order finite difference methods.

2           Details
A sequential version of 3D-EW code is available at /home/swe3021/project2/ In this directory, you will find source codes and sample input and output files. 3dew.cpp has about 400 lines of code with many nested for loops that you need to parallelize.

3dew program reads an input text file (para1.in, para2.in, etc) that specifies the configuration of simulation, i.e., the size of computational grid (nx, ny, nz), the number of time steps (lt), the number of edges (nedge), the number of shots (nxshot, nyshot), etc. Note that you do not have to fully understand how 3D-EW method works and how these parameters affect the simulation. If you do, you may come up with a more efficient implementation by making significant changes to the code, but it is not a requirement of this project. Even without fully understanding the logic, you should be able to parallelize and improve the given source code by analyzing the loop dependence.

While making changes to 3dew.cpp file, you may mess up its computation logic. To detect such errors, you need to compile and run “verify” program, which can be generated by running make verify command. This verify program reads two output files and verifies if they match. Suppose you run your parallel version of 3dew as follows.

$ ./3dew para1.in myout log

To verify this output, run the following command.

$ ./verify myout para1.out

If “verify” says diffmax is 0 or sufficiently close to 0, your output is correct. You may change the configuration file for various performance testing. Then you will need to run the sequential version as well as your parallel version so that you can compare both outputs using the verify program.

More products