Multithreaded or not?
Posted: 2017-07-16T19:29:49-07:00
Hi all, I'm not a programmer, just a systems/networks person whom has been asked to determine whether or not our executable is using IM in a multithreaded way.
Our linux executable is all in C++ and calls various functions in libMagick++. Our executable itself starts 63 subthreads, which I believe is $NUMCPUS-1, since our server has 64 cores/threads. I have discovered that one can export MAGICK_THREAD_LIMIT=1 and that the IM command-line utilities will respect that. But what about when you code against libMagick++? Do you have to code in a certain way that declares the single-threaded use of those functions? Does libMagick++ have any intelligence to it at all, or is it just a bunch of routines that our app can pull in and run either concurrently or singly as a developer specifies? Again, our app multithreading=OK but one of our subthreads doing multithreading with IM=Awful.
I ask this because top management wants to isolate some errors on the belief that they are due to IM multithreading, but it is another hapless developer who would have to make code changes if that were the solution. Everyone wants me to find something simple like a switch or value that can be flipped.
I did an ltrace and found a bunch of entries like _ZN6Magick8GeometryC1Emmllbb and _ZNK6Magick5Image10constImageEv, but I don't know how to determine something useful from that.
Sorry if this is poorly worded, again, I know just little enough about the practice of development to be extremely dangerous to those working around me.
Our linux executable is all in C++ and calls various functions in libMagick++. Our executable itself starts 63 subthreads, which I believe is $NUMCPUS-1, since our server has 64 cores/threads. I have discovered that one can export MAGICK_THREAD_LIMIT=1 and that the IM command-line utilities will respect that. But what about when you code against libMagick++? Do you have to code in a certain way that declares the single-threaded use of those functions? Does libMagick++ have any intelligence to it at all, or is it just a bunch of routines that our app can pull in and run either concurrently or singly as a developer specifies? Again, our app multithreading=OK but one of our subthreads doing multithreading with IM=Awful.
I ask this because top management wants to isolate some errors on the belief that they are due to IM multithreading, but it is another hapless developer who would have to make code changes if that were the solution. Everyone wants me to find something simple like a switch or value that can be flipped.
I did an ltrace and found a bunch of entries like _ZN6Magick8GeometryC1Emmllbb and _ZNK6Magick5Image10constImageEv, but I don't know how to determine something useful from that.
Sorry if this is poorly worded, again, I know just little enough about the practice of development to be extremely dangerous to those working around me.