"Trace/BPT trap: 5" when do resize() sometime. Only with: --with-opencl. MacOS X with NVidia GTX 980 G1.
Posted: 2017-08-19T07:06:56-07:00
I'm using:
I use following code for testes:
It works as expected!
I build with these flags:
But if I compile ImageMagick with the flag: --with-opencl + uncomment EnableOpenCL + run that program again I get following output:
Look at this. It happens with any images I tried. And yeah. When I build without opencl - the bug disappears. resize() sometime doesn't work and sometime work. And looks like my GPU doesn't work in ANY time when I use Magick::EnableOpenCL(); and compile imagemagick with opencl support. Looks it doesn't work for me
Why does it happen to be?
Code: Select all
Mac OS X 10.12.5
NVidia GTX 980
CUDA-Z sees my GPU without any problem.
$ magick --version
Version: ImageMagick 7.0.6-7 Q16 x86_64 2017-08-12 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:46_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
Code: Select all
#include <Magick++.h>
#include <iostream>
int main( int argc, char **argv ) {
Magick::InitializeMagick( *argv );
//Magick::EnableOpenCL(); // When I build with: --with-opencl flag I uncomment this line!
Magick::Image image( "data/images/1.png" );
for ( unsigned int i = 0; i < 10; i++ ) { // yeah, ten times, why not? :)
std::cout << "\t" << i << ":\n";
image.resize( "30x30!" );
}
std::cout << image.columns() << "x" << image.rows() << "\n";
return 0;
}
I build with these flags:
Code: Select all
$ Magick++-config --cppflags --cxxflags --ldflags --libs
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/Cellar/imagemagick/7.0.6-7/include/ImageMagick-7
-DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/Cellar/imagemagick/7.0.6-7/include/ImageMagick-7
-L/usr/local/Cellar/imagemagick/7.0.6-7/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
-L/usr/local/Cellar/imagemagick/7.0.6-7/lib -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
Code: Select all
$ for i in {1..20}; do ./test-image-magick.o; done;
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
Trace/BPT trap: 5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
Trace/BPT trap: 5
0:
Trace/BPT trap: 5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
Trace/BPT trap: 5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
Trace/BPT trap: 5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
Trace/BPT trap: 5
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
30x30
Why does it happen to be?