|
[Sponsors] |
November 24, 2015, 04:25 |
Has any one tried AmgX on OpenFOAM
|
#1 |
New Member
Suraj Salvi
Join Date: Jul 2015
Posts: 3
Rep Power: 11 |
Has any one configured AmgX library with OpenFOAM or any one knows how to configure a third party library with OpenFOAM please help
Last edited by surajsalvip@gmail.com; November 24, 2015 at 05:38. |
|
January 10, 2023, 08:36 |
AmgX on OpenFOAM
|
#2 |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
||
January 11, 2023, 00:34 |
|
#4 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
I want to Know how to integrate amgx to OpenFOAM to run case(e.g Motorbike ) on GPU. |
||
January 11, 2023, 04:36 |
|
#5 |
Senior Member
|
You need to extract the matrix and rhs-vector from OpenFoam and plug it into AMGX.
Have you already looked into the OpenFoam matrix format, see e.g. https://www.linkedin.com/pulse/openf...menico-lahaye/? What matrix format does AMGX require? EDIT: AMGX seems to require the compressed row storage (CRS) format for the sparse matrix. It thus amounts to converting the LDU matrix format to the CRS format. This conversion has been implemented before. It is present in e.g. the PARALUTION software, see http://github.com/openparalution/Paralution-Open-Source Alternative is to write the linear system to file using the ofgdb debugger and to take it from here. Last edited by dlahaye; January 11, 2023 at 10:35. Reason: Typo |
|
January 11, 2023, 05:51 |
|
#6 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
basically I want to calculate performance on gpu of hpc motorbike case. for that we know that we hv to use gpu solver to solve on gpu. so I hv installed openfoam-1912 and able to run on cpu. and for running on gpu, I hv installed and build amgx library in same location where openfoam present parallelly(in amgx directory there is examples directory in which there is some cuda program that i am able to execute on gpu). also cuda/11.2 kindly reply |
||
January 13, 2023, 08:48 |
|
#7 |
Senior Member
|
Greetings,
The motorbike tutorial is a tutorial for the simpleFoam solver. I humbly suggest to start from the flange tutorial for the laplacianFoam solver. I suggest to copy the laplacianFoam solver from src/application to working dir, rename into myLaplacianFoam, compile and run it. In a next step, I suggest to copy the AMGX tutorial into myLaplacianFoam, compile, link with AMGX and run it. In a next-next, we can discuss extracting matrix and right-hand vector from the fvScalarMatrix that myLaplacianFoam generates, and plug it into AMGX. I happy to look into simpleFoam later. Does this make sense? |
|
January 18, 2023, 07:18 |
|
#8 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
kindly reply. |
||
January 18, 2023, 08:15 |
|
#9 |
Senior Member
|
Congrats for the progress!
I need to be brief now. You can, however, copy what the paralution package does. Download paralution from https://github.com/openparalution/Pa...n-1.1.0.tar.gz, and navigate to src/plug-inns/OPENFOAM to see how paralution resolves the issue that you raise. Please give it a look. I am happy to provide more elaborate input where required. |
|
January 19, 2023, 03:01 |
|
#10 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
but I am confused how to integrate Openfoam into Amgx . so that i can run our case on gpu. kindly reply |
||
January 19, 2023, 04:26 |
|
#11 |
Senior Member
|
Well done on the download.
I do not understand your question. My understanding is that we want to proceed as follows: 1/ extract linear system from laplacianFoam; 2/ plug linear system into AmgX; 3/ solve linear system using AmgX; Do we have an agreement on these steps? If not, could you please explain your doubts more elaborately. |
|
January 19, 2023, 05:17 |
|
#12 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
see what i hv done till now is : I hv install and build amgx library(we know that Amgx is GPU-accelerated linear solver package.) and also install openFOAM-v2112(a CFD tool). i want, when i run case on openFoam, it should not run on CPU but on GPU. from ur suggestion what i hv done till now is: I hv copied the laplacianFoam solver from OpenFOAM/OpenFOAM-v2112/applications/solvers to working dir, rename into myLaplacianFoam, and in Make/option file i hv added the amgx library and compile and run it. Now i able to see new myLaplacianFoam file in bin directory. and also i hv copied the flange tutorial for the laplacianFoam solver (OpenFOAM/OpenFOAM-v2112/tutorials/basic/laplacianFoam/flange) in fvSolution file when i gave solver name to myLaplacianFoam it is running.(but not on GPU). Kindly reply for getting better performance I want to run on GPU |
||
January 19, 2023, 07:42 |
|
#13 |
Senior Member
|
Thx for update.
Go back to Item #7 in above list and try to copy AMGX tutorial into myLaplacianFoam, compile, link with AMGX library by editing Make/files appropriate and run. Talk soon. |
|
January 20, 2023, 00:40 |
|
#14 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
I did not get u. Inside the amgx directory there is no tutorial directory. can we connect on meet , where I can show my screen. kindly reply. |
||
January 20, 2023, 04:41 |
|
#15 |
Senior Member
|
1/ In Item #4 above you confirm that you ran an example of AMGX. What example is this? Where is the code of this example?
2/ How did you compile this example? Can you show me the output of the compiler? 3/ How do like this link this example with the AMGX library? Can you show me the output of the linker? 4/ Please confirm that you see a subdirectory called Make in the directory called myLaplacianFoam. Please confirm that you see the files called files and options within the Make directory. Please confirm that it is your understand that EXE_INC should be extended with the above output of the compiler and that EXE_LIBS should be extended with the above output of the linker. 5/ Please let me know in what time zone you live in such a way to set-up an appropriate online meeting. |
|
January 20, 2023, 04:55 |
|
#16 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
Sir Can u meet now (I am from india (GMT +5:30)) if you free now i will send the meeting link (Google meet) Thanks & Regards |
||
January 20, 2023, 05:40 |
|
#18 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
https://meet.google.com/goe-qnus-mbo Thanks |
||
January 20, 2023, 15:54 |
|
#19 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Hello,
the external-solver extension which is also called "petsc4Foam" comes with the recent OpenFOAM releases from openfoam.com . With this extension, it's possible to use the Petsc linear algebra solvers as OpenFOAM solvers. You could link this external-solver extension "petsc4Foam" to AmgX using the AmgXWrapper: OpenFOAM > external-solver extension "petsc4Foam" (linking OpenFOAM with Petsc) > AmgXWrapper (linking Petsc with AmgX) > AmgX https://github.com/barbagroup/AmgXWrapper AmgXWrapper library details from the Author: https://on-demand.gputechconf.com/gt...-cfd-codes.pdf You can find the external-solver under: OpenFOAM-v2206/modules/external-solver There are also three other ways to run Petsc solvers on GPUs, see: https://petsc.org/release/overview/gpu_roadmap/ Klaus Last edited by klausb; January 20, 2023 at 16:26. Reason: There are three other ways to run Petsc solvers on GPUs |
|
January 23, 2023, 02:20 |
|
#20 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
can you kindly tell how to link the AmgxWrapper with the petsc4Foam , as i have link petsc4Foam with openfoam and have also successfully build amgx and amgxwrapper , |
||
Tags |
amgx, gpu, library, nvidia, openfoam 2.2.x |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Foundation releases OpenFOAMŪ 3.0.0 | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 1 | November 7, 2015 16:16 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 04:43 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |