Skip to content

Simple and robust 2D Wave Equation solver using MPI.

License

Notifications You must be signed in to change notification settings

sametd/2d_wave_mpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Wave Equation Solution with MPI

This code is written as practice. It includes:

  • Easily modifiable for any equation
  • Derived Data Types
  • Cartesian Virtual Topology
  • Ghost point exchanges
  • Output using posix api
  • Output using NetCDF
  • Very robust Gauss-Seidel solver

Important Note: This code designed to run with 1,4 or 9 CPU cores. It scales well with the increasing processor count, for more core count, grid size and processor size should be compatible. Scaling is mostly IO bound.

Example Visualization for the code output:

Compilation Instructions:

mpicc -O3 -march=native waveEq.c -o wave.x -lnetcdf -lm

You can disable NetCDF support by defining write_netcdf as 0 in the config.h and then you can comment out include line for the netcdf.h in the waveEq.c.

Then, you can compile the code with the following command:

mpicc -O3 -march=native waveEq.c -o wave.x -lm

About

Simple and robust 2D Wave Equation solver using MPI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages