openmp - Imagemagick only uses one core -


i running ubuntu server 8 cores. imagemagick uses 1 single core.
running identify -version returns:

version: imagemagick 6.6.9-7 2012-08-17 q16 http://www.imagemagick.org copyright: copyright (c) 1999-2011 imagemagick studio llc features: openmp 

so openmp apparently needed multi threading enabled.

running benchmark -bench option (e.g. convert logo: -resize 500% -bench 10 logo.png) described here returns

performance: 10i 1.17647ips 14.390u 0.14166666666833332977:08.500 

it not return performance[1] through performance[8] described in manual makes me wonder.

any ideas how can imagemagick use 8 cores?

update: here strace output imagemagick call: http://pastebin.com/q0gc3k09

i able reproduce behavior on ubuntu 10.04. imagemagick apt-get seems have openmp feature, , configure -fopenmp flag, feature doesn't seem enabled. can verified running following line, , comparing "features" list (if present) various configuration flags.

identify -list configure | less 

i able resolve following article "installing imagemagick source on ubuntu 8.04" detailed following process.

  • remove imagemagick
  • install needed image/graphic dependency libraries through apt-get
  • download
    • wget http://www.imagemagick.org/download/imagemagick-6.8.6-6.tar.gz
  • follow basic ./configure, make, & sudo make install steps
  • export library path /usr/local/lib

this seems work openmp present under "features" list, , when execute convert logo: -resize 500% -bench 10 logo.png. see following

performance[1]: 10i 0.750ips 1.000e 18.750u 0:13.330 performance[2]: 10i 0.751ips 0.500e 18.660u 0:13.320 performance[3]: 10i 0.738ips 0.496e 18.840u 0:13.550 performance[4]: 10i 0.469ips 0.385e 19.560u 0:21.320 

and these results match expect.


Comments