Open douglasgscofield opened 1 week ago
I think these are fixed on the development branch. It had to do with running multiple copies of bali-phy at the same time for the first time after it was compiled.
Can you try out the current version on the master
branch?
I plan to release a beta-16 shortly, but if you could check that it work for you before I release it that would be helpful.
Thanks for the bug report.
I released 4.0-beta16. I believe this fixes the problem you found.
4.0-beta16 does not have those test failures, but others. I did ninja -C build test
in a freshly unpacked tarball and then did the same twice again. Test failures were slightly inconsistent but each around the same spot. Summary results for each are below.
I've also attached the testlogs from the fresh build and the first rebuild.
testlog-20241125-1335-fresh.txt testlog-20241125-1337-rebuild.txt
$ tail testlog-20241125-1335.txt
49/216 bali-phy testsuite prob_prog/infer_tree/6 FAIL 41.49s exit status 1
116/216 bali-phy testsuite parse/constraints/1 FAIL 3.59s exit status 1
147/216 bali-phy testsuite haskell/math/RealFloat FAIL 1.00s exit status 1
Ok: 213
Expected Fail: 0
Fail: 3
Unexpected Pass: 0
Skipped: 0
Timeout: 0
rackham5: /sw/bioinfo/bali-phy/4.0-beta15/src/BAli-Phy-4.0-beta16 $ tail testlog-20241125-1337.txt
49/216 bali-phy testsuite prob_prog/infer_tree/6 FAIL 40.89s exit status 1
120/216 bali-phy testsuite parse/constraints/1 FAIL 3.56s exit status 1
148/216 bali-phy testsuite haskell/math/RealFloat FAIL 0.80s exit status 1
Ok: 213
Expected Fail: 0
Fail: 3
Unexpected Pass: 0
Skipped: 0
Timeout: 0
rackham5: /sw/bioinfo/bali-phy/4.0-beta15/src/BAli-Phy-4.0-beta16 $ tail testlog-20241125-1338.txt
48/216 bali-phy testsuite prob_prog/infer_tree/6 FAIL 1.59s exit status 1
117/216 bali-phy testsuite parse/constraints/1 FAIL 3.59s exit status 1
147/216 bali-phy testsuite haskell/math/RealFloat FAIL 0.90s exit status 1
Ok: 213
Expected Fail: 0
Fail: 3
Unexpected Pass: 0
Skipped: 0
Timeout: 0
On a Rocky9 system, running with ninja -j 1 test
just in case, there's a different set of failures.
147/216 bali-phy testsuite parse/3 OK 3.72s
148/216 bali-phy testsuite haskell/Types/GADT/4 FAIL 0.22s exit status 1
>>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=37 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/run-tests.py run haskell/Types/GADT/4 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/bali-phy/bali-phy -V --package-path=/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/builtins:/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Running tests for 'bali-phy':
Running bali-phy test: . ... FAIL! ['error']
FAIL! (1 unexpected failures, 0 expected failures, 1 tests total)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
149/216 bali-phy testsuite haskell/math/RealFloat OK 0.72s
150/216 bali-phy testsuite haskell/Types/GADT/1 OK 0.18s
151/216 bali-phy testsuite haskell/Types/9 OK 0.18s
152/216 bali-phy testsuite haskell/Types/8 OK 0.18s
153/216 bali-phy testsuite haskell/Types/GADT/3 OK 0.44s
154/216 bali-phy testsuite haskell/Types/6 OK 0.19s
155/216 bali-phy testsuite haskell/Types/5 OK 0.19s
156/216 bali-phy testsuite haskell/Types/4 FAIL 0.19s exit status 1
>>> MALLOC_PERTURB_=45 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/run-tests.py run haskell/Types/4 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/bali-phy/bali-phy -V --package-path=/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/builtins:/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Running tests for 'bali-phy':
Running bali-phy test: . ... FAIL! ['error']
FAIL! (1 unexpected failures, 0 expected failures, 1 tests total)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
157/216 bali-phy testsuite parse/guess-alphabet/Codons/dna/3 OK 6.92s
158/216 bali-phy testsuite haskell/Types/7 OK 0.44s
159/216 bali-phy testsuite haskell/Types/GADT/2 OK 0.57s
160/216 bali-phy testsuite haskell/Types/11 OK 0.19s
161/216 bali-phy testsuite haskell/Types/10 OK 0.18s
162/216 bali-phy testsuite haskell/Types/2 FAIL 0.41s exit status 1
>>> MALLOC_PERTURB_=95 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/run-tests.py run haskell/Types/2 /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/bali-phy/bali-phy -V --package-path=/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/src/builtins:/sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Running tests for 'bali-phy':
Running bali-phy test: . ... FAIL! ['error']
FAIL! (1 unexpected failures, 0 expected failures, 1 tests total)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
163/216 bali-phy testsuite parse/16 OK 3.76s
164/216 bali-phy testsuite haskell/Types/3 OK 0.54s
165/216 bali-phy testsuite parse/13 OK 3.72s
166/216 bali-phy testsuite haskell/Types/1 OK 0.65s
167/216 bali-phy testsuite haskell/IO/3 OK 0.52s
168/216 bali-phy testsuite haskell/IO/1 OK 0.52s
169/216 bali-phy testsuite haskell/Ord/3 OK 0.63s
170/216 bali-phy testsuite haskell/Ord/1 OK 0.62s
171/216 bali-phy testsuite haskell/Ord/2 OK 0.64s
172/216 bali-phy testsuite parse/12 OK 3.72s
173/216 bali-phy testsuite IO/errors/Triplets/AUTGC OK 0.32s
174/216 bali-phy testsuite parse/14 OK 4.13s
175/216 bali-phy testsuite haskell/Data/Map OK 0.65s
176/216 bali-phy testsuite haskell/Data/IntSet OK 0.69s
177/216 bali-phy testsuite parse/11 OK 3.79s
178/216 bali-phy testsuite IO/errors/DNA-RNA/3 OK 0.35s
179/216 bali-phy testsuite IO/errors/Triplets/2 OK 0.40s
180/216 bali-phy testsuite IO/errors/Triplets/1 OK 0.39s
181/216 bali-phy testsuite IO/errors/DNA-RNA/2 OK 0.35s
182/216 bali-phy testsuite IO/errors/DNA-RNA/1 OK 0.33s
183/216 bali-phy testsuite mcmc/no-imodel OK 3.37s
184/216 bali-phy testsuite haskell/Data/IntMap OK 0.75s
185/216 bali-phy testsuite parse/M3/2 OK 7.54s
186/216 bali-phy testsuite prob_prog/coal_mining OK 10.34s
187/216 bali-phy testsuite IO/errors/Codons/AUTGC OK 0.28s
188/216 bali-phy testsuite mcmc/one-sequence/1 OK 3.53s
189/216 bali-phy testsuite parse/10 OK 3.87s
190/216 bali-phy testsuite IO/errors/Codons/stop/2 OK 0.67s
191/216 bali-phy testsuite IO/errors/Codons/stop/1 OK 0.58s
192/216 bali-phy testsuite IO/errors/Codons/2 OK 0.49s
193/216 bali-phy testsuite mcmc/two-sequences/1 OK 3.91s
194/216 bali-phy 5d +A 50 OK 44.71s
195/216 bali-phy testsuite IO/errors/Codons/3 OK 0.70s
196/216 bali-phy testsuite IO/errors/Codons/1 OK 0.67s
197/216 bali-phy testsuite prob_prog/no-resample/1 OK 43.72s
198/216 bali-phy testsuite parse/26 OK 5.85s
199/216 bali-phy testsuite parse/24 OK 5.86s
200/216 bali-phy testsuite prob_prog/infer_tree/3 OK 43.84s
201/216 bali-phy testsuite parse/25 OK 6.09s
202/216 bali-phy testsuite parse/M3/1 OK 8.53s
203/216 bali-phy testsuite parse/19 OK 5.85s
204/216 bali-phy testsuite mcmc/with-imodel OK 4.78s
205/216 bali-phy testsuite parse/18 OK 5.99s
206/216 bali-phy testsuite mcmc/fixed-scale OK 4.66s
207/216 bali-phy testsuite parse/17 OK 6.07s
208/216 bali-phy testsuite mcmc/two-partitions OK 5.23s
209/216 bali-phy testsuite mcmc/fixed-topology/unrooted OK 5.84s
210/216 bali-phy testsuite mcmc/fixed-topology/rooted OK 5.90s
211/216 bali-phy testsuite parse/23 OK 8.96s
212/216 bali-phy testsuite parse/22 OK 8.94s
213/216 bali-phy testsuite prob_prog/infer_tree/yule/1 OK 47.00s
214/216 bali-phy testsuite parse/21 OK 9.18s
215/216 bali-phy 48 +A 3 OK 49.18s
216/216 bali-phy testsuite mcmc/48-sequences/1 OK 9.42s
Summary of Failures:
148/216 bali-phy testsuite haskell/Types/GADT/4 FAIL 0.22s exit status 1
156/216 bali-phy testsuite haskell/Types/4 FAIL 0.19s exit status 1
162/216 bali-phy testsuite haskell/Types/2 FAIL 0.41s exit status 1
Ok: 213
Expected Fail: 0
Fail: 3
Unexpected Pass: 0
Skipped: 0
Timeout: 0
Full log written to /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/easybuild_obj/meson-logs/testlog.txt
FAILED: meson-internal__test
/sw/EasyBuild/broadwell-rocky9/software/Meson/1.3.1-GCCcore-12.3.0/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.
Interesting... thanks for following up.
Traceback (most recent call last):
File "/sw/bioinfo/bali-phy/4.0-beta15/src/BAli-Phy-4.0-beta16/tests/run-tests.py", line 486, in <module>
tester.perform_test(test_subdir)
File "/sw/bioinfo/bali-phy/4.0-beta15/src/BAli-Phy-4.0-beta16/tests/run-tests.py", line 341, in perform_test
print(message)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2022' in position 5974: ordinal not in range(128)
The first set of errors seem to be because the python test harness is trying to print some program output that contains a unicode character (a bullet symbol), but the terminal says it doesn't support unicode. And indeed your environment variables include LC_ALL=C
(which says "no unicode") but you also have LANGUAGE=en_US.utf-8
(which says "unicode"). I think these don't occur on your Rocky Linux system because the environment variables there say that unicode is supported. I am looking into how to prevent this problem...
The second set of errors seem to relate to tests where bali-phy is supposed to fail and display a particular error message. I will look into this more...
For the second set of errors, the directories tests/haskell/Types/2
, tests/haskell/Types/4
, and tests/haskell/Types/GADT/4
should contain both error
and obtained_error
. The problem is that these are different. Would you be able to do:
cd tests/haskell/Types/2
diff -u error obtained_error
This could be a bit tricky since the files contain ASCII escape sequences to show color, so the difference could show up as color difference.
BTW, thanks again for this info. Since these don't occur on my Debian Linux system, or on the Ubuntu testers in github actions, I didn't know about these issues.
The first set of errors, built and tested on a CentOS 7 system, shrinks after setting LC_ALL=en_US.utf-8
. The haskell/math/RealFloat
error remains. The testlog is
testlog-20241125-1517-centos7-haskell-math-RealFloat.txt
The diff
s for the second set of errors on Rocky 9 are:
rackham4: /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/haskell/Types/2 $ diff -u error obtained-error
--- error 2024-11-23 20:47:51.000000000 +0100
+++ obtained-error 2024-11-25 14:35:57.760255000 +0100
@@ -1,8 +1,50 @@
+[ Loading Data.Bool ]
+[ Loading Foreign.CList ]
+[ Loading Foreign.String ]
+[ Loading Compiler.Error ]
+[ Loading Compiler.Base ]
+[ Loading Compiler.Num ]
+[ Loading Data.Eq ]
+[ Loading Data.Function ]
+[ Loading Data.Maybe ]
+[ Loading Data.Ord ]
+[ Loading Data.List.NonEmpty ]
+[ Loading Data.Semigroup ]
+[ Loading Data.Monoid ]
+[ Loading Compiler.Enum ]
+[ Loading Data.Char ]
+[ Loading Data.Tuple ]
+[ Loading Data.OldList ]
+[ Loading Data.Foldable ]
+[ Loading Data.List ]
+[ Loading Text.Show ]
+[ Loading Compiler.Classes ]
+[ Loading Compiler.Ratio ]
+[ Loading Compiler.Fractional ]
+[ Loading Compiler.Real ]
+[ Loading Compiler.Integral ]
+[ Loading Compiler.Floating ]
+[ Loading Data.Functor ]
+[ Loading Control.Applicative ]
+[ Loading Control.Monad ]
+[ Loading Compiler.IO ]
+[ Loading Compiler.RealFrac ]
+[ Loading Foreign.Pair ]
+[ Loading Compiler.RealFloat ]
+[ Loading Compiler.ST ]
+[ Loading Data.Either ]
+[ Loading Data.Typeable ]
+[ Loading Data.Exception ]
+[ Loading Data.IORef ]
+[ Loading Foreign.Vector ]
+[ Loading System.FilePath ]
+[ Loading Text.Read ]
+[ Loading System.IO ]
+[ Loading Prelude ]
+[ Compiling Main ]
Main.hs:9.22-25: error:
- • Could not derive `Show t` arising from a use of
- `show` at Main.hs:9.22-25
- • In equation `main = do {System.IO.putStrLn Data.Function.$
- (Text.Show.show Data.Function.$ (Main.bar 2 3))`
+ • Could not derive `Show t` arising from a use of `show` at Main.hs:9.22-25
+ • In equation `main = do {System.IO.putStrLn Data.Function.$ (Text.Show.show Data.Function.$ (Main.bar 2 3))`
• In function `Main.main`
• In recursive group:
Main.main
@@ -11,10 +53,8 @@
| ^^^^
Main.hs:9.29-31: error:
- • Could not derive `Foo t` arising from a use of
- `bar` at Main.hs:9.29-31
- • In equation `main = do {System.IO.putStrLn Data.Function.$
- (Text.Show.show Data.Function.$ (Main.bar 2 3))`
+ • Could not derive `Foo t` arising from a use of `bar` at Main.hs:9.29-31
+ • In equation `main = do {System.IO.putStrLn Data.Function.$ (Text.Show.show Data.Function.$ (Main.bar 2 3))`
• In function `Main.main`
• In recursive group:
Main.main
@@ -23,10 +63,8 @@
| ^^^
Main.hs:9.35: error:
- • Could not derive `Num t` arising from a use of
- `fromInteger` at Main.hs:9.35
- • In equation `main = do {System.IO.putStrLn Data.Function.$
- (Text.Show.show Data.Function.$ (Main.bar 2 3))`
+ • Could not derive `Num t` arising from a use of `fromInteger` at Main.hs:9.35
+ • In equation `main = do {System.IO.putStrLn Data.Function.$ (Text.Show.show Data.Function.$ (Main.bar 2 3))`
• In function `Main.main`
• In recursive group:
Main.main
rackham4: /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/haskell/Types/2 $ cd ../4
rackham4: /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/haskell/Types/4 $ diff -u error obtained-error
--- error 2024-11-23 20:47:51.000000000 +0100
+++ obtained-error 2024-11-25 14:35:57.425258000 +0100
@@ -1,6 +1,8 @@
+[ Loading Data.Bool ]
+[ Loading Data.Eq ]
+[ Compiling Main ]
Main.hs:12.19-20: error:
- • Could not derive `Eq a` arising from a use of
- `(==)` at Main.hs:12.19-20
+ • Could not derive `Eq a` arising from a use of `(==)` at Main.hs:12.19-20
• In equation `reflexive2 ae = x Data.Eq.== x`
• In function `Main.reflexive2`
• In recursive group:
rackham4: /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/haskell/Types/4 $ cd ../GADT/4/
rackham4: /sw/EasyBuild/broadwell-rocky9/build/BAliPhy/4.0-beta16/GCC-12.3.0/BAli-Phy-4.0-beta16/tests/haskell/Types/GADT/4 $ diff -u error obtained-error
--- error 2024-11-23 20:47:51.000000000 +0100
+++ obtained-error 2024-11-25 14:35:57.066258000 +0100
@@ -1,6 +1,6 @@
+[ Compiling Main ]
Main.hs:7.19: error:
- • Cannot unify `m` with `I a` because the quantified variable `a` would
- escape its scope.
+ • Cannot unify `m` with `I a` because the quantified variable `a` would escape its scope.
• Relevant bindings:
i :: I a
unI :: SomeI -> m
Thanks! I think I can fix the errors on Rocky Linux. I need to change the tests to that they don't depend on whether the terminal supports colors
The math/RealFloat error is different -- it seems that somehow the C++ function std::isnan( )
has type 'int' (integer) on your Centos 7 system, whereas it should have type bool
(boolean). This might be fixed in (say) Centos 8, but I have a workaround in mind...
This is being built with gcc/12.3.0 on both systems, and the return value depends on the value of the argument. From include/c++/12.3.0/cmath
:
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP
constexpr bool
isnan(float __x)
{ return __builtin_isnan(__x); }
#if _GLIBCXX_HAVE_OBSOLETE_ISNAN \
&& !_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC
using ::isnan;
#else
constexpr bool
isnan(double __x)
{ return __builtin_isnan(__x); }
#endif
constexpr bool
isnan(long double __x)
{ return __builtin_isnan(__x); }
#endif
#ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT
template<typename _Tp>
constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
bool>::__type
isnan(_Tp __x)
{ return false; }
#endif
I did not initially understand this template correctly. It is supposed to always return the bool
value false
if its argument is of integer type, as only floats can be NaN
. I would be curious about implicit casting since bool
is easily promoted.
The problem is that glibc < 2.23 defines isnan
with the wrong signature: int isnan(double)
. In C++ the correct signature is bool std::isnan(double)
. But apparently g++ cannot define the correct signature if the wrong signature is already in the C library, so it just use the C-library version via using ::isnan
. The result is that std::isnan(x)
is an int
when it should be a bool
.
This problem would be fixed by using glibc version 2.23 or later, which was released in 2016 (eight years ago). Your cluster seems to have CentOS 7, which is really old, and reached its end-of-life in July 2024. Is there any chance you can upgrade to something that came out after 2016? Or, alternatively, use the singularity image?
If not, I can add a workaround for CentOS 7.
I think I've fixed the other test failures on the master branch by making the testing script more robust. You can download an updated tarball at
https://github.com/bredelings/BAli-Phy/archive/refs/heads/master.tar.gz
or just the updated test script here:
https://raw.githubusercontent.com/bredelings/BAli-Phy/refs/heads/master/tests/run-tests.py
You can also get the source using git
via:
git clone https://github.com/bredelings/BAli-Phy.git
I haven't been able to directly the unicode fixes because I haven't been able to find a terminal that doesn't support unicode yet. But I think it works. I'd be interested to hear if it works fine on your Rocky Linux box, and if the errors besides the math/Realfloat errors are fixed on Centos 7.
I'm seeing some test failures when building from source in 4.0-beta14 and 4.0-beta15. No errors building 4.0-beta13 from source. Same build system for all:
4.0-beta14
Meson output is
The failing tests are
4.0-beta15
Meson output is
and the failing tests are