Giter Club home page Giter Club logo

poissonsolvergpu's Introduction

PoissonSolverGPU

A GPU Solver for Poisson Problem 2D

Compile

Eigen library is the prerequisite. To use, download eigen release to your machine and include that path during compilation. See example below.

Double precision is only supported in computing compability >= 6.0, so make sure the machine satisfies.

First you need:

cd ./src/test

To make sure the project can compile, load cuda version 11+:

module load cuda-11.4

To compile the dense version:

nvcc --std c++11 -I /PATH/TO/eigen-3.3.9 -o dense dense.cu -arch=sm_60

To compile the sparse version:

nvcc --std c++11 -I /PATH/TO/eigen-3.3.9 -o sparse sparse.cu -arch=sm_60 -lcublas -lcusparse

Run

To run the dense solver, run the following command (arguments are explained below):

./dense PATH/TO/DATA NUM_ITER PRECISION ALGO

To run the sparse solver, run the following command:

./sparse PATH/TO/DATA NUM_ITER PRECISION ALGO SCALE

The arguments:

  • PATH/TO/DATA: path to the data file
  • NUM_ITER: number of maximum iterations, should be an integer
  • PRECISION: whether to use single or double precision. 0 for single precision, 1 for double precision
  • ALGO: the string specifying which algorithm to use.
    • For the dense solver, two are supported: "d" for dense, "dt" for dense with texture memory.
    • For the sparse solver, the supported listed below:"s" for sparse, "st" for sparse with texture, "sc" for the cuSparse
  • SCALE: wether to apply scale trick: 0 for not apply, 1 for apply.

For example:

./dense ../../data/test_100.csv 30000 1 d

./sparse ../../data/nos6.mtx 30000 1 s 1

poissonsolvergpu's People

Contributors

juexzz avatar njsyw1997 avatar

Stargazers

Aron751 avatar  avatar

Watchers

 avatar  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.