Intel OneApi 2024 Support!

51 views (last 30 days)
Abdelrahman
Abdelrahman on 15 Jan 2024
Answered: Pratyush on 15 Jan 2024
Hi Everyone,
Checking the supported compilers by MATLAB, Intel OneAPI for Frotran 2024 is not yet supported. Intel provides only the latest release for download, which is the 2024 version. Any hints on how to edit some files in MATLAB that may enable the recognition of the latest Intel OneAPI release?

Answers (2)

Hassaan
Hassaan on 15 Jan 2024
Edited: Hassaan on 15 Jan 2024
@Abdelrahman Disclaimer. Try/use at your own risk.
If MATLAB does not officially support the Intel OneAPI Fortran 2024 compiler, there is no straightforward, supported method to enable compatibility. Altering MATLAB's internal files to force compatibility is generally not recommended as it can lead to unexpected behavior of the software and might violate MathWorks' terms of service.
However, users sometimes find workarounds for such issues by creating symbolic links or aliases for the compiler executable, renaming directories, or editing MATLAB's mex configuration files to point to the new compiler. This is done at your own risk and is not officially supported.
Here’s a general outline of how some users attempt this:
  1. Locate MATLAB's Compiler Configuration Files: These files are typically found in the mex folder within your MATLAB installation directory. Look for XML files with names that correspond to supported compilers.
  2. Edit the Configuration File: You might attempt to copy an existing configuration file for a previously supported version of the Intel compiler and then modify the file paths and names to point to the Intel OneAPI 2024 compiler executable and libraries.
  3. Symbolic Links: Some users create symbolic links in their system to make MATLAB recognize the new compiler as if it were a supported one. This would involve creating a symlink from the expected compiler executable to the actual OneAPI executable.
  4. Use mex -setup: After editing the configuration file, you might need to run mex -setup in MATLAB to select the newly configured compiler.
  5. Test Thoroughly: If MATLAB appears to recognize the compiler, test it thoroughly with some simple code before relying on it for important work.
Before attempting any such modifications, you should:
  • Backup: Always make backups of any files you are going to edit so you can restore them if necessary.
  • Check for Updates: Sometimes MathWorks releases updates that add support for new compilers. Ensure you have the latest updates or patches for MATLAB.
  • Consult the Community: Check MATLAB Central or other user forums to see if others have found a solution.
  • Contact MathWorks Support: They may provide guidance or an estimated timeline for official support.
Please be aware that any such alterations are at your own risk and are not guaranteed to work. It's always best to use a supported compiler or wait until MathWorks provides official support for the Intel OneAPI Fortran 2024 compiler.
---------------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.

Pratyush
Pratyush on 15 Jan 2024
Hi Abdelrahman ,
I understand that you want to use Intel OneAPI for Frotran 2024 which is not supported by MATLAB yet. It is important to note that modifying MATLAB's internal files to support an unsupported compiler is not officially recommended and may lead to unpredictable behavior or instability in MATLAB, choose to experiment with such modifications at their own risk.
MATLAB uses XML files to define the settings for supported compilers. These files are typically located in a directory such as:
MATLABROOT\bin\win64\mexopts
where MATLABROOT is the root directory of your MATLAB installation.
Before making any chnages it is suggested to make a backup of original XML file.
Look for the XML file that corresponds to the Intel Fortran compiler. It might be named something like intel_fortran.xml or similar. Open this file in a text editor with administrative privileges.
You'll need to modify the file to point to the locations of the Intel OneAPI Fortran 2024 compiler binaries, libraries, and include files. This will involve updating paths, version numbers, and possibly other settings to match the new compiler's specifications.
Pay particular attention to elements such as:
  • compilerName
  • compilerVersion
  • location (for various tools like the compiler, linker, etc.)
  • libraries and include directories
These steps are speculative and not guaranteed to work. It's also possible that even if you can get MATLAB to recognize the new compiler, other compatibility issues may arise due to changes in the compiler software that are not accounted for in MATLAB's MEX infrastructure.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!