Git Product home page Git Product logo

diffusionsimulation's Introduction

Capstone Project: Diffusion Simulation with Cuda, MPI

https://github.com/khanhtq2101/ParallelDiffusionSimulation.git
Implementing Gauss Seidel algorithm by parallel programming with cuda and demo visualization.

How to run?

1. CUDA:

  • Create result folder:
   mkdir -p ./results/CUDA
  • Compile and run the GaussSeidel.cu file:
   nvcc -o GaussSeidel_CUDA GaussSeidel.cu  
   ./GaussSeidel_CUDA

The output will be saved on /results/CUDA folder.

2. MPI:

  • Create result folder:
  mkdir -p ./results/MPI
  • Compile the GaussSeidel_MPI.c file:
   mpicc -o GaussSeidel_MPI GaussSeidel_MPI.c  
  • Run the compiled file:
  mpirun -np 16 GaussSeidel_MPI

The output will be saved on /results/MPI folder.

3. Display the results:

  • Run file text_to_imgage.py file to convert result in text to image.
   python text_to_image.py 
  • Run file display.py if you want to display process in some iterations.
   python display.py
  • Run file create_gif.py to create gif for diffusion process.
   python create_gif.py 

4. Results:

  • Top down visulization: Initialization: 80 at centers and 25 around. Boundary condition: 100 at top right and 0 at bottom left.

    Gift display:
  • Top right visualization: Initialization: 80 at centers and 25 around. Boundary condition: 100 at top down, and 0 at left and right side.

diffusionsimulation's People

Contributors

khanhtran2101 avatar hoanganh27042001 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.