Skip to content

Commit d11a883

Browse files
authored
Merge branch 'main' into fixes
2 parents 90b1af1 + c368823 commit d11a883

File tree

10 files changed

+49
-69
lines changed

10 files changed

+49
-69
lines changed

.github/workflows/build_python.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
# As of 20240501, macos-11/12/13 are AMD64, and macOS-14 is ARM64.
29-
# As of 20240616, ubuntu 24.04 is failing to copy files into the quay.io/pypa/manylinux2014_i686:2024-05-13-0983f6f container
30-
# It fails with "tar: ./todo: Cannot utime: Function not implemented" for every file in the repo.
31-
# This is strange since it worked for the quay.io/pypa/manylinux2014_x86_64:2024-05-13-0983f6f container.
32-
# I suggest trying ubuntu-24.04 again in a month.
33-
os: [ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022, macos-11, macos-12, macos-13, macos-14]
34-
28+
# As of 20240501, macos-12/13 are AMD64, and macOS-14 is ARM64.
29+
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022, macos-12, macos-13, macos-14]
3530
steps:
3631
- name: Clone Repository (Latest)
3732
uses: actions/checkout@v4

.github/workflows/compile_mex.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# The matrix is essentially the same as that of test_matlab.yml
3333
matrix:
34-
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13]
34+
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-13]
3535
matlab: [R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
3636

3737
include:
@@ -135,7 +135,7 @@ jobs:
135135
ver;
136136
options.half = false;
137137
options.single = true;
138-
options.quadruple = ~(strcmp('${{ matrix.os }}', 'macos-11') && verLessThan('matlab', '9.12')); % MEX is slow on macos-11 with MATLAB R2021b or below.
138+
options.quadruple = true;
139139
options.debug = true;
140140
options.classical = false;
141141
options.verbose = true;

.github/workflows/recursive_test_matlab.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
# The matrix is the same as that of stress_test_matlab.yml.
3838
matrix:
39-
os: [ubuntu-20.04, ubuntu-latest, windows-2019, windows-latest, macos-11, macos-12, macos-13]
39+
os: [ubuntu-20.04, ubuntu-latest, windows-2019, windows-latest, macos-12, macos-13]
4040
matlab: [R2020b, R2021a, R2022a, R2023a, latest]
4141
solver: [uobyqa, newuoa, bobyqa, lincoa, cobyla]
4242

@@ -74,14 +74,6 @@ jobs:
7474
- os: macos-12
7575
matlab: R2023a
7676

77-
# macos-11: test R2022a and latest
78-
- os: macos-11
79-
matlab: R2020b
80-
- os: macos-11
81-
matlab: R2021a
82-
- os: macos-11
83-
matlab: R2023a
84-
8577
# windows-latest: test R2023a and latest
8678
- os: windows-latest
8779
matlab: R2020b

.github/workflows/stress_test_matlab.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
# The matrix is the same as that of recursive_test_matlab.yml, except for `test`.
3535
matrix:
36-
os: [ubuntu-20.04, ubuntu-latest, windows-2019, windows-latest, macos-11, macos-12, macos-13]
36+
os: [ubuntu-20.04, ubuntu-latest, windows-2019, windows-latest, macos-12, macos-13]
3737
matlab: [R2020b, R2021a, R2022a, R2023a, latest]
3838
solver: [uobyqa, newuoa, bobyqa, lincoa, cobyla]
3939
test: [normal, tough]
@@ -72,14 +72,6 @@ jobs:
7272
- os: macos-12
7373
matlab: R2023a
7474

75-
# macos-11: test R2022a and latest
76-
- os: macos-11
77-
matlab: R2020b
78-
- os: macos-11
79-
matlab: R2021a
80-
- os: macos-11
81-
matlab: R2023a
82-
8375
# windows-latest: test R2023a and latest
8476
- os: windows-latest
8577
matlab: R2020b

.github/workflows/test_matlab.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,11 @@ jobs:
2727

2828
# The matrix is essentially the same as that of compile_mex.yml
2929
matrix:
30-
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-12, macos-13]
30+
os: [ubuntu-20.04, ubuntu-latest, macos-12, macos-13]
3131
matlab: [R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a, latest]
3232

3333
exclude:
3434

35-
# Below R2022a, MEX is extremely slow on macOS 11
36-
- os: macos-11
37-
matlab: R2020b
38-
- os: macos-11
39-
matlab: R2021a
40-
- os: macos-11
41-
matlab: R2021b
42-
4335
# Below R2022a, MEX is extremely slow on macOS 12
4436
- os: macos-12
4537
matlab: R2020b

fortran/tests/tools/flint

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ fi
1111
TEST_ALL="N"
1212
CLEAN="N"
1313

14-
# sunf95 is case sensitive. Put it as the first.
15-
# Disable atest for now, since it encounters licensing errors randomly
16-
printf "\n****** ATEST is disabled ******\n"
14+
# Decide the list of tests to make.
1715
# N.B.: () defines an array
18-
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx)
19-
CLIST=(s g n 9 i v f d x)
16+
# sunf95 is case sensitive. Put it as the first.
17+
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx)
18+
CLIST=(s g n 9 i v x)
2019
COMP_LIST=""
2120
for i in "${!COMPILER_LIST[@]}"; do
2221
if type "${COMPILER_LIST[$i]}" &> /dev/null ; then
23-
if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then
24-
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
25-
if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
26-
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
27-
fi
28-
else
29-
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
30-
fi
22+
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
3123
fi
3224
done
25+
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
26+
if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
27+
COMP_LIST="$COMP_LIST f"
28+
fi
29+
# Make dtest if AOCC flang is installed.
30+
if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then
31+
COMP_LIST="$COMP_LIST d"
32+
fi
3333

