2010/5/16 cschwan <csch...@students.uni-mainz.de>: > I already tried valgrind but it did not work - how do I exactly use > it ? When I run > > sage -valgrind -t -force_lib "devel/sage/doc/en/reference/sage/ > categories/examples/algebras_with_basis.rst" > > I get: > > ---------------------------------------------------------------------- > | Sage Version 4.4.1, Release Date: 2010-05-02 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > /opt/sage/local/bin/sage-ipython > Log file is /home/gnuke/.sage/valgrind/sage-memcheck.%p > Using default flags: > --leak-resolution=high --log-file=/home/gnuke/.sage/valgrind/sage- > memcheck.%p --leak-check=full --num-callers=25 --suppressions=/opt/ > sage/local/lib/valgrind/sage.supp > > but nothing happens.
The procedure I use in the Mandriva package is: 1. set environment variables from /usr/bin/sage --%<-- #!/bin/sh 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 "$@" --%<-- the above is generated for i586, so, just cut&paste it, but the last line on a xterm 2. set ipython env export IPYTHONDIR="$DOT_SAGE/ipython" export IPYTHONRC="ipythonrc" 3. run valgrind valgrind --db-attach=yes --freelist-vol=100000000 python /usr/share/sage/local/bin/sage-ipython This is a procedure I "documented" in a commit, but it should not modify much for gentoo. It works as sage -gdb or sage -valgrind, but I think I prefer things the harder way, or where I have more control of what is going on... On the above procedure, I would also cut&paste the doctest in sage prompt. If valgrind reports too many memory errors, it may be harder, as you must say 'N' every time it asks if you want to attach gdb... 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