Hi *,
developing OpenCL on Linux (on NVIDIA) certainly feels like Cinderellas’ bad part of life.
No IDE, no Debugger, no nothing.(*) Dancing blindfolded in a mine field.
NVIDIA certainly makes it abundantly clear, OpenCL is an unwanted child.
Well - I’m stuck with a Nvidia GPU in my notebook and I certainly cannot tear it out and replace by something else. I also most certainly will NOT program in CUDA, as I need a cross-vendor GPU accelerated computing executable.
So what are my options? The forum. ;-)
Let’s start with my normal mode of R&D operation. I use emacs for typing in the program, then I use make and gcc to translate the program. Because I make no programming errors :-D, all works fine and happily ever after - I do not even need a gdb.
Enter Nvidia-OpenCL:
*** Error in `oclprog': double free or corruption (out): 0x000000000333a440 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x722ab)[0x7f164bc492ab]
/usr/lib/libc.so.6(+0x7890e)[0x7f164bc4f90e]
/usr/lib/libc.so.6(+0x7911e)[0x7f164bc5011e]
/usr/lib/libnvidia-opencl.so.1(+0xd11b0)[0x7f162b0b81b0]
/usr/lib/libnvidia-opencl.so.1(+0xb59f5)[0x7f162b09c9f5]
/usr/lib/libnvidia-opencl.so.1(+0xb5dd7)[0x7f162b09cdd7]
/usr/lib/libnvidia-opencl.so.1(+0xd78ba)[0x7f162b0be8ba]
/usr/lib/libnvidia-opencl.so.1(+0xce250)[0x7f162b0b5250]
/usr/lib/libnvidia-opencl.so.1(+0xce6d0)[0x7f162b0b56d0]
/usr/lib/libOpenCL.so.1(clEnqueueNDRangeKernel+0x62)[0x7f164bf836d2]
oclprog[0x401b8e]
/usr/lib/libc.so.6(__libc_start_main+0xf1)[0x7f164bbf7511]
oclprog[0x4021aa]
======= Memory map: ========
00400000-0043b000 r-xp 00000000 103:05 5386509
Sometimes it’s the libnvidia-opencl, sometimes it’s the compiler, sometimes it’s the “double free or corruption” sometimes it’s a “corrupted double linked list”. As I said: minefield.
Yes, the hardware (Quadro M2000M in a Lenovo P50) is ok. Yes, the program is ok. Actually everything was ok until the kernel grew a little bit more complex a week ago. Then both compiler and executables started to exhibit very weird behavior. I guess I’m hitting some hidden limit but becuase there is no sane error message I cannot be sure.
My software may be a little bit recent:
CUDA 8.0.61
gcc 6.3.1
glibc 2.25
nvidia 378.13
@Arch Linux
Now I wonder: What can I do to exit this nightmare called OpenCL@NVIDIA development I’ve been experiencing for the past week? And so you know what I mean with nightmare:
if (memcmp((uchar*)sha256_in32,(uchar*)sha256_in64)) {
//printf("Not same!\n");
}
sha256_u(sha256_in64, sha256_out);
ripemd160_transform(sha256_out, ripemd160_out);
if (bloom_chk_hash160(bloom, ripemd160_out)) {
printfind(ripemd160_out, 'u', privkey, idx);
}
works. If I remove the printf comment → segmentation fault. (other printfs work)
If I do
if (memcmp((uchar*)sha256_in32,(uchar*)sha256_in64)) {
//printf("Not same!\n");
sha256_u(sha256_in64, sha256_out);
ripemd160_transform(sha256_out, ripemd160_out);
if (bloom_chk_hash160(bloom, ripemd160_out)) {
printfind(ripemd160_out, 'u', privkey, idx);
}
}
segmentation fault. If I do
if (memcmp((uchar*)sha256_in32,(uchar*)sha256_in64)) {
//printf("Not same!\n");
}
else {
sha256_u(sha256_in64, sha256_out);
ripemd160_transform(sha256_out, ripemd160_out);
if (bloom_chk_hash160(bloom, ripemd160_out)) {
printfind(ripemd160_out, 'u', privkey, idx);
}
}
segmentation fault. It’s a friggin’ nightmare!