3434
# Parse the arguments
3535
while [[ -n "$1" ]]; do
@@ -49,9 +49,6 @@ while [[ -n "$1" ]]; do
4949
-n|--nagfor)
5050
COMP_LIST=" n"
5151
;;
52-
-a|--absoft)
53-
COMP_LIST=" a"
54-
;;
5552
-9|--g95)
5653
COMP_LIST=" 9"
5754
;;

fortran/tests/tools/mlint

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,25 @@ fi
2020
TEST_ALL="N"
2121
CLEAN="N"
2222

23-
# af95 does not support internal subroutine as an actual argument. So it is not included
24-
# sunf95 is case sensitive. Put it as the first.
23+
# Decide the list of tests to make.
2524
# N.B.: () defines an array
26-
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx)
27-
CLIST=(s g n 9 i v f d x)
25+
# sunf95 is case sensitive. Put it as the first.
26+
COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx)
27+
CLIST=(s g n 9 i v x)
2828
COMP_LIST=""
2929
for i in "${!COMPILER_LIST[@]}"; do
3030
if type "${COMPILER_LIST[$i]}" &> /dev/null ; then
31-
if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then
32-
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
33-
if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
34-
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
35-
fi
36-
else
37-
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
38-
fi
31+
COMP_LIST="$COMP_LIST ${CLIST[$i]}"
3932
fi
4033
done
34+
# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead.
35+
if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then
36+
COMP_LIST="$COMP_LIST f"
37+
fi
38+
# Make dtest if AOCC flang is installed.
39+
if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then
40+
COMP_LIST="$COMP_LIST d"
41+
fi
4142

4243
# Parse the arguments
4344
while [[ -n "$1" ]]; do

matlab/tests/private/testcu.m

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@
815815
case {'absolute', 'additive', 'add', 'a', '+'}
816816
f = f + noise.level*r;
817817
otherwise
818-
f = f * (1 + noise.level*r);
818+
%f = f * (1 + noise.level*r);
819+
f = f + max(abs(f), 1)*noise.level*r; % abs(f) is reasonable because the distribution of r is symmetric w.r.t. 0.
819820
end
820821
end
821822
end
@@ -829,7 +830,8 @@
829830
case {'absolute', 'additive', 'add', 'a', '+'}
830831
f = f + dnoise.level*r;
831832
otherwise
832-
f = f * (1 + dnoise.level*r);
833+
%f = f * (1 + dnoise.level*r);
834+
f = f + max(abs(f), 1)*dnoise.level*r;
833835
end
834836
end
835837
end
@@ -1038,6 +1040,7 @@
10381040
'FBRAIN3', ...
10391041
'FEEDLOC', ...
10401042
'GOULDQP1', ...
1043+
'GROUPING', ...
10411044
'HAIFAM', ... % 173
10421045
'HIMMELBI', ... % 100
10431046
'HIMMELBJ', ...
@@ -1048,6 +1051,7 @@
10481051
'LEVYMONE', ... % 15
10491052
'LHAIFAM', ...
10501053
'LINSPANH', ... % 3 (it takes a long time on GitHub Actions)
1054+
'LSNNODOC', ...
10511055
'LUKSAN11', ...
10521056
'LUKSAN12', ... % 563
10531057
'LUKSAN13', ... % 508
@@ -1063,7 +1067,8 @@
10631067
'OET6', ...
10641068
'OET7', ...
10651069
'QINGNE', ...
1066-
'QPCBLEND' , ...
1070+
'QPCBLEND', ...
1071+
'QPNBLEND', ...
10671072
'SPANHYD', ... % 15
10681073
'SWOPF', ... % 10
10691074
'TAX13322', ... % 5

matlab/tests/prof.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171
output{7} = profile(argin{:});
7272
options = rmfield(options, {'eval_options'});
7373

74+
% Precision of function evaluation ~ 1.0e-3
75+
options.eval_options = struct('signif', 3);
76+
argin = [varargin, {options}];
77+
output{8} = profile(argin{:});
78+
options = rmfield(options, {'eval_options'});
79+
7480

7581
outputfiles = struct();
7682
prob_types = fieldnames(output{1});

matlab/tests/profile.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
if isfield(options, 'eval_options') && isstruct(options.eval_options) && ~isempty(fieldnames(options.eval_options))
9292
test_feature = [test_feature, '.', strjoin(fieldnames(options.eval_options), '_')];
9393
if isfield(options.eval_options, 'dnoise')
94-
if isnumeric(options.eval_options.dnoise) && isscalar(options.eval_options)
94+
if isnumeric(options.eval_options.dnoise) && isscalar(options.eval_options.dnoise)
9595
dnoise_level = abs(options.eval_options.dnoise);
9696
elseif isstruct(options.eval_options.dnoise) && isfield(options.eval_options.dnoise, 'level')
9797
dnoise_level = abs(options.eval_options.dnoise.level);
@@ -103,7 +103,7 @@
103103
end
104104
end
105105
if isfield(options.eval_options, 'noise')
106-
if isnumeric(options.eval_options.noise) && isscalar(options.eval_options)
106+
if isnumeric(options.eval_options.noise) && isscalar(options.eval_options.noise)
107107
noise_level = abs(options.eval_options.noise);
108108
elseif isstruct(options.eval_options.noise) && isfield(options.eval_options.noise, 'level')
109109
noise_level = abs(options.eval_options.noise.level);

0 commit comments

Comments
 (0)