|
[Sponsors] |
January 23, 2023, 04:44 |
|
#21 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
I found out, that the AmgX-OpenFOAM integration has been done in another way using a new interface called FOAM2CSR instead of the wrapper.
So it's: OpenFOAM > PETSc4FOAM > FOAM2CSR > AmgX See youtube: SU2 Conference 21: An Implementation of AmgX for GPU Acceleration of OpenFOAM https://www.youtube.com/watch?v=1d1DVURNz4E FOAM2CSR https://gitlab.hpc.cineca.it/openfoam/foam2csr |
|
January 24, 2023, 03:33 |
|
#22 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
As per the last conversation you told that to schedule meeting at 24 jan for detailed information PF Link https://meet.google.com/ujq-qheo-sdz Thank you for your valuable time and efforts Thanks & regards Last edited by Nitish25; January 24, 2023 at 05:07. |
||
January 24, 2023, 04:17 |
|
#23 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
As per the last conversation you told that to schedule meeting at 24 jan for detailed information PF Link https://meet.google.com/ujq-qheo-sdz Thank you for your valuable time and efforts Thanks & regards |
||
January 24, 2023, 05:13 |
|
#24 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
|
||
January 24, 2023, 05:51 |
|
#26 | |
Senior Member
|
Quote:
1/ I imagine that FOAM2CSR applies to the OpenFoam LDU matrix format. FOAM2CSR does *not* apply to the PETSc matrix format. Can you confirm? 2/ Does AMGX apply to an decomposed case, or does AMGX enforce its own parallel decomposition? 3/ When using AMGX to an incompressible case (like motorBike), AMGX is to be applied to the pressure field only? Thanks. Domenico. |
||
January 24, 2023, 06:07 |
|
#27 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
mkdir build cd build cmake ../ make -j16 all while, build it automatically compiles all the amgx example and generates their executable in the build directory. we are able to run the amgx_capi (it is an executable file of AMGX/examples/amgx_capi.c )example on gpu inside the build directory by following command examples/amgx_capi -m ../examples/matrix.mtx -c ../src/configs/FGMRES_AGGREGATION.json so manually compilation of amgx/examples is not required. Thank you for ur valuable time. |
||
January 24, 2023, 09:16 |
|
#28 |
Senior Member
|
Yes and no.
Yes, I understand that the manually building the examples of AMGX/examples is *not* required. No, however, I am not interested in building the examples of AMGX/examples as a final goal. Building the examples of AMGX/examples is intended as a seperate step to *understand* the compile and build process of AMGX/examples. There are now two ways to proceed 1/ First alternative Repeat the entire build process, and replace in the last step "make -j16 all" by "make -j16 all >& log.makeAMGX" in such a way that the output of the make process is written to the log-file log.makeAMGX that we can inspect. A search on amgx_capi.c should provide the information we are after. 2/ Second alternative Assume that all the header files are included in AMGX/include and its subdirectory and that all the library files (files with extension *.a or *.so) are in some lib directory. We can proceed with a copy-and-paste of the source of amgx_capi.c into myLaplacianFoam and try to compile, link and run it. Let me know how it goes. |
|
January 25, 2023, 04:34 |
|
#29 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
I have repeated the entire built process of AMGX and save in log file . I hv attached the log file. I am able to find build of amgx_capi.c at [ 95%] Building C object examples/CMakeFiles/amgx_capi.dir/amgx_capi.c.o in log file. kindly reply next step. |
||
January 25, 2023, 05:00 |
|
#30 |
Senior Member
|
We are making a small step in the good direction.
The log file, however, fails to give sufficient information. We need more information. 1/ Compile stage Here is what we now know Line 242 in log file [ 95%] Building C object examples/CMakeFiles/amgx_capi.dir/amgx_capi.c.o To obtain more information, the compiler (i.e. gcc -c) needs to output more information. 2/ Link stage Here is what we now know Line 247 in log file: [ 97%] Linking C executable amgx_capi To obtain more information, the linker (i.e. gcc -L ) needs to output more information. 3/ Next Step To obtain the required additional information, can you please type cd examples/CMakeFiles/amgx_capi.dir and subsequently type make ? Dhanyavaad. |
|
January 25, 2023, 05:16 |
|
#31 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
we have entered the examples/CMakeFiles/amgx_capi.dir and have typed make but it says make: *** No targets specified and no makefile found. Stop. kindly reply |
||
January 25, 2023, 05:51 |
|
#33 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
find . -name *makefile* -print in main amgx directory, it print: ./examples/install_makefiles_mpi ./examples/install_makefiles_nompi when I type find . -name *Makefile* -print it prints: ./build/CMakeFiles/Makefile.cmake ./build/CMakeFiles/Makefile2 ./build/examples/Makefile ./build/thrust/Makefile ./build/Makefile ./build/src/Makefile ./examples/Makefile.cray ./examples/amgx_spmv_example/Makefile ./examples/install_makefiles_mpi/Makefile ./examples/install_makefiles_nompi/Makefile ./thrust/Makefile |
||
January 25, 2023, 07:04 |
|
#34 | |
New Member
Join Date: Dec 2022
Posts: 23
Rep Power: 4 |
Quote:
|
||
February 2, 2023, 17:40 |
|
#36 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Dear Domenico,
regarding your questions: 1/ I imagine that FOAM2CSR applies to the OpenFoam LDU matrix format. FOAM2CSR does *not* apply to the PETSc matrix format. Can you confirm? See timestamp 2:46 in the youtube video. It explains the role of FOAM2CSR, it handles "the GPU co-ordination, matrix consolidation, data transfers, transformations and dispatching linear systems to AmgX." I haven't looked into the source code of FOAM2CSR to see what's its relationship with PETSc4FOAM. In the video, they talk about converting the LDU format to the CSR format used by AmgX, I assume because it's computationally cheaper to do the conversion. 2/ Does AMGX apply to an decomposed case, or does AMGX enforce its own parallel decomposition? That's a misunderstanding I'd say. AmgX is the solver library, FOAM2CSR handles the "consolidation" of decomposed cases according to the number of available GPUs if the number of CPU cores and available GPUs differ. 3/ When using AMGX to an incompressible case (like motorBike), AMGX is to be applied to the pressure field only? No, it's not limited to the pressure field. Klaus |
|
February 9, 2023, 03:45 |
|
#37 | |
New Member
Join Date: Aug 2022
Posts: 19
Rep Power: 4 |
Quote:
Thank you |
||
February 10, 2023, 16:12 |
|
#38 |
Senior Member
|
Dear Klaus,
Thank you for your reply. Much appreciated! Re-1: Thank you for pointing out the link to the video. Re-2: I fail to understand what the purpose of FOAM2CSR is. Once in PETSc, the matrix is in a format that PETSc understands. Clearly, I am missing something. Re-3: I agreed that GAMG can solve velocity components. I wonder, however, whether the use of GAMG for the velocity components offers any gains. Thanks again. Talk soon, Domenico. |
|
February 10, 2023, 16:26 |
|
#39 | |
Senior Member
|
Dear Dcn,
I fail to understand what the purpose of FOAM2CSR is. Clearly and most obviously, I am missing the point. I therefore developed myLaplacianFoam at placed it at https://github.com/ziolai/software/t...yLaplacianFoam. This code convert the LDU matrix format to CSR format using code available from https://gist.github.com/BinWang0213/...b8e25ac014cc48. In a next step I wish to extend myLaplacianFoam with something like Quote:
|
||
May 16, 2024, 07:06 |
|
#40 |
New Member
Join Date: Apr 2023
Posts: 3
Rep Power: 3 |
Hi Nitish, did you managed to do it with Klaus workflow!
|
|
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 |