2010/5/22 cschwan <csch...@students.uni-mainz.de>:
> @Willem: I took the suppression file from Sage's valgrind.spkg - this
> filtered a lot meesages.
>
> @Paulo:
>
> valgrind --db-attach=yes --freelist-vol=100000000 python
>  /usr/share/sage/local/bin/sage-ipython
>
> does not work for me - valgrind prints only a message while starting,
> but does not show summary unless i add --trace-children=yes. Do you
> enable this, too ? With this switch I get tons of output (is this
> normal behaviour?) which make it impossible to find any hint to to
> resolve my problem ...

  I just tried it in my computer, to ensure I did not pass any wrong
information :-)

  But I first inspected the contents of
"devel/sage/doc/en/reference/sage/categories/examples/algebras_with_basis.rst"

  I am not sure what is the correct procedure to view the output in
text mode, so, I just opened
file:///usr/share/sage/devel/doc/output/html/en/reference/sage/categories/examples/algebras_with_basis.html
in firefox. That is the path in my rpm (/usr/share/sage/sage is a
symlink to the system wide python site dir, so I use the doc in a
directory below).
  Then, I did a cut&paste of the examples, commenting the expected
results, i.e.:
-%<-
sage: A = AlgebrasWithBasis(QQ).example(); A
# An example of an algebra with basis: the free algebra on the
generators ('a', 'b', 'c') over Rational Field
sage: A.algebra_generators()
# Family (B[word: a], B[word: b], B[word: c])
sage: A = AlgebrasWithBasis(QQ).example()
sage: A.one_basis()
# word:
sage: A.one()
# B[word: ]
sage: A = AlgebrasWithBasis(QQ).example()
sage: Words = A.basis().keys()
sage: A.product_on_basis(Words("acb"), Words("cba"))
# B[word: acbcba]
sage: (a,b,c) = A.algebra_generators()
sage: a * (1-b)^2 * c
# B[word: abbc] - 2*B[word: abc] + B[word: ac]
-%<-

  And here is a cut&paste of the session in a fresh xterm:
-%<-
export CUR=`pwd`
export DOT_SAGE="$HOME/.sage/"
export DOT_SAGENB="$DOT_SAGE"
mkdir -p $DOT_SAGE/{maxima,sympow,tmp}
export SAGE_TESTDIR=$DOT_SAGE/tmp
export SAGE_ROOT="/usr/share/sage"
export SAGE_LOCAL="/usr/share/sage/local"
export SAGE_DATA="/usr/share/sage/data"
export SAGE_DEVEL="/usr/share/sage/devel"
export SAGE_DOC="/usr/share/sage/devel/doc"
export PATH=/usr/share/sage/local/bin:/usr/share/cdd/bin:$PATH
export SINGULARPATH=/usr/share/singular/LIB
export SINGULAR_BIN_DIR=/usr/share/singular/i386
export PYTHONPATH="/usr/share/sage/site-packages"
export SAGE_CBLAS=cblas
export SAGE_FORTRAN=/usr/bin/gfortran
export SAGE_FORTRAN_LIB=`gfortran --print-file-name=libgfortran.so`
export SYMPOW_DIR="$DOT_SAGE/sympow"
/usr/share/sage/local/bin/sage-sage "$@"
[pa...@localhost ~]$ export CUR=`pwd`
[pa...@localhost ~]$ export DOT_SAGE="$HOME/.sage/"
[pa...@localhost ~]$ export DOT_SAGENB="$DOT_SAGE"
[pa...@localhost ~]$ mkdir -p $DOT_SAGE/{maxima,sympow,tmp}
[pa...@localhost ~]$ export SAGE_TESTDIR=$DOT_SAGE/tmp
[pa...@localhost ~]$ export SAGE_ROOT="/usr/share/sage"
[pa...@localhost ~]$ export SAGE_LOCAL="/usr/share/sage/local"
[pa...@localhost ~]$ export SAGE_DATA="/usr/share/sage/data"
[pa...@localhost ~]$ export SAGE_DEVEL="/usr/share/sage/devel"
[pa...@localhost ~]$ export SAGE_DOC="/usr/share/sage/devel/doc"
[pa...@localhost ~]$ export
PATH=/usr/share/sage/local/bin:/usr/share/cdd/bin:$PATH
[pa...@localhost ~]$ export SINGULARPATH=/usr/share/singular/LIB
[pa...@localhost ~]$ export SINGULAR_BIN_DIR=/usr/share/singular/i386
[pa...@localhost ~]$ export PYTHONPATH="/usr/share/sage/site-packages"
[pa...@localhost ~]$ export SAGE_CBLAS=cblas
[pa...@localhost ~]$ export SAGE_FORTRAN=/usr/bin/gfortran
[pa...@localhost ~]$ export SAGE_FORTRAN_LIB=`gfortran
--print-file-name=libgfortran.so`
[pa...@localhost ~]$ export SYMPOW_DIR="$DOT_SAGE/sympow"
[pa...@localhost ~]$ export IPYTHONDIR="$DOT_SAGE/ipython"
[pa...@localhost ~]$ export IPYTHONRC="ipythonrc"
[pa...@localhost ~]$ valgrind --db-attach=yes --freelist-vol=100000000
python /usr/share/sage/local/bin/sage-ipython
==5336== Memcheck, a memory error detector
==5336== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==5336== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==5336== Command: python /usr/share/sage/local/bin/sage-ipython
==5336==
sage: A = AlgebrasWithBasis(QQ).example(); A
An example of an algebra with basis: the free algebra on the
generators ('a', 'b', 'c') over Rational Field
sage: A.algebra_generators()
Family (B[word: a], B[word: b], B[word: c])
sage: A = AlgebrasWithBasis(QQ).example()
sage: A.one_basis()
word:
sage: A.one()
B[word: ]
sage: A = AlgebrasWithBasis(QQ).example()
sage: Words = A.basis().keys()
sage: A.product_on_basis(Words("acb"), Words("cba"))
B[word: acbcba]
sage: (a,b,c) = A.algebra_generators()
sage: a * (1-b)^2 * c
B[word: abbc] - 2*B[word: abc] + B[word: ac]
sage: quit
Exiting Sage (CPU time 0m7.84s, Wall time 1m13.71s).
==5336==
==5336== HEAP SUMMARY:
==5336==     in use at exit: 34,615,866 bytes in 253,452 blocks
==5336==   total heap usage: 11,757,376 allocs, 11,503,924 frees,
3,758,300,867 bytes allocated
==5336==
==5336== LEAK SUMMARY:
==5336==    definitely lost: 727 bytes in 24 blocks
==5336==    indirectly lost: 20,277 bytes in 33 blocks
==5336==      possibly lost: 33,807,559 bytes in 239,447 blocks
==5336==    still reachable: 787,303 bytes in 13,948 blocks
==5336==         suppressed: 0 bytes in 0 blocks
==5336== Rerun with --leak-check=full to see details of leaked memory
==5336==
==5336== For counts of detected and suppressed errors, rerun with: -v
==5336== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1593 from 13)
-%<-

  Note that it took quite some time to get the sage prompt, just keep
a look in 'top';
if memcheck-* is at almost 100% it is running, but you should already know about
that :-)

  But I did this test on i686, using system valgrind. When I told it
could be polybori,
and require that patch, also note that I build polybori with system boost....

  But this response may still be misleading, as I did the test on sage
4.4 (I will
probably skip 4.4.1 and work on a 4.4.2 package or newer once Mandriva 2010.1
is released...)

Paulo

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to