On 7/5/22 20:20, Ralf Hemmecke wrote:
Hi Qian,

that sounds amazing. Are you going to document is somewhat so that one then would only have to write a little scritpt for "git pisect run" and would have the bad git-sha1 in about 3 min.

I'm still improve the process, but here is a few hints and notes:

0. Compile sbcl yourself to enable sb-fasteval.

1. It is "git bisect run ./test.sh" and "git pisect ./test.sh"

2. Choose PISECT_JOBS wisely.  (PISECT_JOBS+1)^n should be bigger than
the number of commits.  More cores does not always mean more speed.

3. For "pisect", since it runs in parallel, it checks out new commit
in new tmp directory, so you need to use absolute path in "test.sh".

Current testing need fricas.lisp from fricas0, so you need to copy
it first, I have following:

======= test.sh
cp ~/github/fricas0/fricas.lisp ./
cp ~/github/fricas0/lisp/{interp.lisp,load-*,compile-*} ./lisp/

echo ")r /tmp/fricas4/1.input"  | sbcl --load  fricas.lisp | grep testpass
=======

4. Put your fricas command into a input file:

===== /tmp/fricas4/1.input
)time on
)lisp (compile-file "algebra/SMP.lsp")
)lisp (compile-file "algebra/PR.lsp")
)lisp (compile-file "algebra/IDPO.lsp")
)lisp (compile-file "algebra/PGCD.lsp")
)lisp (compile-file "algebra/KERNEL.lsp")
)lisp (compile-file "algebra/LIST.lsp")
)lisp (compile-file "algebra/FM.lsp")
)lisp (compile-file "algebra/INT.lsp")
)lisp (compile-file "algebra/FRAC.lsp")
)lisp (compile-file "algebra/POLYVEC.lsp")

f:=integrate((F^((-a*x+1)^(1/2)/(a*x+1)^(1/2)))^n/(-a^2*x^2+1),x);
if(is?(operator mainKernel f,'integral)) then print "test""fail" else print "test""pass"
=====

5. There is room to improve for this process: I plan to use a single
"fricas.lisp" to simplify the usage.  And I'd like to put the
recommended compile list into "fricas.lisp", so that it provides
a good default experience.  Another improvement is to provide a list
of commits without code change to "git bisect skip".

BTW, I wonder how you are actually mapping the non-linear commit graph of FriCAS to your fricas0-repo. I guess having the same graph would be relevant for git-bisect.

Yeah, our commit graph is mostly linear.  I created the fricas0-repo
with something like HEAD~${NUM}.  So it skips some merge commits.
Not a big deal, I think.

- Qian

Ralf

On 05.07.22 14:10, Qian Yun wrote:
The total time for sb-fasteval is 13.4 seconds,
compile SMP.lsp reduce it to 9.9s,
then compile PR.lsp reduce it further to 8.3s,
IDPO.lsp to 7.1s,
PGCD.lsp to 6.3s,
KERNEL.lsp to 5.6s,
LIST.lsp to 5.2s,
FM.lsp to 4.9s,
INT.lsp to 4.7s,
FRAC.lsp to 4.6s,
POLYVEC.lsp to 4.4s.

This integral computation needs to load/compile 247 files, compile
these 10 files takes 1.8s, but saves 10.8s in execution.
Net gain is 9s (67% of original time, aka 3 times faster.)

Now coupled with git-pisect, with 5 cores in 3 runs,
(because the number of commits is less than (5+1)^3),
we can find the regression in 18 seconds.

- Qian

On 7/3/22 22:56, Qian Yun wrote:


On 7/3/22 21:48, Qian Yun wrote:
git bisect start; git bisect bad; git checkout HEAD~130; git bisect good
time git bisect run ./test.sh

This gives correct result (c8ef0784485f8106bccbc7c8ecb63be485ec654e)
in 145 seconds.

Nice.

Now the sbcl fasteval takes 95 seconds.
And ClozureCL takes 117 seconds.


This is single thread performance.

With the help of https://github.com/hoelzro/git-pisect, one can run
parallel.

With git-bisect, it was 95 seconds.

With 2 cores git-pisect, it's 72 seconds.
With 4 cores git-pisect, it's 60 seconds.
With 8 cores git-pisect, it's 51 seconds.

- Qian



--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/34e4a6ca-a7d6-36c0-c121-beb651e867aa%40gmail.com.

Reply via email to