From academicsam at gmail.com Thu Oct 9 16:05:25 2008 From: academicsam at gmail.com (Sam Iam) Date: Thu, 09 Oct 2008 10:05:25 -0400 Subject: [GiNaC-devel] Compilation of cln fails with gcc 4.1.2 with -O2 and -ftracer Message-ID: <200810091005.25781.academicsam@gmail.com> Hi, Sorry if this has been reported before. When I try to compile cln (both 1.1.13 and 1.2.2) using gcc 4.1.2 with options -O2 and -ftracer, compilation fails. -- session log -- localhost # cd /var/tmp/portage/sci-libs/cln-1.1.13/work/cln-1.1.13/src localhost src # g++ -march=pentium4 -mtune=pentium4 -O2 -pipe -ftracer -I../include -I./base -c base/random cl_random_def.cc -o cl_random_def.o {standard input}: Assembler messages: {standard input}:65: Error: symbol `cl_module__cl_random_def__ctorend' is already defined ---- This was reported on Gentoo bug tracker: http://bugs.gentoo.org/show_bug.cgi?id=237451 I found a post that might describe a similar problem. But I'm not sure. http://lists.gforge.info.ucl.ac.be/pipermail/mozart-hackers/2003/001164.html -- Sam From varg at theor.jinr.ru Thu Oct 9 16:46:53 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Thu, 9 Oct 2008 18:46:53 +0400 Subject: [GiNaC-devel] Compilation of cln fails with gcc 4.1.2 with -O2 and -ftracer In-Reply-To: <200810091005.25781.academicsam@gmail.com> References: <200810091005.25781.academicsam@gmail.com> Message-ID: <20081009144653.GA24323@theor.jinr.ru> Dear Sam, On Thu, Oct 09, 2008 at 10:05:25AM -0400, Sam Iam wrote: > When I try to compile cln (both 1.1.13 and 1.2.2) using gcc 4.1.2 with > options -O2 and -ftracer, compilation fails. You have several options to solve this problem: 1. (The esiest) don't use -ftracer 2. (A little bit more difficult) use my version of CLN, you can get it from git://ffmssmsc.jinr.ru:443/varg/cln.git WARNING: it's binary incompatible with original version (the API is the same, though). 3. (Hard) convince CLN developers to wipe out CL_REQUIRE/CL_PROVIDE stuff. > I found a post that might describe a similar problem. But I'm not sure. > http://lists.gforge.info.ucl.ac.be/pipermail/mozart-hackers/2003/001164.html Yes, (the official version of) CLN has exactly the same problem. Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: From academicsam at gmail.com Fri Oct 10 15:01:55 2008 From: academicsam at gmail.com (Sam Iam) Date: Fri, 10 Oct 2008 09:01:55 -0400 Subject: [GiNaC-devel] GiNaC-devel Digest, Vol 43, Issue 2 In-Reply-To: References: Message-ID: <200810100901.55769.academicsam@gmail.com> On Friday October 10 2008 06:00:02 am ginac-devel-request at ginac.de wrote: Dear Alexei, Thanks for the info. > 1. (The esiest) don't use -ftracer That's what I do now. > 2. (A little bit more difficult) use my version of CLN, you can get it from > ???????? git://ffmssmsc.jinr.ru:443/varg/cln.git > ???????? WARNING: it's binary incompatible with original version (the API > is the same, though). Since Gentoo is a source based distribution, this should work. I'll suggest it on Gentoo bug tracker. But, this might not be easy or even necessary as this is really a very minor issue. Gentoo build scripts can easily filter out -ftracer flag. > 3. (Hard) convince CLN developers to wipe out CL_REQUIRE/CL_PROVIDE stuff. That's where I went wrong. I thought (mistakenly it appears) CLN is also developed by this group. I'll give it a try with CLN developers anyway. Thanks again for the prompt response. -- Sam PS: GiNaC is a very cool piece of software. I stumbled on to it by accident, but I'm glad I did :) From varg at theor.jinr.ru Sun Oct 19 20:22:28 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Sun, 19 Oct 2008 22:22:28 +0400 Subject: [GiNaC-devel] Please pull from git://ffmssmsc.jinr.ru:443/varg/ginac.git master Message-ID: <20081019182228.GA25007@theor.jinr.ru> Dear Jens, please pull from git://ffmssmsc.jinr.ru:443/varg/ginac.git master The following changes since commit a377cee53b71348235ec36f83afeced7e10288a8: Jens Vollinga (1): Merge branch 'master' of git://ffmssmsc.jinr.ru:443/varg/ginac are available: Alexei Sheplyakov (20): [trivial] excompiler.cpp: shut up some silly compiler warnings. [bugfix] normalize_in_ring: don't set the leading coefficient to 1. [bugfix] remainder_in_ring: using exact division is plain wrong. mod_gcd: naive hack to chose a 'good' prime (to speed up gcd computation). polynomial: introduce a helper function to divide polynomial by ring element. Rewritten heuristic and PRS GCD for univariate polynomials, added benchmark. ptr.h: use unsigned int to store reference counts (in order to save memory). is_exactly_a: use typeid() to check the type of expression. basic, expairseq: use standard C++ RTTI in compare(), is_equal(), match(), etc. indexed::eval: use standard C++ RTTI. calchash(): use type_info::name() instead of tinfo(). A better return_type_tinfo() mechanism. registered_class_info: use typeid() instead of tinfo_static. Wipe out remnants of custom RTTI. symbol: remove return_type_tinfo() and return_type() (shrink symbol by 8 bytes) symbol: don't bother to set TeX name if user did not specified one. symbol: make get_domain() a virtual method, remove symbol::domain. tutorial: don't mention custom RTTI any more (as it does not exist). Don't force every algebraic class to implement archiving/unarchiving. tutorial: simplify the instructions on writing extension classes. check/Makefile.am | 4 + check/exam_archive.cpp | 3 +- check/test_runner.h | 67 + check/time_uvar_gcd.cpp | 1877 +++++++++++++++++++++++++++++ doc/examples/mystring.cpp | 24 +- doc/tutorial/ginac.texi | 195 +--- ginac/Makefile.am | 6 + ginac/add.cpp | 12 +- ginac/add.h | 3 +- ginac/archive.cpp | 46 +- ginac/archive.h | 80 ++ ginac/basic.cpp | 47 +- ginac/basic.h | 31 +- ginac/clifford.cpp | 40 +- ginac/clifford.h | 25 +- ginac/color.cpp | 34 +- ginac/color.h | 12 +- ginac/constant.cpp | 20 +- ginac/constant.h | 7 +- ginac/container.h | 104 +- ginac/ex.h | 3 +- ginac/excompiler.cpp | 6 +- ginac/expairseq.cpp | 38 +- ginac/expairseq.h | 3 + ginac/exprseq.h | 3 - ginac/fail.cpp | 3 +- ginac/fail.h | 2 + ginac/fderivative.cpp | 9 +- ginac/fderivative.h | 3 + ginac/function.pl | 40 +- ginac/idx.cpp | 29 +- ginac/idx.h | 12 +- ginac/indexed.cpp | 22 +- ginac/indexed.h | 7 +- ginac/integral.cpp | 12 +- ginac/integral.h | 8 +- ginac/lst.cpp | 3 + ginac/lst.h | 4 +- ginac/matrix.cpp | 20 +- ginac/matrix.h | 6 + ginac/mul.cpp | 17 +- ginac/mul.h | 3 +- ginac/ncmul.cpp | 23 +- ginac/ncmul.h | 4 +- ginac/numeric.cpp | 24 +- ginac/numeric.h | 6 + ginac/polynomial/eval_uvar.h | 38 + ginac/polynomial/gcd_uvar.cpp | 33 + ginac/polynomial/heur_gcd_uvar.h | 66 + ginac/polynomial/interpolate_padic_uvar.h | 40 + ginac/polynomial/mod_gcd.cpp | 12 +- ginac/polynomial/normalize.tcc | 3 +- ginac/polynomial/prem_uvar.h | 47 + ginac/polynomial/remainder.tcc | 2 +- ginac/polynomial/ring_traits.hpp | 13 + ginac/polynomial/sr_gcd_uvar.h | 95 ++ ginac/polynomial/upoly.hpp | 31 + ginac/power.cpp | 11 +- ginac/power.h | 12 +- ginac/pseries.cpp | 10 +- ginac/pseries.h | 5 + ginac/ptr.h | 10 +- ginac/registrar.cpp | 10 - ginac/registrar.h | 75 +- ginac/relational.cpp | 16 +- ginac/relational.h | 8 +- ginac/structure.h | 35 +- ginac/symbol.cpp | 231 ++-- ginac/symbol.h | 79 +- ginac/symmetry.cpp | 15 +- ginac/symmetry.h | 6 + ginac/tensor.cpp | 26 +- ginac/tensor.h | 19 +- ginac/utils.cpp | 2 + ginac/utils.h | 16 +- ginac/wildcard.cpp | 15 +- ginac/wildcard.h | 6 + ginsh/ginsh.h | 2 +- ginsh/ginsh_lexer.ll | 8 +- 79 files changed, 3121 insertions(+), 823 deletions(-) create mode 100644 check/test_runner.h create mode 100644 check/time_uvar_gcd.cpp create mode 100644 ginac/polynomial/eval_uvar.h create mode 100644 ginac/polynomial/gcd_uvar.cpp create mode 100644 ginac/polynomial/heur_gcd_uvar.h create mode 100644 ginac/polynomial/interpolate_padic_uvar.h create mode 100644 ginac/polynomial/prem_uvar.h create mode 100644 ginac/polynomial/sr_gcd_uvar.h Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: From git at ginac.de Mon Oct 20 09:55:36 2008 From: git at ginac.de (Jens Vollinga) Date: Mon, 20 Oct 2008 09:55:36 +0200 (CEST) Subject: [GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-146-g4fb48e2 Message-ID: <20081020075536.A7EC35B4042@cebix.net> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GiNaC -- a C++ library for symbolic computations". The branch, master has been updated via 4fb48e28063e08c613a773378cfa5de608560a84 (commit) via d327f3f00c66a79d42855939866047b3e8caa630 (commit) via 434e5582627a91aa4d8fdb5156d975482a7f350c (commit) via 8fdf123fe6dac43ad7b8020d7bb7446c51cf75e7 (commit) via 94e5076a9ad0d142ee4604e9b078a10083efd24c (commit) via 32209e57010f19f080cc25e527347bcaa36053ec (commit) via def26469ff96228c66e877bb5594e7d9a24b638f (commit) via 09988aee53a2bfef87fc887a434b4c78d6326c47 (commit) via 12fefbca9b424cb8e9ae05d83883b96e17c7b96e (commit) via b573b0146341709649f373e0fc5c0d440877ebaf (commit) via e858ebe524f9beac33d492b9a4e614666819c3ab (commit) via 11fcbe7ea462936b79807a1f12273e5685f3f744 (commit) via e9b5729311fcd5572d806f5df2e645e1845603e5 (commit) via ce9053c15affb2a1a99d1157b85266d70aec601b (commit) via c7d9b624cb4bd5658a36fbcac2f73dbdb99edd5f (commit) via 47b7f9c9b4a5bd91c7c83b12bac8481b55bf4b92 (commit) via 55fcb39a1209898ec43694f7e25ffb4572b0c4d1 (commit) via 62923ac249c7e4f7e824bc37030ac79bab3675f3 (commit) via d5c76f155cfbd25ccfd14735b6d1041e23214a86 (commit) via ceb63120f43b41b62dcb0328231a3137d666161b (commit) from a377cee53b71348235ec36f83afeced7e10288a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4fb48e28063e08c613a773378cfa5de608560a84 Author: Alexei Sheplyakov Date: Sun Oct 19 20:21:33 2008 +0400 tutorial: simplify the instructions on writing extension classes. Don't mention (un)archiving while describing the `mystring' class (the minimalistic extension class), so readers have less chances to get confused. commit d327f3f00c66a79d42855939866047b3e8caa630 Author: Alexei Sheplyakov Date: Sun Oct 19 19:39:30 2008 +0400 Don't force every algebraic class to implement archiving/unarchiving. So people who don't use (un)archiving don't need to bother with it. commit 434e5582627a91aa4d8fdb5156d975482a7f350c Author: Alexei Sheplyakov Date: Fri Oct 17 17:57:27 2008 +0400 tutorial: don't mention custom RTTI any more (as it does not exist). commit 8fdf123fe6dac43ad7b8020d7bb7446c51cf75e7 Author: Alexei Sheplyakov Date: Thu Oct 16 15:43:32 2008 +0400 symbol: make get_domain() a virtual method, remove symbol::domain. This cuts yet another 4 bytes from GiNaC::symbol. While at it, fix a memory leak in ginsh. commit 94e5076a9ad0d142ee4604e9b078a10083efd24c Author: Alexei Sheplyakov Date: Thu Oct 16 15:43:32 2008 +0400 symbol: don't bother to set TeX name if user did not specified one. Same for the usual name. As a result we use less memory (and the output is exactly the same). commit 32209e57010f19f080cc25e527347bcaa36053ec Author: Alexei Sheplyakov Date: Fri Oct 17 14:56:54 2008 +0400 symbol: remove return_type_tinfo() and return_type() (shrink symbol by 8 bytes) Bloating symbol to the state sizeof(symbol) == 64 is not appreciated at all. If someone needs/wants non-commutative symbols or other fancy stuff, please derive from class symbol and do whatever you want. commit def26469ff96228c66e877bb5594e7d9a24b638f Author: Alexei Sheplyakov Date: Fri Oct 17 13:41:01 2008 +0400 Wipe out remnants of custom RTTI. Custom RTTI considered harmful, final part. commit 09988aee53a2bfef87fc887a434b4c78d6326c47 Author: Alexei Sheplyakov Date: Wed Oct 15 15:32:11 2008 +0400 registered_class_info: use typeid() instead of tinfo_static. (Custom RTTI considered harmful, part 5). Since custom RTTI is going to be removed, registered_class_info needs to be re-organazied. Now tinfo_key is a (const) pointer to std::type_info. commit 12fefbca9b424cb8e9ae05d83883b96e17c7b96e Author: Alexei Sheplyakov Date: Fri Oct 17 13:15:03 2008 +0400 A better return_type_tinfo() mechanism. return_type_tinfo() is used in order to distingish between non-commutative objects of different type. However, often it's necessary to distingish between non-commutative objects of the same type, for example, between gamma matrices with different representation label. return_type_tinfo() does not provide any clean way to do that. Hence, introduce return_type_t type which holds representation label along with type information, and use it for return_type_tinfo(). commit b573b0146341709649f373e0fc5c0d440877ebaf Author: Alexei Sheplyakov Date: Wed Oct 15 15:32:11 2008 +0400 calchash(): use type_info::name() instead of tinfo(). Custom RTTI considered harmful, part 4. The hash value of the object of different types should be different whenever possible. Hence calcash() needs a unique per type number. Previously we used tinfo_key for this. typeinfo::name() (a *pointer* to implementation dependent string) is also unique for each class, so it's just as good as tinfo() is. commit e858ebe524f9beac33d492b9a4e614666819c3ab Author: Alexei Sheplyakov Date: Wed Oct 15 15:32:11 2008 +0400 indexed::eval: use standard C++ RTTI. Custom RTTI considered harmful, part 3. commit 11fcbe7ea462936b79807a1f12273e5685f3f744 Author: Alexei Sheplyakov Date: Wed Oct 15 15:32:11 2008 +0400 basic, expairseq: use standard C++ RTTI in compare(), is_equal(), match(), etc. Custom RTTI considered harmful, part 2. * basic.cpp: use standard C++ RTTI in compare(), is_equal(), operator=(), match(). * expairseq.cpp: use standard C++ RTTI in match(), make_flat(), construct_from_2_ex(). commit e9b5729311fcd5572d806f5df2e645e1845603e5 Author: Alexei Sheplyakov Date: Wed Oct 15 15:32:11 2008 +0400 is_exactly_a: use typeid() to check the type of expression. Custom RTTI considered harmful, part 1. Custom run time type information (RTTI) system implemented in GiNaC have several serious drawbacks, such as 1. It makes writing GiNaC classes unnecessary cumbersome. 2. It wastes sizeof(void *) bytes per object, for small objects like symbol, numeric, etc. this overhead is considerable. It turns out that GiNaC's RTTI is not any faster than the standard one (at least on GNU/Linux and Solaris with GNU C++ library and compiler). So, GiNaC RTTI have no reasons to exit any more. commit ce9053c15affb2a1a99d1157b85266d70aec601b Author: Alexei Sheplyakov Date: Wed Oct 15 10:16:07 2008 +0400 ptr.h: use unsigned int to store reference counts (in order to save memory). We'll hardly ever get more than 2^32 references to the same object. So using size_t to store reference count only wastes 4 bytes per object (on 64-bit architecture). Use unsigned int instead. commit c7d9b624cb4bd5658a36fbcac2f73dbdb99edd5f Author: Alexei Sheplyakov Date: Sun Oct 19 21:27:14 2008 +0400 Rewritten heuristic and PRS GCD for univariate polynomials, added benchmark. Using a better data structure for univariate polynomials makes GCD 10 -- 300 times faster (and less memory hungry). commit 47b7f9c9b4a5bd91c7c83b12bac8481b55bf4b92 Author: Alexei Sheplyakov Date: Tue Oct 14 10:44:07 2008 +0400 polynomial: introduce a helper function to divide polynomial by ring element. commit 55fcb39a1209898ec43694f7e25ffb4572b0c4d1 Author: Alexei Sheplyakov Date: Tue Oct 14 10:37:42 2008 +0400 mod_gcd: naive hack to chose a 'good' prime (to speed up gcd computation). commit 62923ac249c7e4f7e824bc37030ac79bab3675f3 Author: Alexei Sheplyakov Date: Mon Sep 29 09:58:35 2008 +0400 [bugfix] remainder_in_ring: using exact division is plain wrong. commit d5c76f155cfbd25ccfd14735b6d1041e23214a86 Author: Alexei Sheplyakov Date: Mon Sep 29 09:53:46 2008 +0400 [bugfix] normalize_in_ring: don't set the leading coefficient to 1. The coefficient ring is not a field, so the leading coefficient don't have to be 1. commit ceb63120f43b41b62dcb0328231a3137d666161b Author: Alexei Sheplyakov Date: Thu Sep 25 13:19:57 2008 +0400 [trivial] excompiler.cpp: shut up some silly compiler warnings. GCC warns about 'comparison between signed and unsigned integer expressions'. In this case such comparison is harmless, but still it's a bit annoying. ----------------------------------------------------------------------- Summary of changes: check/Makefile.am | 4 + check/exam_archive.cpp | 3 +- check/test_runner.h | 67 + check/time_uvar_gcd.cpp | 1877 +++++++++++++++++++++++++++++ doc/examples/mystring.cpp | 24 +- doc/tutorial/ginac.texi | 195 +--- ginac/Makefile.am | 6 + ginac/add.cpp | 12 +- ginac/add.h | 3 +- ginac/archive.cpp | 46 +- ginac/archive.h | 80 ++ ginac/basic.cpp | 47 +- ginac/basic.h | 31 +- ginac/clifford.cpp | 40 +- ginac/clifford.h | 25 +- ginac/color.cpp | 34 +- ginac/color.h | 12 +- ginac/constant.cpp | 20 +- ginac/constant.h | 7 +- ginac/container.h | 104 +- ginac/ex.h | 3 +- ginac/excompiler.cpp | 6 +- ginac/expairseq.cpp | 38 +- ginac/expairseq.h | 3 + ginac/exprseq.h | 3 - ginac/fail.cpp | 3 +- ginac/fail.h | 2 + ginac/fderivative.cpp | 9 +- ginac/fderivative.h | 3 + ginac/function.pl | 40 +- ginac/idx.cpp | 29 +- ginac/idx.h | 12 +- ginac/indexed.cpp | 22 +- ginac/indexed.h | 7 +- ginac/integral.cpp | 12 +- ginac/integral.h | 8 +- ginac/lst.cpp | 3 + ginac/lst.h | 4 +- ginac/matrix.cpp | 20 +- ginac/matrix.h | 6 + ginac/mul.cpp | 17 +- ginac/mul.h | 3 +- ginac/ncmul.cpp | 23 +- ginac/ncmul.h | 4 +- ginac/numeric.cpp | 24 +- ginac/numeric.h | 6 + ginac/polynomial/eval_uvar.h | 38 + ginac/polynomial/gcd_uvar.cpp | 33 + ginac/polynomial/heur_gcd_uvar.h | 66 + ginac/polynomial/interpolate_padic_uvar.h | 40 + ginac/polynomial/mod_gcd.cpp | 12 +- ginac/polynomial/normalize.tcc | 3 +- ginac/polynomial/prem_uvar.h | 47 + ginac/polynomial/remainder.tcc | 2 +- ginac/polynomial/ring_traits.hpp | 13 + ginac/polynomial/sr_gcd_uvar.h | 95 ++ ginac/polynomial/upoly.hpp | 31 + ginac/power.cpp | 11 +- ginac/power.h | 12 +- ginac/pseries.cpp | 10 +- ginac/pseries.h | 5 + ginac/ptr.h | 10 +- ginac/registrar.cpp | 10 - ginac/registrar.h | 75 +- ginac/relational.cpp | 16 +- ginac/relational.h | 8 +- ginac/structure.h | 35 +- ginac/symbol.cpp | 231 ++-- ginac/symbol.h | 79 +- ginac/symmetry.cpp | 15 +- ginac/symmetry.h | 6 + ginac/tensor.cpp | 26 +- ginac/tensor.h | 19 +- ginac/utils.cpp | 2 + ginac/utils.h | 16 +- ginac/wildcard.cpp | 15 +- ginac/wildcard.h | 6 + ginsh/ginsh.h | 2 +- ginsh/ginsh_lexer.ll | 8 +- 79 files changed, 3121 insertions(+), 823 deletions(-) create mode 100644 check/test_runner.h create mode 100644 check/time_uvar_gcd.cpp create mode 100644 ginac/polynomial/eval_uvar.h create mode 100644 ginac/polynomial/gcd_uvar.cpp create mode 100644 ginac/polynomial/heur_gcd_uvar.h create mode 100644 ginac/polynomial/interpolate_padic_uvar.h create mode 100644 ginac/polynomial/prem_uvar.h create mode 100644 ginac/polynomial/sr_gcd_uvar.h hooks/post-receive -- GiNaC -- a C++ library for symbolic computations From kisilv at maths.leeds.ac.uk Tue Oct 21 00:08:31 2008 From: kisilv at maths.leeds.ac.uk (Vladimir V. Kisil) Date: Mon, 20 Oct 2008 23:08:31 +0100 Subject: [GiNaC-devel] make check failed Message-ID: <6110.1224540511@localhost> Dear All, I pulled a unstable version of GiNaC today. I was able to compile GiNaC, however "make check" failed with the following errors: exam_cra.cpp: In function 'int main(int, char**)': exam_cra.cpp:72: error: 'numeric_limits' is not a member of 'std' exam_cra.cpp:72: error: expected primary-expression before '(' token exam_cra.cpp:72: error: 'numeric_limits' is not a member of 'std' exam_cra.cpp:72: error: expected primary-expression before 'int' exam_cra.cpp:76: error: 'numeric_limits' is not a member of 'std' exam_cra.cpp:76: error: expected primary-expression before '(' token exam_cra.cpp:76: error: 'numeric_limits' is not a member of 'std' exam_cra.cpp:76: error: expected primary-expression before 'long' What can be a reason? Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/ From varg at theor.jinr.ru Tue Oct 21 08:14:40 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Tue, 21 Oct 2008 10:14:40 +0400 Subject: [GiNaC-devel] make check failed In-Reply-To: <6110.1224540511@localhost> References: <6110.1224540511@localhost> Message-ID: <20081021061440.GA32373@theor.jinr.ru> Dear Vladimir, On Mon, Oct 20, 2008 at 11:08:31PM +0100, Vladimir V. Kisil wrote: > I pulled a unstable version of GiNaC today. I was able to > compile GiNaC, however "make check" failed with the following errors: > > exam_cra.cpp: In function 'int main(int, char**)': > exam_cra.cpp:72: error: 'numeric_limits' is not a member of 'std' > exam_cra.cpp:72: error: expected primary-expression before '(' token > exam_cra.cpp:72: error: 'numeric_limits' is not a member of 'std' > exam_cra.cpp:72: error: expected primary-expression before 'int' > exam_cra.cpp:76: error: 'numeric_limits' is not a member of 'std' > exam_cra.cpp:76: error: expected primary-expression before '(' token > exam_cra.cpp:76: error: 'numeric_limits' is not a member of 'std' > exam_cra.cpp:76: error: expected primary-expression before 'long' Could you please try the patch below? From: Alexei Sheplyakov Subject: [PATCH] exam_cra: explicitly #include . This should make g++ 4.3 happy. --- check/exam_cra.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/check/exam_cra.cpp b/check/exam_cra.cpp index 11e1ab7..2c6163e 100644 --- a/check/exam_cra.cpp +++ b/check/exam_cra.cpp @@ -7,6 +7,7 @@ #include #include #include +#include using namespace cln; using namespace std; -- 1.5.6.5 Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: From kisilv at maths.leeds.ac.uk Tue Oct 21 10:08:43 2008 From: kisilv at maths.leeds.ac.uk (Vladimir V. Kisil) Date: Tue, 21 Oct 2008 09:08:43 +0100 Subject: [GiNaC-devel] make check failed In-Reply-To: <20081021061440.GA32373@theor.jinr.ru> References: <6110.1224540511@localhost> <20081021061440.GA32373@theor.jinr.ru> Message-ID: <11732.1224576523@localhost> >>>>> On Tue, 21 Oct 2008 10:14:40 +0400, Alexei Sheplyakov said: AS> Could you please try the patch below? Thanks, Alexei, it compiles now. However I got an error while running the checks: examining Garner's integer chinese remainder algorithm /bin/sh: line 4: 17202 Segmentation fault ${dir}$tst FAIL: exam_cra Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/ From kisilv at maths.leeds.ac.uk Tue Oct 21 10:43:02 2008 From: kisilv at maths.leeds.ac.uk (Vladimir V. Kisil) Date: Tue, 21 Oct 2008 09:43:02 +0100 Subject: [GiNaC-devel] New tinfo mechanism Message-ID: <12127.1224578582@localhost> Dear All, I wish to identify an object by the new tinfo mechanism. I used the naive expression ex_to(other).return_type_tinfo() However for ncmul, for example, it still returns the type of the first non-commutative factor, not make_return_type_t() as may be expected from basic::return_type_info(). What is most correct way to get the ncmul identified? Many thanks and best wishes, Vladimir -- Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/ From varg at theor.jinr.ru Tue Oct 21 12:07:27 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Tue, 21 Oct 2008 14:07:27 +0400 Subject: [GiNaC-devel] New tinfo mechanism In-Reply-To: <12127.1224578582@localhost> References: <12127.1224578582@localhost> Message-ID: <20081021100727.GA31784@theor.jinr.ru> Hello, On Tue, Oct 21, 2008 at 09:43:02AM +0100, Vladimir V. Kisil wrote: > I wish to identify an object by the new tinfo mechanism. > I used the naive expression > ex_to(other).return_type_tinfo() \begin{nitpick} I don't quite understand what was wrong with other.return_type_tinfo() \end{nitpick} > However for ncmul, for example, it still returns the type of the first > non-commutative factor, Old RTTI did the same thing. > not make_return_type_t() as may be expected from basic::return_type_info(). I'm very confused. Such a behaviour denies the whole point of RTTI. Why on Earth one would expect it? Anyway, both C++ RTTI ("new tinfo system") and GiNaC's custom RTTI follow the standard (see paragraph 5.2.8, "Type identification"): "2. When typeid is applied to an lvalue expression whose type is a polymorphic class type (10.3), the result refers to a type_info object representing the type of the most derived object (1.8) (that is, the dynamic type) to which the lvalue refers." So your expectation is plain wrong. > What is most correct way to get the ncmul identified? Could you please be more specific? What does 'identify ncmul' mean? a. Check if the object is ncmul or its derived class. b. Check what is exactly the type of ncmul object. c. Something else. Or even better -- post the fragment of a (pseudo)code, explain what you expect, and what it actually does. Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: From varg at theor.jinr.ru Tue Oct 21 12:45:59 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Tue, 21 Oct 2008 14:45:59 +0400 Subject: [GiNaC-devel] make check failed In-Reply-To: <11732.1224576523@localhost> References: <6110.1224540511@localhost> <20081021061440.GA32373@theor.jinr.ru> <11732.1224576523@localhost> Message-ID: <20081021104559.GA6355@theor.jinr.ru> Dear Vladimir, On Tue, Oct 21, 2008 at 09:08:43AM +0100, Vladimir V. Kisil wrote: > examining Garner's integer chinese remainder algorithm /bin/sh: line 4: > 17202 Segmentation fault ${dir}$tst > FAIL: exam_cra This information is not very useful on its own. Could you please post a. a backtrace. b. compiler version (and compilation options). c. version of CLN. Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: From kisilv at maths.leeds.ac.uk Wed Oct 22 12:25:15 2008 From: kisilv at maths.leeds.ac.uk (Vladimir V. Kisil) Date: Wed, 22 Oct 2008 11:25:15 +0100 Subject: [GiNaC-devel] New tinfo mechanism In-Reply-To: <20081021100727.GA31784@theor.jinr.ru> References: <12127.1224578582@localhost> <20081021100727.GA31784@theor.jinr.ru> Message-ID: <11890.1224671115@localhost> Dear Alexei, >>>>> On Tue, 21 Oct 2008 14:07:27 +0400, Alexei Sheplyakov said: AS> Could you please be more specific? I was looking for a minimal patch to pyGiNaC (yes, I know, you will not approve this activity ;-) to make it working with a present development branch. AS> b. Check what is exactly the type of ncmul object. Using your hint I replace all usages of tinfos with is_exactly_a() function and obtained that I wanted. Many thanks and best wishes, Vladimir -- Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/ From kisilv at maths.leeds.ac.uk Wed Oct 22 16:06:02 2008 From: kisilv at maths.leeds.ac.uk (Vladimir V. Kisil) Date: Wed, 22 Oct 2008 15:06:02 +0100 Subject: [GiNaC-devel] make check failed In-Reply-To: <20081021104559.GA6355@theor.jinr.ru> References: <6110.1224540511@localhost> <20081021061440.GA32373@theor.jinr.ru> <11732.1224576523@localhost> <20081021104559.GA6355@theor.jinr.ru> Message-ID: <21036.1224684362@localhost> Dear Alexei, I am sorry for the incomplete initial report on the problem. The requested information is: a. a backtrace. (gdb) r Starting program: /usr/local/distrib/math/ginac/check/.libs/lt-exam_cra examining Garner's integer chinese remainder algorithm Program received signal SIGSEGV, Segmentation fault. 0xb7bed2d0 in cln::find_modint_ring () from /usr/lib/libcln.so.5 (gdb) where #0 0xb7bed2d0 in cln::find_modint_ring () from /usr/lib/libcln.so.5 #1 0xb7ecd21f in compute_mix_radix_coeffs (dst=@0xbff5c570, residues=@0xbff5c728, moduli=@0xbff5c734, recips=@0xbff5c57c) at polynomial/cra_garner.cpp:44 #2 0xb7ece857 in cln::integer_cra (residues=@0xbff5c728, moduli=@0xbff5c734) at polynomial/cra_garner.cpp:81 #3 0x0804a140 in run_test_once (lim=) at exam_cra.cpp:40 #4 0x0804aa57 in main () at exam_cra.cpp:65 b. compiler version (and compilation options) the current version in Debian/testing. $ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Debian 4.3.2-1) c. version of CLN---the current version in Debian/testing. ii libcln5 1.2.2-2 Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/ From kreckel at ginac.de Wed Oct 22 23:02:37 2008 From: kreckel at ginac.de (Richard B. Kreckel) Date: Wed, 22 Oct 2008 23:02:37 +0200 Subject: [GiNaC-devel] [GiNaC-list] GiNaC Licensing. In-Reply-To: <20081022065708.GA19977@theor.jinr.ru> References: <8888f89e0810210948n2def23c9t4a10e92f5101511@mail.gmail.com> <48FE4087.3090004@ginac.de> <20081022065708.GA19977@theor.jinr.ru> Message-ID: <48FF94ED.1010506@ginac.de> Hi! Alexei Sheplyakov wrote: > I really dislike dual licensing thing, especially if the second license > is BSD. I don't want to be a free (as in `free beer') employee of every > company making proprietary software. Remembering Bruno Haible's stance regarding the issue of dual-licensing CLN, there is no point considering this option further. So, I've placed a new entry in the FAQ. Cheers -richy. -- Richard B. Kreckel From varg at theor.jinr.ru Thu Oct 23 15:57:26 2008 From: varg at theor.jinr.ru (Alexei Sheplyakov) Date: Thu, 23 Oct 2008 17:57:26 +0400 Subject: [GiNaC-devel] make check failed In-Reply-To: <21036.1224684362@localhost> References: <6110.1224540511@localhost> <20081021061440.GA32373@theor.jinr.ru> <11732.1224576523@localhost> <20081021104559.GA6355@theor.jinr.ru> <21036.1224684362@localhost> Message-ID: <20081023135726.GA7013@theor.jinr.ru> Dear Vladimir, On Wed, Oct 22, 2008 at 03:06:02PM +0100, Vladimir V. Kisil wrote: > (gdb) r > Starting program: /usr/local/distrib/math/ginac/check/.libs/lt-exam_cra > examining Garner's integer chinese remainder algorithm > Program received signal SIGSEGV, Segmentation fault. > 0xb7bed2d0 in cln::find_modint_ring () from /usr/lib/libcln.so.5 > (gdb) where > #0 0xb7bed2d0 in cln::find_modint_ring () from /usr/lib/libcln.so.5 > #1 0xb7ecd21f in compute_mix_radix_coeffs (dst=@0xbff5c570, residues=@0xbff5c728, > moduli=@0xbff5c734, recips=@0xbff5c57c) at polynomial/cra_garner.cpp:44 > #2 0xb7ece857 in cln::integer_cra (residues=@0xbff5c728, moduli=@0xbff5c734) > at polynomial/cra_garner.cpp:81 > #3 0x0804a140 in run_test_once (lim=) at exam_cra.cpp:40 > #4 0x0804aa57 in main () at exam_cra.cpp:65 Thanks, I've managed to reproduce the bug. The patch below should fix it. Could you please check if it works for you? From: Alexei Sheplyakov Subject: [PATCH] [bugfix] integer_cra: check if arguments contain at least 2 moduli While at it, also fix exam_cra so it does not produce pointless inputs. --- check/exam_cra.cpp | 4 +++- ginac/polynomial/cra_garner.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/check/exam_cra.cpp b/check/exam_cra.cpp index 2c6163e..6e24770 100644 --- a/check/exam_cra.cpp +++ b/check/exam_cra.cpp @@ -102,12 +102,14 @@ make_random_moduli(const cln::cl_I& limit) std::vector moduli; cln::cl_I prod(1); cln::cl_I next = random_I(std::min(limit >> 1, cln::cl_I(128))); + unsigned count = 0; do { cln::cl_I tmp = nextprobprime(next); next = tmp + random_I(cln::cl_I(10)) + 1; prod = prod*tmp; moduli.push_back(tmp); - } while (prod < limit); + ++count; + } while (prod < limit || (count < 2)); return moduli; } diff --git a/ginac/polynomial/cra_garner.cpp b/ginac/polynomial/cra_garner.cpp index b400adb..76d1e07 100644 --- a/ginac/polynomial/cra_garner.cpp +++ b/ginac/polynomial/cra_garner.cpp @@ -3,6 +3,7 @@ #include #include #include "cra_garner.hpp" +#include "compiler.h" namespace cln { @@ -73,6 +74,8 @@ mixed_radix_2_ordinary(const vector& mixed_radix_coeffs, cl_I integer_cra(const vector& residues, const vector& moduli) { + if (unlikely(moduli.size() < 2)) + throw std::invalid_argument("integer_cra: need at least 2 moduli"); vector recips(moduli.size() - 1); compute_recips(recips, moduli); -- 1.5.6.5 Best regards, Alexei -- All science is either physics or stamp collecting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 827 bytes Desc: Digital signature URL: