Skip to content

Commit 8321d57

Browse files
committed
250720.160053.PDT fix MATLAB R2025a bug for classical COBYLA
1 parent 36d6c41 commit 8321d57

File tree

11 files changed

+533
-13
lines changed

11 files changed

+533
-13
lines changed

.github/workflows/test_matlab.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,21 @@ jobs:
4141
matlab: R2021a
4242
- os: windows-latest
4343
matlab: R2021b
44+
- os: windows-latest
45+
matlab: R2022a
46+
- os: windows-latest
47+
matlab: R2022b
4448

4549
- os: windows-2025
4650
matlab: R2020b
4751
- os: windows-2025
4852
matlab: R2021a
4953
- os: windows-2025
5054
matlab: R2021b
55+
- os: windows-2025
56+
matlab: R2022a
57+
- os: windows-2025
58+
matlab: R2022b
5159

5260

5361
steps:

fortran/classical/cobyla/cobyla.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ subroutine calcfc_internal(x_internal, f_internal, constr_internal)
465465
& matprod(Aeq_loc, x_internal) - beq_loc, beq_loc - matprod(Aeq_loc, x_internal), &
466466
& bineq_loc - matprod(Aineq_loc, x_internal), -constr_nlc]
467467

468-
end subroutine
468+
end subroutine calcfc_internal
469469

470470

471471
end subroutine cobyla

matlab/mex_gateways/R2025a/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This directory contains temporary MEX gateway to circumvent the MATLAB R2025a bug that it segfaults
1+
This directory contains adapted MEX gateways to circumvent the MATLAB R2025a bug that it segfaults
22
on Linux if the Fortran MEX function contains an internal procedure that is passed as an actual argument.
33

44
The MEX files use a module variable to store the function handle, which is essentially a

matlab/mex_gateways/R2025a/bobyqa_mex.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!--------------------------------------------------------------------------------------------------!
22
! The MEX gateway for BOBYQA
3-
! This is a temporary MEX gateway to circumvent the MATLAB R2025a bug that it segfaults on Linux
3+
! This is an adapted MEX gateway to circumvent the MATLAB R2025a bug that it segfaults on Linux
44
! if the Fortran MEX function contains an internal procedure that is passed as an actual argument.
55
! This MEX uses a module variable FUN_PTR to store the function handle, which is essentially a
66
! global variable and is not thread-safe or recursion-safe.

0 commit comments

Comments
 (0)