Skip to content

Commit 5e78820

Browse files
committed
250731.015111.PDT correct try_mex_setup
1 parent 1f1c123 commit 5e78820

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/test_matlab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
if [[ "${{ matrix.matlab }}" = "R2020"* || "${{ matrix.matlab }}" = "R2021"* || "${{ matrix.matlab }}" = "R2022"* || "${{ matrix.matlab }}" = "R2023"* ]] ; then
153153
ONEAPI_VERSION=2023
154154
elif [[ "${{ matrix.matlab }}" = "R2024"* ]] ; then
155-
ONEAPI_VERSION=2025
155+
ONEAPI_VERSION=2024
156156
fi
157157
fi
158158
echo "ONEAPI_VERSION=$ONEAPI_VERSION" >> $GITHUB_ENV

matlab/setup_tools/try_mex_setup.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@
5656
% The first version of MATLAB that supports oneAPI 2024 on Windows is R2024a. Earlier versions
5757
% cannot locate the compiler due to the change of the directory structure, even if ONEAPI_ROOT
5858
% is set correctly.
59-
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest');
59+
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest', system_string);
6060
if ~exist(compiler_dir, 'dir')
61-
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest', system_string);
61+
compiler_dir = fullfile(oneapi_root, 'compiler', 'latest');
6262
end
63+
% Zaikun 20250731: Note that the above two definitions of compiler_dir cannot be exchanged, as
64+
% fullfile(oneapi_root, 'compiler', 'latest') is always a valid directory regardless of the
65+
% version of Intel oneAPI.
6366

6467
% Set PATH.
6568
compiler_bin = fullfile(compiler_dir, 'bin');

0 commit comments

Comments
 (0)