-
Notifications
You must be signed in to change notification settings - Fork 1k
[GSOC24] Addition of CUDA and GPU Acceleration to FGMRES Linear Solver in SU2 #2346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
34c0bda
refresh everything
areenraj c953af8
readme update
areenraj 231968d
final push
areenraj 4bddc30
Enable GPU Mat Vec
areenraj 2da57f6
New Branch and Optimized Memory Alloc on GPU Slightly
areenraj aa35779
Finished GPU Mat-Vec with CPU Accuracy and Block Matrix Parallelizati…
areenraj 8866936
Added fully template kernels to prevent type errors
areenraj 12f01db
Disabled NVBLAS Implementation in the DG Solver
areenraj d7cbd5e
Added options and error check
areenraj 103ec39
reverting stuff to debug
areenraj 38d658b
fixed turbulent case but Error Check is a performance hit
areenraj 02b9eb8
Updated README for final report
areenraj 1a902ae
readme update
areenraj 3fa00a9
readme update
areenraj 57ffb74
readme update
areenraj b8f14d3
Final Graph Changes
areenraj 3a000e2
Image Changes
areenraj c31b9df
Added Runtime Polymorphism for selecting execution Path
areenraj e131308
Added Runtime Polymorphism to select between CPU and GPU Execution
areenraj 7695314
Added runtime polymorphism to select execution path
areenraj 809c2d0
Added runtime polymorphism to select execution path
areenraj 9832f33
Added Runtime Polymorphism to select between CPU and GPU Execution
areenraj 1f41592
Added Runtime Polymorphism to select between CPU and GPU Execution
areenraj de0810a
Create REPORT.md
areenraj 66878d1
Delete REPORT.md
areenraj 729bfc8
Added Preprocessor Directives
areenraj 3f351db
Making Repo PR Ready
areenraj f363809
Making Repo PR Ready
areenraj a0e09d7
Making it PR Ready
areenraj b489d09
Pre-Commit Hook Ran
areenraj 4926d34
PR Ready
areenraj c691960
added some fixes and error handling
areenraj 1cc128d
New Algorithm for MVP
areenraj 9fb99b2
Merge remote-tracking branch 'upstream/master' into HEAD
areenraj 86e59b4
Version Number Change
areenraj c7777c8
Streamlined Vector GPU Storage, Introduced flags to control memory tr…
areenraj 5d71ae2
Merge pull request #2499 from su2code/develop
pcarruscag b7ed530
Introduced Memory Wrapper Functions, Error Handling and Constant Bloc…
areenraj 625c483
Syncing Repo using Merge
areenraj 70a7680
Minor changes
areenraj 0fcf10d
Merge remote-tracking branch 'upstream/develop'
areenraj 0b0d2df
synced to develop and removed redundant NVBLAS components
areenraj 5509406
pre-commit hook ran
areenraj d6b3216
fixed compilation issues on CPU-only mode
areenraj e12f281
fixed some more compilation issues
areenraj ebd1bae
should fix MPI compilation issues
areenraj c408c5b
Minor Changes and Version Number Fixes
areenraj a37dff4
Pre-Commit Hook Done, Ready to Merge :)
areenraj 1a2b50b
Fixed memory exceptions related to matrix allocation and vector deall…
areenraj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /*! | ||
| \file GPUComms.cuh | ||
| * \brief Header file containing universal functions that provide basic and essential utilities for other GPU processes | ||
| * \author A. Raj | ||
| * \version 8.2.0 "Harrier" | ||
| * | ||
| * SU2 Project Website: https://su2code.github.io | ||
| * | ||
| * The SU2 Project is maintained by the SU2 Foundation | ||
| * (http://su2foundation.org) | ||
| * | ||
| * Copyright 2012-2024, SU2 Contributors (cf. AUTHORS.md) | ||
| * | ||
| * SU2 is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU Lesser General Public | ||
| * License as published by the Free Software Foundation; either | ||
| * version 2.1 of the License, or (at your option) any later version. | ||
| * | ||
| * SU2 is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with SU2. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| #include<cuda_runtime.h> | ||
| #include<iostream> | ||
|
|
||
| namespace KernelParameters{ | ||
|
|
||
| inline constexpr int round_up_division(const int multiple, int x) { return ((x + multiple - 1) / multiple); } | ||
|
|
||
| static constexpr int MVP_BLOCK_SIZE = 1024; | ||
| static constexpr int MVP_WARP_SIZE = 32; | ||
| } | ||
| /*! | ||
| * \brief assert style function that reads return codes after intercepting CUDA API calls. | ||
| * It returns the result code and its location if the call is unsuccessful. | ||
| * \param[in] code - result code of CUDA function | ||
| * \param[in] file - name of file holding the function | ||
| * \param[in] line - line containing the function | ||
| */ | ||
|
|
||
| inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true){ | ||
| if (code != cudaSuccess){ | ||
| fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line); | ||
| if (abort) exit(code); | ||
| } | ||
| } | ||
|
|
||
| #define gpuErrChk(ans) { gpuAssert((ans), __FILE__, __LINE__); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.