multipage tiff split: libgomp: Thread creation failed ...

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
macias
Posts: 28
Joined: 2008-12-10T13:44:19-07:00

multipage tiff split: libgomp: Thread creation failed ...

Post by macias »

I try to convert multipage tiff file into single files. No problem with relatively small source file, but when the file is getting bigger convert fails with the message:

libgomp: Thread creation failed: Resource temporarily unavailable

Tiff file is ok, I can read it using Gimp and extract single pages one by one. And here is also maybe my wish to this bug. From what I see I understand IM/convert creates a lot of temporary files, around 70MB per file (single "frame", "page"), and then tries to "convert" them. Such approach will eventually kill every computer -- if possible please convert each frame within tiff one by one. This allows manipulation in memory (70MB is ok for every computer) and faster execution.

ImageMagick-6.5.2-7
libgomp44-4.4.0_20090508-2.1
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: multipage tiff split: libgomp: Thread creation failed ...

Post by magick »

You can convert one frame at a time yourself. For example:
  • convert 'image.tif[15]' image-15.jpg
Set MAGICK_THREAD_LIMIT to 1 to reduce the number of threads ImageMagick consumes or build ImageMagick with --disable-openmp to disable threading completely.
macias
Posts: 28
Joined: 2008-12-10T13:44:19-07:00

Re: multipage tiff split: libgomp: Thread creation failed ...

Post by macias »

Thank you very much for the information. The only solution for me is splitting one by one, because with env. variable set to = 1 or with rebuild of IM, I still encounter problem with computer resources:
* computer is nearly frozen
* a lot of temporary files are created

At the end convert was killed (by kernel I assume). This happened also when threads were active (with previous, default, settings).
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: multipage tiff split: libgomp: Thread creation failed ...

Post by magick »

Add '-limit area 1' to your command line as the first option. Its possible the TIFF delegate library is consuming loads of memory. It depends on the characteristics of your TIFF image.
Post Reply