test_loadtxt_qp error with gfortran-7.4.0 (32-bit) on Windows
Opened this issue · 11 comments
Hi @brocolis, I believe this test is not supported on Windows (due to quad precision) and is hence ignored when running the tests with cmake ctest.
If you're running these tests with the fpm package that I recommended to you then unfortunately there is no way to ignore these tests on Windows (except for deleting them).
Hi @LKedward. After a few more testing I found that stdlib passes all tests when compiled by gfortran-9.3.0 (32 bit) or gfortran-8.4.0 (64 bit) or gfortran-10.2.0 (64 bit). When stdlib is compiled by gfortran-7.4.0 (32 bit), I have to remove tests tests\io\test_loadtxt_qp.f90, tests\io\test_savetxt_qp.f90 and tests\stats\test_var.f90 from the Makefile, then stdlib passes the test command.
Compiler | Platform | Build | Test |
---|---|---|---|
gfortran 7.4.0 | mingw 32-bit | ✅ | ❌ |
gfortran 8.4.0 | mingw 64-bit | ✅ | ✅ |
gfortran 9.3.0 | mingw 32-bit | ✅ | ✅ |
gfortran 10.2.0 | mingw 64-bit | ✅ | ✅ |
Build command
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
Test command
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4 test
Thanks for the comprehensive testing @brocolis, that's helpful in pinpointing this as a compiler bug.
I was testing with gfortran 8.1.0 on mingw 64-bit where the same tests build but fail to run.
So stdlib requires at least gfortran >= 8.4.0 on mingw-w64.
(See also: #58 and #61 where this bug is first mentioned.)
The quad precision tests should probably be enabled in the MSYS workflows which use gfortran 10.2.0
Maybe it is worth updating to GCC 7.5, the previous minor version of GCC 7 are known to be buggy but most of those issues have been resolved in GCC 7.5.
Maybe it is worth updating to GCC 7.5,
See my previous comment; this issue also affects gcc 8.1.0 on mingw-64bit which is what runs in the 'plain' Windows CI. The affected tests are currently not run in the Windows CI. These test can however be enabled in the recent MSYS2-based workflows which run 10.2.0.
The latest version of the GCC 8 series is 8.4, which works nicely. We are using 8.1 because it is the latest version uploaded on chocolatey and preinstalled on the Windows image. choco is apparently not the best way to get MinGW installations given the incomplete version history, so we shouldn't rely on them for our CI.
OK, a few more tests: gfortran-7.5.0 (32 bit) and gfortran-7.5.0 (64 bit) don't work either. The error message is "At line 60 of file test_var.f90". gfortran-8.4.0 (32 bit) and gfortran-11-20210110 (experimental) (64 bit) work.
Compiler | Platform | Build | Test |
---|---|---|---|
gfortran 7.5.0 | mingw 32-bit | ✅ | ❌ |
gfortran 7.5.0 | mingw 64-bit | ✅ | ❌ |
gfortran 8.4.0 | mingw 32-bit | ✅ | ✅ |
gfortran-11-20210110 (experimental) | mingw 64-bit | ✅ | ✅ |
Yes I agree I should focus efforts on the currently maintained compilers.
Thanks for testing this, it's a valuable insight. Too bad it's a GCC 7 issue you are only hitting on Windows. It also looks like GCC 7 is dropped from the supported releases at https://gcc.gnu.org/, so we probably can't expect to get fixed in future releases.
Hello. Yes, it's a bit strange that stdlib works with gfortran-7 on Linux, but not on Windows; It may be something with my setup, but I can't say for sure without knowing the root cause. I'll now close this issue.
Thank you.