Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

threading issue in mkl_sparse_?_trsm

may_ka
Beginner
1,308 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
12 Replies
may_ka
Beginner
1,271 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

0 Kudos
ShanmukhS_Intel
Moderator
1,243 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

 

 

0 Kudos
may_ka
Beginner
1,228 Views

Hi,

 

here is the reproducer.

 

Best

0 Kudos
may_ka
Beginner
1,186 Views

Hi.

 

Any update on the issue?

0 Kudos
ShanmukhS_Intel
Moderator
1,171 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

 

0 Kudos
may_ka
Beginner
1,159 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

 

 

0 Kudos
may_ka
Beginner
1,152 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

0 Kudos
ShanmukhS_Intel
Moderator
1,059 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


0 Kudos
ShanmukhS_Intel
Moderator
832 Views



Hi Karl, 


As of now, mkl_sparse_set_sm_hint() doesn't support CSR format, and because of that SPARSE_STATUS_NOT_SUPPORTED was been returned from the function. We would like to inform you that it is not the supported configuration for mkl_sparse_set_sm_hint(), which would optimize for mkl_sparse_d_trsm().


Also, you could note that returning NOT_SUPPORTED from set_xyz_hint() doesn't mean that it crashes but currently it doesn't have optimize step for the configuration of the API, so you could continue the next step.  

For example, the reproducer can be finished normally if it doesn't throw the error message directly when the set_sm_hints() doesn't return SPARSE_STATUS_SUCCESS.


Could you please let us know if we could close the case at our end?


Best Regards,

Shanmukh.SS


0 Kudos
may_ka
Beginner
376 Views

Hi.

 

I have tried the same reproducer with oneapi 2023.2. Still the same issue.

 

Can you provide me with a configuration which does not lead "mkl_sparse_set_sm_hint()" to report "SPARSE_STATUS_NOT_SUPPORTED"?

 

Thanks

0 Kudos
ShanmukhS_Intel
Moderator
786 Views

Hi Karl,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Best Regards,

Shanmukh.SS


0 Kudos
Reply