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

Bug in MKLConfig.cmake

JoeTodd
Beginner
1,561 Views

In MKLConfig.cmake, the compiler matching regexes:

 

 


if(CMAKE_CXX_COMPILER MATCHES ".*dpcpp[.exe]*")
set(DPCPP_COMPILER ON)
endif()
if(CMAKE_C_COMPILER MATCHES ".*clang*")
set(CLANG_COMPILER ON)
endif() 

 

aren't doing what they ought to. An optional .exe extension should be represented as:

".*dpcpp(\\.exe)?$"

and I believe that ".*clang*" would match any compiler path with "clan" somewhere in it.

0 Kudos
7 Replies
Viraj_M_Intel
Employee
1,544 Views

Hello JoeTodd,

Can you please share what you are trying to do? Some kind of an example will help us look into the problem in detail.

 

0 Kudos
JoeTodd
Beginner
1,515 Views

Hi Viraj,

 

I'm not really trying to do anything - I just noticed this bug & thought I ought to report it.

 

Joe

0 Kudos
ShanmukhS_Intel
Moderator
1,431 Views

Hello JoeTodd,

 

Thank you for posting on Intel Communities.

 

Based on the revised snippet shared by you(".*dpcpp(\\.exe)?$"), you mean a must .exe to be expected after dpcpp and it should not accept any character. However, as per the existing exe, (.*dpcpp[.exe]*) is accepts any of the mentioned characters within the braces. Could you please let me know if my understanding correct?

 

Best Regards,

Shanmukh.SS

 

0 Kudos
ShanmukhS_Intel
Moderator
1,400 Views

Hi,


Reminder:

Could you please let us know if our understanding is correct, so that we could proceed further on this case.


Best Regards,

Shanmukh.SS


0 Kudos
JoeTodd
Beginner
1,348 Views

Square brackets in a regular expression indicate a set of acceptable characters, *not* a group, which is what is intended here. For example:

 

"(\\.exe)?" would match zero or one instances of the string ".exe" at the end of a path - in other words it defines an optional .exe suffix

 

"[.exe]*" defines a set of characters ".", "e", "x", "e", and states that zero or more of these characters is acceptable. Furthermore, because the period is not escaped with \\, the "." character actually matches any character. This means that "[.exe]*" is actually equivalent to "[.]*". And given that the expression "[.exe]*" isn't followed by any other character/requirement, the entire "[.exe]*" is actually redundant, because it says "we are looking for zero or more of any character".

0 Kudos
ShanmukhS_Intel
Moderator
1,312 Views

Hi,


Thank you for sharing the concern. We are working on this internally. We'll get back to you soon with an update.


Best Regards,

Shanmukh.SS


0 Kudos
Khang_N_Intel
Employee
1,205 Views

Hi Joe,


The fix will be in oneMKL 2022.2. We will let you know when this release is launched.


Best regards,

Khang


0 Kudos
Reply