These are chat archives for symengine/symengine

10th
Aug 2015
Ondřej Čertík
@certik
Aug 10 2015 04:24
@isuruf the fix is in. Would you mind regenerating the spkg one more time?
Let's test it on SMC and if it runs without any warnings, let's release 0.1 and announce on sage-devel.
Isuru Fernando
@isuruf
Aug 10 2015 06:50
I uploaded it to the same location
Building on SMC now
Isuru Fernando
@isuruf
Aug 10 2015 07:01
Works fine on SMC
Ralf Stephan
@rwst
Aug 10 2015 07:52
@certik on kane3 as a whole the reading of expr2.txt takes most of the time. Was your 6x slower figure for the whole kane3?
Ralf Stephan
@rwst
Aug 10 2015 08:22
p = Profiler()
var("forkcg1, mwf, mwr, mframe, WRrad, t, htangle, g, framelength, forkcg3, WFrad, forkoffset, mfork, forklength, framecg1, framecg3")
consts = [forkcg1, mwf, mwr, mframe, WRrad, t, htangle, g, framelength, forkcg3, WFrad, forkoffset, mfork, forklength, framecg1, framecg3]
var("s0 s1 s2 s3 s4 s5")
syms = [s0, s1, s2, s3, s4, s5]
p()
attach("pynac/expr2.py")
print "Read finished"
p()
cf = s.subs(dict(zip(consts, range(1, len(consts)+1))))
cf = cf.subs(dict(zip(syms, range(1, len(syms)+1))))
print "Eval initial expression"
p()
print cf.n()
p()
print cf.n(200)
p()
# This number was checked against sympy:
assert abs(cf.n() - (-14960.1119361)) < 1e-6
sage: %attach pynac/kane3.py
Read finished
Eval initial expression
-14960.1119361401
-14960.111936127382563475771853345057230700491739739146860225
sage: print p
    1.184s -- line 6: attach("pynac/expr2.py")
    0.862s -- line 9: cf = s.subs(dict(zip(consts, range(1, len(consts)+1))))
    0.273s -- line 13: print cf.n()
    0.362s -- line 15: print cf.n(200)
Am I doing something wrong here?
Isuru Fernando
@isuruf
Aug 10 2015 09:44
@rwst, timings were for the differentiation of the expression
t = s.diff(syms[5])
Ondřej Čertík
@certik
Aug 10 2015 16:39
@rwst as @isuruf said, the benchmark is only benchmarking the actual differentiation, once the expression is fully converted to either SymPy, SymEngine or Sage. Yes, the reading from the file is slow, but that's minor. In the actual application in PyDy, the expression is constructed on the fly, but since it takes some time, I just saved it to a file. We can (and should) also write some fast C++ parser, so that it loads from the file quickly, but those are all unrelated improvements. In this particular benchmark, we are just concerned about how fast the expression can be differentiated.
@isuruf thanks for posting the spkg. If they work on SMC without warning, then let's announce on the sage-devel.
@isuruf do you want to write the email, or do you want me to?
Isuru Fernando
@isuruf
Aug 10 2015 16:40
It works without a warning
You can announce on the sage-devel
Ondřej Čertík
@certik
Aug 10 2015 16:43
Ok, I'll write it up in about 2h.
Ondřej Čertík
@certik
Aug 10 2015 19:43
I tagged the release: https://github.com/sympy/symengine/releases/tag/v0.1.0, I am writing an email.
Ondřej Čertík
@certik
Aug 10 2015 23:28
Ok, I just posted an email to sage-devel.