Meanwhile in normal CPU land something very weird is going on....
I wanted to do some timing for the big 64 bit Tatami 1000 problem across all the programs we have that can do that. So I fixed up a makefile to build 32 and 64 bit versions of prune.c, pqplum.c and tatami_rust.rs. Also a script to run and time the 64 bit versions.
On my x86_64 this is the result:
$./run64.sh
-------------------------------
Linux monster 4.4.0-17134-Microsoft #706-Microsoft Mon Apr 01 18:13:00 PST 2019 x86_64 GNU/Linux
-------------------------------
prune64
Pr(40000)=479909
./rT(63405342000)=1000
real
4m39.709s
user 4m39.219s
sys 0m0.000s
-------------------------------
pqplum64
T(63405342000)=1000
real
2m3.285s
user 13m49.828s
sys 0m0.203s
-------------------------------
tatami_rust_threaded64.rs
Using 64 bit integers.
PNUM = 40000
FNUM = 20
SMAX = 100000000000
Pr(40000)=479909
Running Rust translation of queue.c...
T(63405342000)=1000
real
1m31.967s
user 11m40.750s
sys 0m0.688s
-------------------------------
Well look at that. Rust and the rayon thread pool library is wiping the board!
But on the Pi 3B everyting goes wrong:
$./run64.sh
-------------------------------
Linux debian-buster-64 4.19.75-v8+ #1270 SMP PREEMPT Tue Sep 24 18:59:17 BST 2019 aarch64 GNU/Linux
-------------------------------
prune64
Pr(40000)=479909
T(63405342000)=1000
real
19m46.191s
user 19m45.901s
sys 0m0.017s
-------------------------------
pqplum64
./run64.sh: line 12: 20616 Segmentation fault
real 0m0.210s
user 0m0.412s
sys 0m0.115s
-------------------------------
tatami_rust_threaded64
Using 64 bit integers.
PNUM = 40000
FNUM = 20
SMAX = 100000000000
Pr(40000)=479909
Running Rust translation of queue.c...
T(63405342000)=1000
real
24m17.314s
user 93m32.503s
sys 0m16.106s
-------------------------------
I can't get pqplum to run at all. Is there a version that sets a bigger thread stack size?
The Rust seems to have decided not to use threads at all!
Edit: Except of course it is using threads, there is 93m of user time reported there. WTF?
https://github.com/ZiCog/tatami-rust
Memory in C++ is a leaky abstraction .