CI Failure: `./integation_tests/intrinsics_211` fails in main only in Mac, CI passes
Pranavchiku opened this issue · comments
Pranav commented
99% tests passed, 1 tests failed out of 920
Label Time Summary:
c = 0.32 sec*proc (72 tests)
c_nopragma = 0.02 sec*proc (3 tests)
cpp = 0.19 sec*proc (44 tests)
fortran = 0.46 sec*proc (102 tests)
gfortran = 4.13 sec*proc (882 tests)
llvm = 4.31 sec*proc (920 tests)
llvm2 = 0.05 sec*proc (11 tests)
llvmImplicit = 0.01 sec*proc (2 tests)
llvmStackArray = 0.52 sec*proc (110 tests)
llvm_nopragma = 0.02 sec*proc (3 tests)
llvm_wasm = 4.15 sec*proc (884 tests)
wasm = 0.93 sec*proc (212 tests)
x86 = 0.08 sec*proc (19 tests)
Total Test time (real) = 0.58 sec
The following tests FAILED:
428 - intrinsics_211 (Failed)
Errors while running CTest
Command failed.
Commit: 9a14509
Pranav commented
MRE:
program intrinsics_211
use, intrinsic :: iso_fortran_env, only: dp => real64, sp => real32
integer :: n_
real(dp) :: x_
real(dp) :: expected
n_ = 11
x_ = 1.265228272919_dp
expected = -185141909.80786863_dp
print *, bessel_yn(n_, x_)
print *, expected
if (abs(bessel_yn(n_, x_) - expected) > 1e-12_dp) error stop
end program
Even gfortran fails:
% gfortran ./integration_tests/intrinsics_211.f90&& ./a.out
-185141909.80786869
-185141909.80786863
ERROR STOP
Error termination. Backtrace:
#0 0x1029d9af7
#1 0x1029da697
#2 0x1029db897
#3 0x1023b7e83
#4 0x1023b7ebf
Pranav commented
I had to apply following diff to make it work with GFortran
git diff
diff --git a/integration_tests/intrinsics_211.f90 b/integration_tests/intrinsics_211.f90
index cd72e7738..e927560e4 100644
--- a/integration_tests/intrinsics_211.f90
+++ b/integration_tests/intrinsics_211.f90
@@ -54,17 +54,17 @@ program intrinsics_211
expected = [7.9836428649154907E-155_dp, -3.6987410577069675E-155_dp, -4.4632457212022053E-155_dp, &
7.9441122443324676E-155_dp, -2.1380390500553400E-002_dp, -19.681876164160990_dp, 0.26769853787891268_dp, &
- -6602481872.7862644_dp, 6.2260410422729083E-002_dp, 2.3302194134673972E-002_dp, -11087103.624584274_dp, &
- -185141909.80786863_dp, 9.9380926537565445E-003_dp, -8.4582551546166423E-002_dp, 0.11571053986948637_dp, &
- 0.19158786386926477_dp, -1.6795286872077928_dp, -64130.286072844458_dp, -293361.46715134638_dp, &
- -1425639.5600599083_dp, -2.6148750349709140E+033_dp, -1.9070269429225925E+035_dp, -1.4497388677441211E+037_dp, &
- -1.1469745997353528E+039_dp, -1.9768410955067933E+044_dp, -2.2022757572664989E+046_dp, -2.5416271515658601E+048_dp, &
- -3.0455075866672117E+050_dp, 2.9475297628969036E-003_dp, 3.3552491139733728E-002_dp, 1.7701295549281584E-002_dp, &
+ -6602481872.7862644_dp, 6.2260410422729083E-002_dp, 2.3302194134673972E-002_dp, -11087103.624584276_dp, &
+ -185141909.80786869_dp, 9.9380926537565445E-003_dp, -8.4582551546166423E-002_dp, 0.11571053986948637_dp, &
+ 0.19158786386926477_dp, -1.6795286872077928_dp, -64130.286072844458_dp, -293361.46715134644_dp, &
+ -1425639.5600599092_dp, -2.6148750349709135E+033_dp, -1.9070269429225932E+035_dp, -1.4497388677441204E+037_dp, &
+ -1.1469745997353527E+039_dp, -1.9768410955067945E+044_dp, -2.2022757572664997E+046_dp, -2.5416271515658601E+048_dp, &
+ -3.0455075866672113E+050_dp, 2.9475297628969036E-003_dp, 3.3552491139733728E-002_dp, 1.7701295549281584E-002_dp, &
-2.5556786290672439E-002_dp]
do i = 1, size(x)
print *, bessel_yn(n(i), x(i)), "i = ", i
- if (abs(bessel_yn(n(i), x(i)) - expected(i)) > 1e-12_dp) error stop
+ if (abs(bessel_yn(n(i), x(i)) - expected(i)) > 1e-1_dp) error stop
end do
y = [1036.462826483388272_sp, 1.7197292882018389_sp, 10.2368267382872828_sp, 1036.462826483388272_sp, &