I think I found the issue with FT problems. Recreated it from command line:
convert square31.png +fft tmp5.pfm
Then doing inverse transform a number of times, from the command line:
convert tmp5.pfm +ift test5.png
convert tmp5.pfm +ift test5.png
convert tmp5.pfm +ift test5.png
convert tmp5.pfm +ift test5.png
convert tmp5.pfm +ift test5.png
Assertion failed: (id < (ssize_t) cache_view->number_threads), function GetCacheViewVirtualPixels, file magick/cache-view.c, line 690.
It looks like I start to get Assertion failed errors on a random basis. Sometimes it works, sometimes not. No law.
Version: ImageMagick 6.6.3-9 2010-08-31 Q32 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: HDRI OpenMP
Darwin iMac-24.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
(Mac OS X 10.6.4)
Here is the link to the original image:
http://www.bcsatellite.net/bao/square31.png
It seems like I am not getting these errors when I am doing -ift. I also did quite a few 'convert square31.png +fft +ift test2.png' and 'convert square31.png -fft -ift test1.png' commands and they all went fine. But it is difficult to tell for sure as the problem is sporadic.
Thank you!
Assertion failed during inverse Fourier transforms
Re: Assertion failed during inverse Fourier transforms
You have a buggy OpenMP implementation. Rebuild ImageMagick without OpenMP support. Add --disable-openmp to your configure script command line. Now recompile and reinstall ImageMagick.
We tried your command over 10,000 times on our 8 processor Fedora Core 13 system with ImageMagick 6.6.4-0 and all the processes completed without complaint.
We tried your command over 10,000 times on our 8 processor Fedora Core 13 system with ImageMagick 6.6.4-0 and all the processes completed without complaint.
Re: Assertion failed during inverse Fourier transforms
Thanks, Magick.
Trying to configure:
$ ./configure --disable-openmp --enable-hdri=yes --with-quantum-depth=32
However, it fails to get OpenMP out. From config.log:
FEATURES = HDRI OpenMP
CONFIGURE_ARGS='./configure '\''--disable-openmp'\'' '\''--enable-hdri=yes'\'' '\''--with-quantum-depth=32'\'''
MAGICK_FEATURES='HDRI OpenMP '
I've done 'make clean' before configuring. Any ideas?
Trying to configure:
$ ./configure --disable-openmp --enable-hdri=yes --with-quantum-depth=32
However, it fails to get OpenMP out. From config.log:
FEATURES = HDRI OpenMP
CONFIGURE_ARGS='./configure '\''--disable-openmp'\'' '\''--enable-hdri=yes'\'' '\''--with-quantum-depth=32'\'''
MAGICK_FEATURES='HDRI OpenMP '
I've done 'make clean' before configuring. Any ideas?
Re: Assertion failed during inverse Fourier transforms
The new autoconf / automake macro's seem to have broken the code to disable OpenMP. In the mean-time, edit magick/studio.h and comment out MAGICKCORE_OPENMP_SUPPORT:
- /* # define MAGICKCORE_OPENMP_SUPPORT 1 */
Re: Assertion failed during inverse Fourier transforms
Is it OK if OpenMP still shows in the Features section of identify -verbose? (Compiled with the MAGICKCORE_OPENMP_SUPPORT commented.)
Re: Assertion failed during inverse Fourier transforms
Yes. We have the problem fixed in ImageMagick 6.6.4-1 beta.
Re: Assertion failed during inverse Fourier transforms
Thank you.
By the way, I do not know if this is of any use for you, but there is no such issue when I am doing inverse transform of a magnitude/phase pair. This only happens with real/img pairs. I finally decided to deconvolve in non-HDRI mode with a mag/phase pair for not to loose any performance. Seems to work.
Max
By the way, I do not know if this is of any use for you, but there is no such issue when I am doing inverse transform of a magnitude/phase pair. This only happens with real/img pairs. I finally decided to deconvolve in non-HDRI mode with a mag/phase pair for not to loose any performance. Seems to work.
Max
Re: Assertion failed during inverse Fourier transforms
Try changing magick/fourier.c around line 1054 to:
It seems unlikely it will fix the problem but we can not spot any other code that looks suspect.#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp critical (MagickCore_InverseFourierTransform)
#endif
{
fftw_c2r_plan=fftw_plan_dft_c2r_2d(fourier_info->width,fourier_info->height,
fourier,source,FFTW_ESTIMATE);
fftw_execute(fftw_c2r_plan);
fftw_destroy_plan(fftw_c2r_plan);
}
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Assertion failed during inverse Fourier transforms
FYI,
I have not been able to make it fail on my (one processor) Mac OSX Tiger IM 6.6.4.0 Q16 HDRI with this config file:
./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-delegate-build --enable-shared --disable-static \
--with-modules --with-quantum-depth=16 --enable-hdri --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr
convert -version
Version: ImageMagick 6.6.4-0 2010-09-05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: HDRI
I have not been able to make it fail on my (one processor) Mac OSX Tiger IM 6.6.4.0 Q16 HDRI with this config file:
./configure CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' \
--enable-delegate-build --enable-shared --disable-static \
--with-modules --with-quantum-depth=16 --enable-hdri --with-gslib --without-wmf \
--disable-silent-rules --disable-dependency-tracking \
--with-gs-font-dir=/opt/local/share/ghostscript/fonts/ --with-lqr
convert -version
Version: ImageMagick 6.6.4-0 2010-09-05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: HDRI