[GiNaC-devel] GiNaC's performance bottleneck[s]

Sheplyakov Alexei varg at theor.jinr.ru
Tue Nov 21 20:01:11 CET 2006


On Tue, Nov 21, 2006 at 04:20:37PM +0000, Vladimir Kisil wrote:
> 	I do not have a short example. What I met is a part of a rather big
>   program (cs.MS/0512073),

I couldn't compile it (see the attached log), what I'm doing wrong?

$ g++ --version | head -n 1
g++ (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)

$ ginac-config --version
1.3.5

This is not really GiNaC 1.3.5, but rather my hijacked version, but
the API is the same.

> specifically the chunk which check
> conformality of different distances. It uses series expansion of a
> fraction of two multi-variable polynomials so it can be either gcd()
> or collect() which cause infinite execution, I guess.

AFAIK, no series() method uses gcd() on its own. But there are a couple
of normal() (which obviously uses gcd()) in your code, so I guess bad
gcd() performance might be the root of the problem. The patches I've
posted (last month and yesterday) might solve it.

> Surprisingly infinite execution occurs only on my office computer

Could you please show the backtrace? Or maybe print the expression 
before calling normal() and post it here?

> but never at home, although they both have quite similar hardware
> configuration (Athlons 2800 and 3000).

This makes me think about compiler bugs/wrong compilation options, etc.
Are you sure the software (first of all, the compiler) versions and 
compilation options are _exactly_ the same on machines in question?

Best regards,
 Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
$ ccache g++ -I. parab-ortho1.cpp cycle.cpp -O0 -g -lginac
./cycle.h:43: warning: ?class cycle::visitor? has virtual functions but non-virtual destructor
./cycle.h:139: warning: ?class cycle2D::visitor? has virtual functions but non-virtual destructor
parab-ortho1.nw:2977: error: ?class GiNaC::function_options? has no member named ?power_func?
./cycle.h:43: warning: ?class cycle::visitor? has virtual functions but non-virtual destructor
./cycle.h:139: warning: ?class cycle2D::visitor? has virtual functions but non-virtual destructor
parab-ortho1.cpp: In function ?int main()?:
parab-ortho1.cpp:227: error: no matching function for call to ?cycle2D::center(const GiNaC::ex&) const?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:313: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:320: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:327: error: ?class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:339: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:366: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:378: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:454: error: no matching function for call to ?cycle2D::center(GiNaC::ex, bool)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:454: error: no matching function for call to ?cycle2D::center(const GiNaC::ex&, bool) const?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:498: error: no matching function for call to ?cycle2D::cycle2D(const cycle2D&, const GiNaC::ex&)?
./cycle.h:147: note: candidates are: cycle2D::cycle2D(const cycle&)
./cycle.h:145: note:                 cycle2D::cycle2D(const GiNaC::lst&, const GiNaC::ex&, const GiNaC::ex&, const GiNaC::ex&, const GiNaC::ex&)
./cycle.h:142: note:                 cycle2D::cycle2D(const GiNaC::ex&, const GiNaC::ex&, const GiNaC::ex&, const GiNaC::ex&)
./cycle.h:139: note:                 cycle2D::cycle2D()
./cycle.h:139: note:                 cycle2D::cycle2D(const GiNaC::archive_node&, GiNaC::lst&)
./cycle.h:138: note:                 cycle2D::cycle2D(const cycle2D&)
parab-ortho1.cpp:605: error: no matching function for call to ?cycle2D::focus(GiNaC::ex, bool) const?
./cycle.h:150: note: candidates are: GiNaC::ex cycle2D::focus(const GiNaC::ex&) const
parab-ortho1.cpp:629: error: no matching function for call to ?cycle2D::center(GiNaC::ex, bool)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:630: error: no matching function for call to ?cycle2D::focus(GiNaC::ex, bool) const?
./cycle.h:150: note: candidates are: GiNaC::ex cycle2D::focus(const GiNaC::ex&) const
parab-ortho1.cpp:1170: error: no matching function for call to ?cycle2D::focus(GiNaC::ex, bool) const?
./cycle.h:150: note: candidates are: GiNaC::ex cycle2D::focus(const GiNaC::ex&) const
parab-ortho1.cpp:1185: error: ?const class cycle2D? has no member named ?is_orthogonal?
parab-ortho1.cpp:1211: error: no matching function for call to ?cycle2D::focus(GiNaC::ex, bool)?
./cycle.h:150: note: candidates are: GiNaC::ex cycle2D::focus(const GiNaC::ex&) const
parab-ortho1.cpp:1498: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1501: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1502: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1504: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1582: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1585: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1586: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1588: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1654: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1655: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1685: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1686: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1688: error: no matching function for call to ?cycle2D::center(const GiNaC::ex)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:1688: error: no matching function for call to ?cycle2D::center(const GiNaC::ex)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:1689: error: no matching function for call to ?cycle2D::center(const GiNaC::ex)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:1689: error: no matching function for call to ?cycle2D::center(const GiNaC::ex)?
./cycle.h:85: note: candidates are: GiNaC::ex cycle::center() const
parab-ortho1.cpp:1728: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1754: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1756: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1759: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1796: error: ?const class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1799: error: ?const class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1837: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1839: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1841: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1845: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1876: error: ?const class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1880: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1913: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1915: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1918: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1935: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1937: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1940: error: ?class cycle2D? has no member named ?asy_draw?
parab-ortho1.cpp:1945: error: ?class cycle2D? has no member named ?asy_draw?
distcc[21420] ERROR: compile cycle.cpp on localhost failed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20061121/fd908d7d/attachment.pgp


More information about the GiNaC-devel mailing list