[sage-support] TIDES ode solver with vector dependent variable

2021-12-18 Thread Daniel Friedan
I am trying to solve some first order linear odes
 dy/dt = A(t) y
where y is an N vector and A(t) an NxN matrix with real entries.  N varies.

I need arbitrary precision arithmetic, so I'm trying to use
 sage.calculus.desolvers.desolve_tides_mpfr(f, ics, initial, final, 
delta, tolrel=1e-16,
tolabs=1e-16, digits=50)

desolve_tides_mpfr() requires the ode to be described by f which is a 
symbolic function f(t,y_1,...,y_N) of N+1 variables which returns a list of 
derivatives [dy_1/dt, ..., dy_N/dt]

My problem is that N varies.  I can write a symbolic expression of the form
  f(t,y) = A(t)*y
with two arguments, t a real number and y a vector, returning a vector.

But that is not acceptable to desolve_tides_mpfr().

Is there any way of avoiding writing a separate  f for each value of N?  
e.g.,
f(x,y_1,y_2) = list(A(t)*vector[y_1,y_2]))

thanks,
Daniel Friedan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/473ca93f-481f-4c30-9c7c-307f9649457cn%40googlegroups.com.


[sage-support] Re: Sage Crash report (again...)

2021-12-18 Thread Emmanuel Charpentier


I’m in trouble:

The previous steps (make giac-clean && make fricas-clean && make 
sagelib-clean && make) failed ; I reverted to (make distclean && make) … 
which failed.

Repeatedly…

I’ll report and post logs in sage-release, which seems te “right place” for 
an installation problem occurring on a previously-working system.

Thank you for your attention.
​
Le samedi 18 décembre 2021 à 10:44:07 UTC+1, Emmanuel Charpentier a écrit :

> Same circumstances as in the previous case : on Debian testing running on 
> core i7 + 16 GB RAM, after upgrading Sage 9.5.beta7 compiled from a git 
> tree  to 9.5.beta8, Sage crashes at startup. Crash report enclosed
>
> I'll try the same steps as in the last occurrence...
>
> --
> Emmanuel Charpentier
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a44974fb-75c1-4afa-a315-e90531c3f7edn%40googlegroups.com.


[sage-support] Sage Crash report (again...)

2021-12-18 Thread Emmanuel Charpentier
Same circumstances as in the previous case : on Debian testing running
on core i7 + 16 GB RAM, after upgrading Sage 9.5.beta7 compiled from a
git tree  to 9.5.beta8, Sage crashes at startup. Crash report enclosed

I'll try the same steps as in the last occurrence...

--
Emmanuel Charpentier

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/14e68240fe2d60a5c5e1b718b0c3d1d1e6eb13a1.camel%40free.fr.
***

IPython post-mortem report

{'commit_hash': 'd6d0edce10',
 'commit_source': 'installation',
 'default_encoding': 'utf-8',
 'ipython_path': 
'/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/IPython',
 'ipython_version': '7.27.0',
 'os_name': 'posix',
 'platform': 'Linux-5.15.0-2-amd64-x86_64-with-glibc2.33',
 'sys_executable': 
'/usr/local/sage-9/local/var/lib/sage/venv-python3.9/bin/python3',
 'sys_platform': 'linux',
 'sys_version': '3.9.9 (main, Nov 16 2021, 10:24:31) \n[GCC 11.2.0]'}

***



***

Crash traceback:

---
---
ImportErrorPython 3.9.9: 
/usr/local/sage-9/local/var/lib/sage/venv-python3.9/bin/python3
   Sat Dec 18 10:31:33 2021
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/local/sage-9/src/bin/sage-ipython in 
  1 #!/usr/bin/env sage-python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Display startup banner. Do this before anything else to give the user
  8 # early feedback that Sage is starting.
  9 from sage.misc.banner import banner
 10 banner()
 11 
 12 from sage.repl.interpreter import SageTerminalApp
 13 
 14 app = SageTerminalApp.instance()
---> 15 app.initialize()
global app.initialize = >
 16 app.start()

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/traitlets/config/application.py
 in inner(app=, *args=(), 
**kwargs={})
 73 else:
 74 raise ValueError("Unsupported value for environment variable: 
'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of 
 {'0', '1', 'false', 'true', ''}."% _envvar )
 75 
 76 
 77 def catch_config_error(method):
 78 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 79 
 80 On a TraitError (generally caused by bad config), this will print 
the trait's
 81 message, and exit the app.
 82 
 83 For use on init methods, to prevent invoking excepthook on invalid 
input.
 84 """
 85 @functools.wraps(method)
 86 def inner(app, *args, **kwargs):
 87 try:
---> 88 return method(app, *args, **kwargs)
global method = undefined
app = 
args = ()
kwargs = {}
 89 except (TraitError, ArgumentError) as e:
 90 app.log.fatal("Bad config encountered during 
initialization: %s", e)
 91 app.log.debug("Config at the time: %s", app.config)
 92 app.exit(1)
 93 
 94 return inner
 95 
 96 class ApplicationError(Exception):
 97 pass
 98 
 99 
100 class LevelFormatter(logging.Formatter):
101 """Formatter with additional `highlevel` record
102 
103 This field is empty if log level is less than highlevel_limit,

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/IPython/terminal/ipapp.py
 in initialize(self=, argv=None)
302 
303 return super(TerminalIPythonApp, self).parse_command_line(argv)
304 
305 @catch_config_error
306 def initialize(self, argv=None):
307 """Do actions after construct, but before starting the app."""
308 super(TerminalIPythonApp, self).initialize(argv)
309 if self.subapp is not None:
310 # don't bother initializing further, starting subapp
311 return
312 # print self.extra_args
313 if self.extra_args and not self.something_to_run:
314 self.file_to_run = self.extra_args[0]
315 self.init_path()
316 # create the shell
--> 317 self.init_shell()
self.init_shell = >
318 # and draw the ban