OpenMP issue seen with loadable modules on Ubuntu

Bob Friesenhahn <[email protected]> Sat, 23 Dec 2017 18:25:35 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.announce
Message-ID <[email protected]>
Today I noticed that a '--with-modules' build of GraphicsMagick was 
not passing the test suite under Ubuntu Linux.  In fact, it was 
failing badly.  This was in conjunction with the 
'--enable-openmp-slow' option which surely hardly anyone uses.

The '--enable-openmp-slow' option happens to enable OpenMP when 
reading the DPX and PNM formats, both of which are used in the test 
suite.

There is still one module called 'identity' which uses OpenMP if it is 
enabled at all.

These problems are not observed to occur on Solaris based systems. 
They also do not occur for Ubuntu builds which use '--enable-shared' 
but not '--with-modules'.

It seems like OpenMP is confused when it is in a loaded module.  I am 
able to make this visibly evident with this test:

   export GOMP_CPU_AFFINITY=1,2,3,4
   % gm convert identity:5 null:
   OMP: Warning #123: Ignoring invalid OS proc ID 2.
   OMP: Warning #123: Ignoring invalid OS proc ID 3.
   OMP: Warning #123: Ignoring invalid OS proc ID 4.

If someone is aware of the cause of this issue, please make me aware 
of it.  Otherwise, be aware to always run the test suite and that the 
'identity' module may have a problem for some modules builds.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot