codeplaysoftware / portBLAS

An implementation of BLAS using the SYCL open standard.
Apache License 2.0
250 stars 48 forks source link

Could NOT find SystemBLAS (missing: SystemBLAS_LIBRARIES) while trying to cmake #511

Closed adi-lb-phoenix closed 5 months ago

adi-lb-phoenix commented 5 months ago

Hello , thank you for the repo as it is helping me explore different libraries related to HPC . so i was trying to build portBLAS to benchmark its performance on INTEL ARC GPU a770 .

info about the system I am building on

 uname -a
Linux *****  6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

packages I installed using guix :

guix package --list-installed
openblas        0.3.9   out     /gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9
ninja   1.10.0  out     /gnu/store/8cahi4cfqa86s2ny88hikyp4impyd083-ninja-1.10.0
lapack  3.9.0   out     /gnu/store/41rw9w35by4j8lbl85gi3xfiaf7zqykh-lapack-3.9.0
libomp  9.0.1   out     /gnu/store/rqdajf56w0rpzs5kknlsjihnig9xn0sp-libomp-9.0.1

other variables exported that are GPU related and compiler related .

source /opt/intel/oneapi/setvars.sh
export CC=/opt/intel/oneapi/2024.0/bin/compiler/clang
export CXX=/opt/intel/oneapi/2024.0/bin/compiler/clang++

commands executed to clone and get into the portBLAS directory

git clone --recursive https://github.com/codeplaysoftware/portBLAS.git
cd portBLAS
mkdir build
cd build

but on the execution of this cmake command i get an error

cmake -GNinja ../ -DSYCL_COMPILER=dpcpp -DDPCPP_SYCL_TARGET=spir64 -DTUNING_TARGET=INTEL_GPU -DCMAKE_BUILD_TYPE=Release

error :

-- Adding SYCL to target axpy_batch -- Adding INTEL_GPU backend to target reduction -- Tall and skinny Gemm support enabled for target reduction -- Gemm vectorization support enabled for target reduction -- Adding SYCL to target reduction -- Could NOT find Threads (missing: Threads_FOUND) CMake Warning at cmake/Modules/FindSystemBLAS.cmake:44 (message): openBLAS library was not found on your system Call Stack (most recent call first): test/CMakeLists.txt:5 (find_package)

-- Could NOT find Threads (missing: Threads_FOUND) -- Could NOT find Threads (missing: Threads_FOUND) -- Could NOT find Threads (missing: Threads_FOUND) -- Could NOT find Threads (missing: Threads_FOUND) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_CXX_FOUND CXX) CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find SystemBLAS (missing: SystemBLAS_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) cmake/Modules/FindSystemBLAS.cmake:70 (find_package_handle_standard_args) test/CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/aadithya.bhat/portBLAS/CMakeFiles/CMakeOutput.log". See also "/home/aadithya.bhat/portBLAS/CMakeFiles/CMakeError.log".

I have searched for systemBLAS on the web , but found no reference to it

below are 2 files present in the path

See also "/home/aadithya.bhat/portBLAS/CMakeFiles/CMakeError.log" CMakeError.log

See also "/home/aadithya.bhat/portBLAS/CMakeFiles/CMakeOutput.log". CMakeOutput.log

s-Nick commented 5 months ago

Hello @adi-bhatl-1998, Thank you for your interest in using portBLAS. From the log you attached, the cmake cannot find openBLAS or any other BLAS library used for testing. I invite you to add a suggestion to cmake where it can find it. You can do it by adding to the configuration the following flag: -DCMAKE_PREFIX_PATH=/path/to/OpenBLAS

adi-lb-phoenix commented 5 months ago

Hello @s-Nick Thank you for suggestions . It worked . Initially i used -DCMAKE_PREFIX_PATH=/gnu/store -DBLAS_LIBRARIES=/gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9/lib/libopenblasp-r0.3.9.so , it threw errors while running ninja . Later on changed it to -DCMAKE_PREFIX_PATH=/gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9 that resulted in error free build . Thank you