Mon 15 Dec 2014 04:09:38 PM UTC, original submission:
I created a small wrapper experiment around CUBLAS which I want to use with Octave. Therefore I picked up the NETLIB BLAS implementation and replaced the dgemm.f file ( Which implements the double precision matrix-matrix multiply) by the following C code:
The I wrote the real wrapper as a second shared object in order to be able to replace it easily without relinking or LD_LIBRARY_PATH stuff. This looks like
And is compiled using "gcc -shared -O2 -o libblastest_dgemm.so -lcublas -lcudart". I integrated my the whole thing using update-alternatives into my Ubuntu system. If I then run programs that use the dgemm call everything works fine and faster than on the CPU for large data sets. Only one application does not work as well and run into a deadlock. If I run GNU Octave it hangs after displaying its copyright information. Interrupting octave with GDB I got the following backtrace:
I think the problem may the fact that the `libcuda.so` from the driver is as well loaded via dlopen from the libcudart library. But I do not know how to fix this. Any suggestions how I can fix this problem while keeping my dlopen approach?
The whole source of the BLAS library is available at: http://www-e.uni-magdeburg.de/makoehle/blas_test.tar.gz (Also attached) The `make install` target also includes the setup of update-alternatives on Debian-like systems.
Use hard and software:
- Ubuntu 14.04.1 (amd64) with gcc 4.8.2 and glibc 2.19
- CUDA 6.5, Driver 340.29
- GNU Octave 3.8.1
- GeForce GTX 580
|