|
[Sponsors] |
December 13, 2021, 07:27 |
Issue with linking OpenBLAS with SU2
|
#1 |
New Member
Pappu Visala Sushma
Join Date: Dec 2021
Posts: 5
Rep Power: 5 |
Hi
I am trying to build SU2 using GCC with OpenBLAS. I activated BLAS and LAPACK calls using: -DHAVE_BLAS and -DHAVE_LAPACK My configure line is : ./meson.py /home/sushma/su2/SU2-7.2.0/install_su2 -Dcustom-mpi=true -Dwith-mpi=enabled --prefix=/home/sushma/su2/SU2-7.2.0/install_su2 -Denable-tests=true -Denable-openblas=true -Dblas-name=openblas -DCPPFLAGS="-DHAVE_LAPACK -DHAVE_BLAS" -Dwith-omp=true I added the following line to 181 of meson.build file : blas_dep = declare_dependency(link_args: ['-L/home/sushma/install/netlib_3.9.0_gcc831/lib','-lblas','-llapack']) I tried profiling the INC_Turbulent example(https://su2code.github.io/tutorials/...lent_NACA0012/) . I am attaching the data of timings between SU2 without libraries and SU with OpenBLAS The data shows OpenBLAS is not much of a help. Does this mean there is a problem with linking of openBLAS. Am I missing something here? Please let me know the approach |
|
December 13, 2021, 09:00 |
|
#2 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
Hi, the relevant linear algebra options that speed up the solver are:
-Denable-mixedprec=true, and to a lesser extend -Denable-mkl=true (if you have it). See https://su2code.github.io/docs_v7/Bu...lgebra-options In addition, if you are using GCC I recommend the following optimization flags: CXXFLAGS="-march=native -funroll-loops -ffast-math -fno-finite-math-only" and use --optimization=2 in meson.py |
|
December 14, 2021, 02:20 |
|
#3 |
New Member
Pappu Visala Sushma
Join Date: Dec 2021
Posts: 5
Rep Power: 5 |
Hi,
Thanks for replying. But my objective is to ensure that OpenBLAS is getting linked properly with GCC build of SU2. For that I used " -Denable-openblas=true -Dblas-name=openblas " options. In the benchmarks I carried out, I am unable to see any OpenBLAS APIs in profiling report. As an alternative, I tried building SU2 with MKL. Here, I can see MKL calls in the profiling report when built with "-Denable-mkl=true" options . I am concerned if OpenBLAS routines are used at runtime. I need only OpenBLAS support to build with GCC . Could you guide me the steps to link OpenBLAS ? |
|
December 14, 2021, 15:24 |
|
#4 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
The problem you are running does not use BLAS routines.
If you used the open-blas options, and the linker gave you an executable, then you have OpenBLAS. |
|
December 15, 2021, 01:45 |
|
#5 |
New Member
Pappu Visala Sushma
Join Date: Dec 2021
Posts: 5
Rep Power: 5 |
Hi,
The problem (INC_Turbulent: https://su2code.github.io/tutorials/...lent_NACA0012/) that I profiled reflects BLAS calls when built with MKL. But profiling the same problem shows no BLAS related calls when built with OpenBLAS and GCC. I also tried this example: https://github.com/su2code/SU2/tree/...rans/AhmedBody for which BLAS calls of MKL can be seen while for GCC and OpenBLAS the calls are not getting reflected. I would like to know if there is any other way to confirm the OpenBLAS linking. Also can you suggest any other example to try out? |
|
December 31, 2021, 08:54 |
|
#6 |
New Member
Pappu Visala Sushma
Join Date: Dec 2021
Posts: 5
Rep Power: 5 |
Hi
For OpenBLAS I have tried to set the PKG_CONFIG_PATH to pkg-config folder for SU2 to find *.pc files . Also, as an alternative modified meson.build file for it to pick the BLAS library properly. But both these options are not reflecting blas/lapack calls in profiling of example. Is not properly setting the PKG_CONFIG_PATH variable be the cause of BLAS calls not being reflected in profiling? May I know how do I set the variable for OpenBLAS setting? Can you please help me ? Any help is appreciated |
|
December 31, 2021, 12:29 |
|
#7 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
MKL is used in places where OpenBLAS is not, because it has features that make that possible, whereas OpenBLAS does not...
The finite volume solvers in SU2 do not use OpenBLAS, but they use MKL. The high order FEM solvers do use OpenBLAS, see TestCases/hom_euler or hom_navierstokes |
|
January 3, 2022, 08:58 |
|
#8 |
New Member
Pappu Visala Sushma
Join Date: Dec 2021
Posts: 5
Rep Power: 5 |
Thank you for the reply.
For higher order FEM solvers, OpenBLAS is getting used. Could you please elaborate which features are not available in OpenBLAS required for FV (finite volume) solvers? |
|
January 3, 2022, 13:55 |
|
#9 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
Just-in-time GEMM kernels:
https://www.intel.com/content/www/us...-jit-code.html |
|
Tags |
library linking issue, linking issues, openblas, su2 7.2.0 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic FSI with SU2 Compressible Solver and SU2 FEM Solver Diverges when restarted | sangeet | SU2 | 7 | August 3, 2022 02:54 |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 19:28 |
Issues with CGNS formatted mesh in SU2 | jlwhelan28 | SU2 | 5 | February 13, 2017 12:48 |
Incorrect calculation of forces/moments coefficients with older versions of SU2 | diwakaranant | SU2 | 2 | August 16, 2013 05:17 |
SU2 suite has moved to GitHub! | fpalacios | SU2 News & Announcements | 0 | August 12, 2013 03:07 |