3 Replies Latest reply: Jan 9, 2013 5:15 PM by 916291 RSS

    Sunperf set num threads

    804536
      Hello:

      I'm new using the sunperf library and I have some minor questions about the way to set the number of threads to execute it in multicore environments. For example, with Intel MKL are valid both environment variables OMP_NUM_THREADS and MKL_NUM_THREADS and the API functions omp_set_num_threads() and mkl_set_num_threads(). With GotoBLAS the variables and functions from OpenMP are too valid plus GOTO_NUM_THREADS and goto_set_num_threads()

      And what about sunperf? I know OMP_NUM_THREADS and omp_set_num_threads() are valid but, exists any other variables or functions like SUNPERF_NUM_THREADS sunperf_set_num_threads() or similar?

      Thanks
        • 1. Re: Sunperf set num threads
          916291
          You can also use environment variable PARALLEL and function USE_THREADS and USING_THREADS (see the man pages for usages).

          Thanks.
          • 2. Re: Sunperf set num threads
            804536
            And the function USE_THREADS(), is an independent function or calls internally to omp_set_num_threads()? From http://docs.oracle.com/cd/E19422-01/819-3691/use_threads.html I understand that calls internally to the OpenMP function.

            And what about the variable PARALLEL? What is the order of precedence between OMP_NUM_THREADS and PARALLEL?

            Thanks
            • 3. Re: Sunperf set num threads
              916291
              USE_THREADS is a subroutine calling OMP_SET_NUM_THREADS with MAX(1,NTHREADS) as its argument. PARALLEL has the same function as OMP_NUM_THREADS. sunperf will look PARALLEL first. If found it will ignore OMP_NUM_THREADS. If not it will look for OMP_NUM_THREADS. If either is set, sunperf sees them as 1.

              Thanks.