Question about some Sage scripts

64 views
Skip to first unread message

John H Palmieri

unread,
Feb 23, 2022, 5:21:08 PM2/23/22
to sage-devel
I have questions about some of the scripts in src/bin:
  • math-readline — used sometimes in Sage's mathematica interface. Is it necessary?
  • sage-inline-fortran — does anyone use this?
  • sage-native-execute: looks like a no-op. Delete?
  • sage-open — used in OS X; can we just use "open"?
  • sage-rebase* — used on Cygwin only: move to build/bin?
  • sage-cachegrind, sage-callgrind, sage-massif, sage-omega, sage-valgrind — do people use these?
  • sage-venv-config — where is this used? `git grep sage-venv-config` doesn't reveal much.
  • sage-location, sage-update-src: in the process of being removed already
--
John

Matthias Koeppe

unread,
Feb 23, 2022, 9:17:21 PM2/23/22
to sage-devel
On Wednesday, February 23, 2022 at 2:21:08 PM UTC-8 John H Palmieri wrote:
I have questions about some of the scripts in src/bin:
  • sage-native-execute: looks like a no-op. Delete?
  • sage-open — used in OS X; can we just use "open"?
Yes on both of these. They have not been needed since Sage stopped setting LD_LIBRARY_PATH (or its defunct equivalent on macOS).
  • sage-rebase* — used on Cygwin only: move to build/bin?
On Cygwin, users also may need to run this after using "sage -pip install ...", so I'd suggest to keep it in src/bin
  • sage-venv-config — where is this used? `git grep sage-venv-config` doesn't reveal much.
"git grep venv-config" reveals that it is called by the installed sage script. (The name of the script is constructed from $0.)
Its only function at the moment is to determine SAGE_VENV, which is then used by sage-env.

 

John H Palmieri

unread,
Feb 24, 2022, 2:31:36 PM2/24/22
to sage-devel
Thanks.

I've always kind of hated this construction/obfuscation of script names, because it makes it harder to find out where and how they are used. But presumably it has its uses.

Michael Orlitzky

unread,
Feb 24, 2022, 4:13:47 PM2/24/22
to sage-...@googlegroups.com
On Wed, 2022-02-23 at 14:21 -0800, John H Palmieri wrote:
>
> - sage-cachegrind, sage-callgrind, sage-massif, sage-omega,
> sage-valgrind — do people use these?

Not really, but they do have /some/ value. At the useful end, the sage-
valgrind script,

1. Tries to guess where the python3 suppressions file lives on your 
system
2. Adds that and some sage-specific suppressions to the command-line
3. Sets some other default valgrind flags, and
4. Launches valgrind on "sage-python -i"

At the other end, sage-callgrind merely picks a log file and launches
"valgrind --tool=callgrind" on sage-ipython.

Ultimately I think we'd be better off documenting how to run your own
valgrind installation on sage. Even the more-useful sage-valgrind
script is basically wrapping standard usage in an opaque script. But
there's certainly more egregious cruft lying around.


Matthias Koeppe

unread,
Feb 24, 2022, 5:20:25 PM2/24/22
to sage-devel
Also the valgrind suppressions are no longer current. See https://trac.sagemath.org/ticket/33074
Reply all
Reply to author
Forward
0 new messages