0

I am trying to run the example samples/sgemm.cpp from the CLBlast repo on Windows 10 with a Nvidia graphics card. I have obtained the cl.hpp from the link. The makefile is simply as follows:

a.exe: sgemm.cpp
    g++ sgemm.cpp -lopencl -clblast -O0 -g -DCL_TARGET_OPENCL_VERSION=300

I have the Nvidia CUDA toolkit v11.6 installed and the include directory is on the environment variable CPATH so that it is found by g++. Furthermore, the compiler is part of a Mingw-w64 installation on which clblast is installed.

The problem is that the compilation seems to succeed, but as soon as I try executing the a.exe it crashes without any error message. Similarly, attaching gdb does not help either, because the program exits immediatedly and gdb prints

During startup the program exited with code 0xc0000135.

What is the problem?

Update

I have opened an issue on the clblas github. Note that I can compile clinfo from here without problems. A missing library therefore should not be the first thing that comes to my mind.

HerpDerpington
  • 3,751
  • 4
  • 27
  • 43
  • 2
    That error from gdb is a DLL not found error – talonmies Apr 25 '22 at 13:15
  • @talonmies The solution presented there does NOT solve the problem. Even if some dll is missing (and it does not seem that this error code is actually documented somewhere by gdb) then how do I find out what is missing? – HerpDerpington Apr 25 '22 at 13:45
  • 1
    Try compilimg with this command here: https://stackoverflow.com/a/71928511/9178992 – ProjectPhysX Apr 25 '22 at 14:07
  • 1
    @ProjectPhysX That does not seem to solve the issue. The include files are on CPATH and the libaries are on LIBRARY_PATH. `ldd a.exe` can also resolve all dlls. – HerpDerpington Apr 25 '22 at 14:26
  • 1
    The issue was an incompatibility between the dll installed by pacman and g++, but NOT a missing dll. I can give a more detailed answer if the question is reopened. Building clblast from source solved it. – HerpDerpington Apr 26 '22 at 12:38

1 Answers1

0

To answer this, this was not a problem with gdb, a.exe or the CUDA toolkit but rather with the installed library which is build with Visual Studio. The resulting binary seems to be incompatible with g++. Therefore, installing the library from source using g++ fixed this.

HerpDerpington
  • 3,751
  • 4
  • 27
  • 43