Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • kris_nagarOctober 6, 2011 11:13 PM PDT   
    MKL Threads- BLAS level 2 routines

    Multithreading does not seem to work in my program where I am using mkl_dcsrmv subroutine to multiply large sparse matrices. I have tried using "mkl_set_num_threads(num_threads)" to set the number of threads to be used. The program gives correct output but the performance doesn't change as I change the number of threads.
    According to mkl manual, mkl version >10.0 should maximum possible number of threads on processor, but that does not seem to be the case.
    Platform: Intel Xeon E5520 (4 cores/8 threads).
    #include "omp.h"
    ...
    ...
    mkl_dcsrmv("N", &M, &N, &alpha, "G**C", val, (int *)col, (int *)ptr, (int *)ptre, vec_aligned, &alpha, y_vec);
    ...
    Compile:
    icc -mkl -I /opt/intel/Compiler/11.1/069/mkl/include/ -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread <source_files> <object_files> -o run_mkl
    Is mkl_dcsrmv a threaded routine?


    Gennady Fedorov (Intel)October 7, 2011 5:36 AM PDT
    Rate
     
    MKL Threads- BLAS level 2 routines

    1)Yes, this routine is threaded internally, but the main question what the scalability numbers are you expecting to see? 

    In the mostly cases, for the sparse matrixes, these are the cache and memory bandwidth problems.

    2)Please see here how to link MKL more properly



    TimP (Intel)October 7, 2011 6:35 AM PDT
    Rate
     
    MKL Threads- BLAS level 2 routines

    In addition to what Gennady said, you might find it interesting (if using dynamic libiomp) to set
    LD_PRELOAD=<mkl_installation_path>/libiompprof5.so
    and look at the guide.gvs file generated.

    kris_nagarOctober 9, 2011 11:00 AM PDT
    Rate
     
    MKL Threads- BLAS level 2 routines

    Thanks both of you for the reply. 
    I expect a speedup of 3-4x when going from serial to multithreaded code. And I am using matrices of size 8mx8m with 118 million entries.
    From the guide.gvs file, I found that my program is not using 8 threads even when I try to set the threads manually.
    I have another program where I use sgemm routine to multiply dense matrices. And that code uses multithreading. I am using the same settings and platform for both the programs.
    Thanks again!


    kris_nagarOctober 11, 2011 1:20 PM PDT
    Rate
     
    MKL Threads- BLAS level 2 routines

    Finally got it working.. I just updated the icc version and now its invoking all the threads available.

Forum jump:  

Intel Software Network Forums Statistics

17,025 users have contributed to 48,319 threads and 172,758 posts to date.

In the past 24 hours, we have 11 new thread(s) 54 new posts(s), and 47 new user(s).

In the past 3 days, the most popular thread for everyone has been Optimalization of sine function\'s taylor expansion The most posts were made to Most likely, the issue is that The post with the most views is Optimalization of sine function\'s taylor expansion

Please welcome our newest member redfruit83


For more complete information about compiler optimizations, see our Optimization Notice.