2 Replies Latest reply on Aug 13, 2012 5:00 PM by chrislott

    Limit number of threads created by multi-processing ACML v4.4?


      All, I'm using the multi-processor version of ACML version 4.4 with Octave 3.6.2.  This is on a 64bit linux machine with multiple processors and multiple cores per processor. When octave is run on a large problem such as computing a SVD, the ACML library happily starts many threads, in fact it starts as many threads as there are cores!  (Digression: the machine lies about the number of cores due to the Intel hyper-threading feature, but never mind that for now.) 


      How can I limit the number of threads created? We would like to allocate about half of the machine to other tasks. 


      I found this doc that discusses allocation of memory chunks, and how environment variables can limit the number of chunks and the size of each chunk.  Is that related?



      Please advise, thanks in advance!

        • Re: Limit number of threads created by multi-processing ACML v4.4?

          You can set OMP_NUM_THREADS to how many threads you want.


          We discuss this very briefly in the section on performance examples.  It seems we assume you are familiar with OpenMP.   The various compilers will document this better than we have, along with the environment variables they honor (which of course will depend on which compiler you are using).  These can be used also to control affinity, which you may find useful if you are trying to limit the Octave application to part of the machine.


          The documentation for FAST_MALLOC and memory usage is not directly related to what you are asking about.