On the adventures of trying to compile Blaze on Windows 10

Issue #395 new
MK created an issue

Hi all!

I fully admit, that I might not be 100% knowledgeable in terms of building/compiling sources using cmake or vcpkg, but since I encountered many issues that might also be road blocks for other potential blaze users, I thought I might open an issue to shed lights on some of the issues that I’ve encountered trying the use Blaze on Windows.

Prerequisite Libraries: I have installed Intel MKL (the current oneAPI version), which - as far as I see - should provide the necessary BLAS & LAPACK implementations. For compilation I’m using the current version of Visual Studio 2019.

Attempt 1: Using vcpkg

Simply using .\vcpkg install blaze seemed to work at first glance, but when trying the compile the first “Getting started” example, I’ve encountered a lot of compiler errors (alleged redefinitions in Limits.h for example).

Next I used .\vcpkg install blaze:x64-windows just to see what would happen if I used the 64bit variant (not that this option would be explained anywhere). Somehow the examples where now compiling just fine and running. However, they were all running on one CPU core only, so I guess that BLAS wasn’t found correctly during installation or something.

Attempt 2: Using cmake-windows

Using cmake-windows it also immediately complains about not finding the BLAS libraries and so cmake won’t configure:

CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBLAS.cmake:971 (find_package_handle_standard_args)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindLAPACK.cmake:213 (find_package)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindLAPACK.cmake:239 (_lapack_find_dependency)
CMakeLists.txt:76 (find_package)

Browsing through the other issues on the board I only found some other issue, where a user complained, that not finding a BLAS library shouldn’t actually stop cmake from configuring, since BLAS is “optional”, but I haven’t found a way to tell cmake where the BLAS libraries are. I might be a spoiled windows user, but somehow I thought that a fresh install of the Intel MKL into its default locations should be something that is easily found by the configuration routine.

I’m sorry for the rant, but I would really like to use the Blaze libraries for my project and - so far - the installation processes seems to be rather painful for potential users who haven’t been dipping all to much into the details of cmake etc. I think it would be a shame if things like that would also deter other users like me from what appears to be a very intuitive library.

Comments (1)

  1. Klaus Iglberger

    Hi Markus!

    Thanks a lot for taking the time to describe your experience about using Blaze on Windows. We appreciate any help, even tough it may come in form of a rant.

    In our defence, there is little we can do to improve the experience. The problems you experience are the usual hurdles developers face on the Windows platform when putting together different libraries/tools. We can just try to improve our documentation to point to further references.

    First, Blaze does not support Windows32 (as described on the project homepage under “Compiler Compatibility”). We should probably mention this in several more places. Second, we are no vcpkg experts either and so we were also not aware of the blaze::x64:windows switch. We appreciate the hint and will update the wiki accordingly. Third, we are not responsible for the CMake package to find BLAS installations. It might help if you create an issue for the CMake project and describe your experience. Fourth, in order to use the MKL in parallel you’ll have to link the MKL library containing the parallel kernels. CMake might select the serial kernels by default (for more information see here). However, it may also depend on the problem size you are trying to compute, because for small problems Blaze uses its own kernels (which may be significantly faster and which may or may not run in parallel). For details about the Blaze parallelization, please refer to the wiki.

    We appreciate your feedback and hope that after resolving all issues you’ll find Blaze to be very useful. In case you encounter any problems with Blaze itself, we would also appreciate feedback.

    Best regards,

    Klaus!

  2. Log in to comment