Page 1 of 1

Assertion Failed: pixels == info->pixels

Posted: 2016-07-05T10:10:06-07:00
by Pash91
Hello,
I compiled ImageMagick 7.0.2-2Q16 on Windows 10, Static Multi-threaded runtimes, 64 bit distribution, HDRI, OpenMP, OpenCL, Q16 and Studio 2015. Specifically, I wanted OpenCL support. I tried a simple resize of a 300 MB image from NASA and am getting the error:

Assertion Failed: pixels == info->pixels, file ..\..\ImageMagick\MagickCore\opencl.c line 1415. Is there a different/proper way to compile this with OpenCL?

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-07-05T11:16:55-07:00
by dlemstra
You are getting this assertion because your graphics card did something that we did not expect. Can you share a link to the image you used an that command that you executed?

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-07-05T11:27:14-07:00
by Pash91
Sure, the image is here: http://eoimages.gsfc.nasa.gov/images/im ... 600.B1.png

If it helps, I'm running a GTX 1080 with the 368.39 drivers and CUDA 8.0.27

Command: convert.exe world.topo.bathy.200407.3x21600x21600.B1.png -resize 25% a.png

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-07-05T14:20:58-07:00
by dlemstra
My current GPU does appear to use OpenCL with this image and switches to CPU. I will get a new card in a couple weeks that might be able to load it. I will give it another try then.

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-08-30T16:49:58-07:00
by Pash91
dlemstra wrote:My current GPU does appear to use OpenCL with this image and switches to CPU. I will get a new card in a couple weeks that might be able to load it. I will give it another try then.
I was wondering if you had a chance to try this again?

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-09-18T03:20:40-07:00
by dlemstra
I had time to test this again with the latest release and I am unable to reproduce your issue. On my machine it first tries to use the GPU but fails halfway during the conversion. It then switches to CPU resize and creates an image without any problems. Can you still reproduce the issue with the latest version?

Are you a developer who can build IM from source? This might help us track down the issue.

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-09-18T10:38:21-07:00
by Pash91
I'll try with the newest version, but shouldn't it not fail halfway? Mine didn't go anywhere as far as I can tell, but it doesn't seem like failing half way is the intended behavior.

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-09-18T11:40:05-07:00
by dlemstra
It can fail halfway when we are asking for too much memory from the card. This might not be the best behavior but it can happen and it is not considered a bug.

Re: Assertion Failed: pixels == info->pixels

Posted: 2016-09-23T14:49:06-07:00
by Pash91
I just tried it on the newest version and measured the performance against a version not compiled with OpenCL. Both finished, but they took the exact same amount of time 1Min32Sec. I'm hoping this suggest it's not using the GPU for some reason.