CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Building source code with MKL and OpenBLAS

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2020, 13:04
Default Building source code with MKL and OpenBLAS
  #1
New Member
 
Michalis Hadjiandreou
Join Date: Feb 2020
Posts: 3
Rep Power: 2
michalish is on a distinguished road
Dear Community,


Although I have been successful in building the basic configuration from source, I encountered some issues when wanting to rebuild it with MKL and openBlas features.



Firstly, I downloaded and installed the MKL library and as a result its content is found in /opt/intel/mkl.



When trying to build using meson, by the following code,
Code:
./meson.py build -Denable-autodiff=true -Denable-directdiff=true -Denable-pywrapper=true -Denable-mkl=true -Denable-openblas=true -Dblas-name=openblas -Dmkl_root=/opt/intel/mkl
I get the following output:


Quote:
michalish@DESKTOP-63FOA2D:~/SU2$ ./meson.py build -Denable-autodiff=true -Denable-directdiff=true -Denable-pywrapper=true -Denable-mkl=true -Denable-openblas=true -Dblas-name=openblas -Dmkl_root=/opt/intel/mkl The Meson build system Version: 0.52.999 Source dir: /home/michalish/SU2 Build dir: /home/michalish/SU2/build Build type: native build Project name: SU2 Project version: 7.0.1 C compiler for the host machine: cc (gcc 8.3.0 "cc (Debian 8.3.0-6) 8.3.0") C linker for the host machine: GNU ld.bfd 2.31.1 C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Debian 8.3.0-6) 8.3.0") C++ linker for the host machine: GNU ld.bfd 2.31.1 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python3 found: YES (/usr/bin/python3) Run-time dependency MPI for c found: YES 3.1.3 Run-time dependency MPI for cpp found: YES 3.1.3 Message: Boost sources found. Found CMake: /usr/bin/cmake (3.13.4) Run-time dependency mkl-static-lp64-seq found: NO (tried pkgconfig and cmake) Program swig found: YES (/usr/bin/swig) Message: Using mpi4py from /usr/local/lib/python3.7/dist-packages/mpi4py/include Run-time dependency python3 found: YES 3.7 Program install.sh found: YES (/bin/sh /home/michalish/SU2/SU2_PY/pySU2/install.sh) Message: ------------------------------------------------------------------------- | ___ _ _ ___ | | / __| | | |_ ) Release 7.0.1 "Blackbird" | | \__ \ |_| |/ / | | |___/\___//___| Meson Configuration Summary | | | ------------------------------------------------------------------------- Option Value --------------------- TecIO: true CGNS: true AD (reverse): true AD (forward): true Python Wrapper: true Intel-MKL: true OpenBlas: true PaStiX: false Please be sure to add the $SU2_HOME and $SU2_RUN environment variables, and update your $PATH (and $PYTHONPATH if applicable) with $SU2_RUN Based on the input to this configuration, add these lines to your .bashrc file: export SU2_RUN=/usr/local/bin export SU2_HOME=/home/michalish/SU2 export PATH=$PATH:$SU2_RUN export PYTHONPATH=$PYTHONPATH:$SU2_RUN Use './ninja -C build install' to compile and install SU2 Build targets in project: 18 Found ninja-1.9.0.git at /home/michalish/SU2/ninja
As seen from above, although the mkl library is installed for some reason it says that



Code:
Run-time dependency mkl-static-lp64-seq found: NO (tried pkgconfig and cmake)
This does not stop the building procedure, so when I compile/install using ninja it goes over the 795 files, however I have the suspicion that it does not compile the library. As a result when I run the tutorials it does not find the mkl libraries.



I would greatly appreciate any form of advise and I apologize if this is a rookie mistake but I am a recent user of both SU2 and Linux. Thank you in advance
michalish is offline   Reply With Quote

Old   February 28, 2020, 06:56
Default
  #2
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 104
Rep Power: 4
pcg is on a distinguished road
Hi

I updated the documentation for this yesterday https://su2code.github.io/docs_v7/Bu...2-Linux-MacOS/

That message just means that meson did not find the library via pkg-config and so it reverted to the path in -Dmkl_root and it found the required libraries there otherwise the build would have failed.

Now what you need is for the operating system to know where the libraries are, do:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64
before running SU2 or simply add it to the .bashrc file.

Couple of additional clarifications:
It is either MKL or OpenBLAS, not both at the same time, MKL takes precedence.
We don't compile any of the BLAS dependencies, we just link against them.

Cheers
pcg is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 00:44.