# Enhancement of In-Plane Seismic Full Waveform Inversion with CPU and GPU Parallelization
## 5 Results and Discussion  
A series of studies are performed to show the enhancement of in-plane seismic full waveform inversion using CPU and GPU parallelization. Initially, the forward model is studied with an example of the wave propagation in a dam in Section 4.1. The validated forward model is further developed into the full waveform inversion model in Section 4.2 using low-frequency anamoly for a circular inclusion in full space. The developed FWI codes are programmed for serial computation in CPU, parallel computation in CPU using openMP parallel modules and parallel computation in GPU using CUDA C programming languages. Same physical parameters and mathematical models, with a variation in time and space grids, are used for comparative performance analysis of the developed codes over the available hardware.  
The seismic wave propagation in the dam shows that the presence of cracks in the dam significantly alters the propagation of elastic waves (Figures 11 and 12). Similarly, a minor disturbance can also be observed due to the presence of a water table. The effective wavelength of P and SV waves in saturated soil inside the dam is measured in Figures 11 and 12 to be approximately 2.0 m and 0.7 m, respectively. The measured wavelengths correspond to the medium parameters and the central frequency of the input signal, which validates the seismic simulation codes in CPU and GPU. It can also be observed from Figure 9b that the peak frequency response shifts to slightly higher frequencies with the distance of wave propagation. From the perspective of computational efficiency, similar results are obtained from serial computation, parallel computation using openMP and parallel computation in GPU. Figures 18-20 show the computational time and performance boost in forward simulations. It can be seen that the performance in the most capable GPU that we used is 60 to 80 times that compared of the sequential code. The CPU parallel computation using OpenMP with 16 threads only shows an improvement by 2 to 4 times in the performance. For the GPU1, the simulation was out of memory after 3800-time steps for the given spatial grid; see Figure 18.  
Figure 17: \(L_{2}\) norm in the first 40 steps, normalized to the \(L_{2}\) norm in the first step, in Seismic FWI a spherical inclusion in full-plane.  
It is observed from the FWI models that the higher wavelength band of the wave-field gives the general outline and the layers in the model guiding the convergence towards the  
Figure 19: Comparison of computational time and performance for variation of spatial grid size along \(Z\) direction \(NZ\) keeping spatial grid size along \(X\) direction and temporal grid constant (\(NX=201\), \(NT=1000\)) in forward simulations.  
Figure 20: Comparison of computational time and performance for variation of spatial grid \(NX\times NZ\) keeping temporal grid size constant (\(NT=1000\)) in forward simulations.  
Overall, an average performance boost of about 80 times is observed in all the different modelling cases. It may not be significant for forward seismic models computed within minutes. However, for full-waveform inversion models, which may take hours and days for the whole iterations to compute, this may bring the computation of days to hours and hours to some minutes. This enhancement is based mainly on faster computation using parallelisation. A further enhancement can be made by using a more robust optimisation algorithm and machine learning methods for regression and optimisation studies [41,42].