Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

threading issue in mkl_sparse_?_trsm

may_ka
Beginner
448 Views

Hi.

 

I cannot get mkl_sparse_?_trsm to work using multiple cores.

 

I tried the following

  • directly call mkl_sparse_?_trsm
  • first call mkl_sparse_sv_hint, then mkl_sparse_?_trsm
  • first call mkl_sparse_sv_hint, then mkl_sparse_optimize, then mkl_sparse_?_trsm

 

For the first trial, mkl_sparse_?_trsm does appears to be using only one core.

For the second two trials it appears as if mkl_sparse_?_trsm goes into multicore mode for some second, then falls back to single core where it remains for the better of 95% of the processing time.

 

The core usage was observed in "top".

The total mkl_sparse_?_trsm operation time was about 50 seconds.

The results were correct.

 

It is unlikely to be an issue with compiler flags or linking as all other Inspector Executor operations work nicely on multiple cores.

 

System: Linux, kernel version 6.0.6

MKL: one ape 2021.2.0

 

Any ideas?

0 Kudos
9 Replies
Kirill_V_Intel
Employee
425 Views

Hi!

 

Use mkl_sparse_set_sm_hint https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/blas-... (instead of sv hint you use)?

 

Best,
Kirill

may_ka
Beginner
411 Views

Hi.

 

thanks for the advice.

 

Unfortunately I get a SPARSE_STATUS_NOT_SUPPORTED error from "mkl_sparse_set_sm_hint"

The sparse matrix has structure:

 

 

 

 type is SPARSE_MATRIX_TYPE_TRIANGULAR
 mode is SPARSE_FILL_MODE_UPPER
 diag is SPARSE_DIAG_NON_UNIT

 

 

 

The number of right-hand sides is 100, the number of calls is 10.

 

The sparse matrix is in CSR format. The layout of the dense matrix is SPARSE_LAYOUT_COLUMN_MAJOR.

 

Any idea?

 

Thanks

ShanmukhS_Intel
Moderator
383 Views

Hi Karl,

 

Thanks for posting on Intel Communities.

 

Could you please share with us a sample reproducer/ project file and steps(if any) as it helps us in triaging the issue better?

 

Best Regards,

Shanmukh.SS

 

 

may_ka
Beginner
368 Views

Hi,

 

here is the reproducer.

 

Best

may_ka
Beginner
326 Views

Hi.

 

Any update on the issue?

ShanmukhS_Intel
Moderator
311 Views

Hi Karl,

 

Unfortunately I get a SPARSE_STATUS_NOT_SUPPORTED error from "mkl_sparse_set_sm_hint"

>> This error results when the current implementation doesn't cover the set of input options provided by you.

 

Thanks for sharing the source code. We have tried executing the same, however, we are facing issues while running the shared source code. Attached is the error screenshot for your reference. In addition, we would like to recommend you use the latest oneAPI environment.

 

Could you please get back to us with an updated error-free source code so that we could help you triage the issue? 

 

Apologies for the delay in response.

 

Best Regards,

Shanmukh.SS

 

may_ka
Beginner
299 Views

Hi.

 

so the problem is to_string?? not sure why. to_string is part of C++11 already!

 

https://en.cppreference.com/w/cpp/string/basic_string/to_string

 

 

may_ka
Beginner
292 Views

@ShanmukhS_Intel wrote:

Hi Karl,

 

we would like to recommend you use the latest oneAPI environment.

 

Apologies for the delay in response.

 

Best Regards,

Shanmukh.SS

 


The problem persists in version 2022.2.1.

 

Best

ShanmukhS_Intel
Moderator
199 Views

Hi Karl,


Thanks for reporting this issue. We were able to reproduce it in our environment and we have informed the development team about it.


Best Regards,

Shanmukh.SS


Reply