Using the number of CPU cores instead of one

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
class3f
Posts: 6
Joined: 2013-07-22T06:41:21-07:00
Authentication code: 6789

Using the number of CPU cores instead of one

Post by class3f »

In one statement I make about 1,000 ImageMagick thumbnail images. The whole process takes about 70-80 seconds. After testing we found that IM uses 100% of one CPU core which causes delays. How to configure IM to use the two or three CPU cores?

My version:

Code: Select all

# identify -version
Version: ImageMagick 6.8.7-0 2013-10-07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib freetype jng jpeg png png tiff zlib
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using the number of CPU cores instead of one

Post by fmw42 »

Try recompiling with OpenMP enabled. That should be the default in your ./configure. You have to specify --disable-openmp to disable it or have set the environment variable for threads to 1 to have it disabled. Check your ./configure

see
http://www.imagemagick.org/script/archi ... hp#threads
http://www.imagemagick.org/script/resou ... nvironment

If it is enabled, it should show in your convert -version.
Post Reply