[sage-support] Solve gives incorrect solutions for polynomial

2016-11-06 Thread Francis Banks


I am solving a polynomial which arises from plotting titration cures in 
chemistry. The rule of signs suggests it has one positive root. Find_root 
seems to find it. Solve with poly_solve=true does not. Instead it gives 4 
complex roots, which don't appear to satisfy the equation. They do not even 
form two conjugate pairs. Here is some code which illustrates the problem:

var('Kb','b0','K1','Ks','a0')
fx(x)=-Kb*x^4 - (b0*Kb + K1*Kb + Ks)*x^3 - (b0*K1*Kb - a0*K1*Kb + K1*Ks - 
Kb*Ks)*x^2 + (a0*K1*Ks + K1*Kb*Ks + Ks^2)*x + K1*Ks^2

fx(x)=fx.subs(K1=10^-2.15,Ks=10^-14,Kb=10^5.0,a0=0.1,b0=0)
s=find_root(fx,0,0.025,1E-14)
show(s)
s1=solve(fx,x,to_poly_solve=true)
show('roots from solve: 
',N(s1[0].rhs(),3));show(N(s1[1].rhs(),3));show(N(s1[2].rhs(),3));show(N(s1[3].rhs(),3))
show('Substituting first root from solve: ',N(fx(s1[0].rhs()),10))
show('Substituting first root from find_root: ',N(fx(s),10))
plot(fx,0.001,0.03)


Can someone shed light on this?

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Sage Crash Report

2016-11-06 Thread Afonso Henriques Silva Leite
Please, I need some help here!

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
***

IPython post-mortem report

{'commit_hash': u'1ba246d',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': 
'/home/lenovo/Documentos/SageMath/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '5.0.0',
 'os_name': 'posix',
 'platform': 'Linux-4.4.0-45-generic-x86_64-with-debian-stretch-sid',
 'sys_executable': '/home/lenovo/Documentos/SageMath/local/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.10 (default, Oct 19 2016, 19:45:17) \n[GCC 5.4.0 
20160609]'}

***



***

Crash traceback:

---
---
ImportErrorPython 2.7.10: /home/lenovo/Documentos/SageMath/local/bin/python
   Sun Nov  6 11:31:00 2016
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.
/home/lenovo/Documentos/SageMath/src/bin/sage-ipython in ()
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 from sage.repl.interpreter import SageTerminalApp
  8 
  9 app = SageTerminalApp.instance()
---> 10 app.initialize()
global app.initialize = >
 11 app.start()

 in initialize(self=, argv=None)

/home/lenovo/Documentos/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.py
 in catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 59 
 60 
#-
 61 # Application class
 62 
#-
 63 
 64 @decorator
 65 def catch_config_error(method, app, *args, **kwargs):
 66 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 67 
 68 On a TraitError (generally caused by bad config), this will print 
the trait's
 69 message, and exit the app.
 70 
 71 For use on init methods, to prevent invoking excepthook on invalid 
input.
 72 """
 73 try:
---> 74 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 75 except (TraitError, ArgumentError) as e:
 76 app.print_help()
 77 app.log.fatal("Bad config encountered during initialization:")
 78 app.log.fatal(str(e))
 79 app.log.debug("Config at the time: %s", app.config)
 80 app.exit(1)
 81 
 82 
 83 class ApplicationError(Exception):
 84 pass
 85 
 86 
 87 class LevelFormatter(logging.Formatter):
 88 """Formatter with additional `highlevel` record
 89 

/home/lenovo/Documentos/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.py
 in initialize(self=, argv=None)
294 
295 return super(TerminalIPythonApp, self).parse_command_line(argv)
296 
297 @catch_config_error
298 def initialize(self, argv=None):
299 """Do actions after construct, but before starting the app."""
300 super(TerminalIPythonApp, self).initialize(argv)
301 if self.subapp is not None:
302 # don't bother initializing further, starting subapp
303 return
304 # print self.extra_args
305 if self.extra_args and not self.something_to_run:
306 self.file_to_run = self.extra_args[0]
307 self.init_path()
308 # create the shell
--> 309 self.init_shell()
self.init_shell = >
310 # and draw the banner
311 self.init_banner()
312 # Now a variety of things that happen after the banner is 
printed.
313 self.init_gui_pylab()
314 self.init_extensions()
315 self.init_code()
316 
317 def init_shell(self):
318 """initialize the InteractiveShell instance"""
319 # Create an InteractiveShell instance.
320 # shell.display_banner should always be False for the terminal
321 # based app,

Re: [sage-support] sagemath-dev ppa

2016-11-06 Thread Jan Groenewald
Hi

Did you install sagemath-upstream-binary-full?

Did you use sudo to install manifolds?

Regards,
Jan

On 5 November 2016 at 23:53, Henri Girard  wrote:

> thanks... Anyway works fine for me, but I am trying sagemanifolds update
> and I have this error, I don't understand it.
>
> Regards
>
> Henri
>
> Downloading the sources of SageManifolds 0.9.1...
> --2016-11-05 22:50:52--  http://sagemanifolds.obspm.fr/
> spkg/manifolds-0.9.1.tar.gz
> Résolution de sagemanifolds.obspm.fr (sagemanifolds.obspm.fr)…
> 145.238.179.10
> Connexion à sagemanifolds.obspm.fr 
> (sagemanifolds.obspm.fr)|145.238.179.10|:80…
> connecté.
> requête HTTP transmise, en attente de la réponse… 304 Not Modified
> File «manifolds-0.9.1.tar.gz» not modified on server. Omitting download.
>
> Removing previous version of src/doc/en/reference/manifolds
> Removing previous version of src/doc/en/reference/tensor_free_modules
> Removing previous version of src/sage/manifolds
> Removing previous version of src/sage/tensor/modules
> Unpacking...
> src/doc/en/reference/manifolds/conf.py
> src/doc/en/reference/manifolds/chart.rst
> src/doc/en/reference/manifolds/continuous_map.rst
> src/doc/en/reference/manifolds/diff_form.rst
> src/doc/en/reference/manifolds/diff_manifold.rst
> src/doc/en/reference/manifolds/diff_map.rst
> src/doc/en/reference/manifolds/diff_scalarfield.rst
> src/doc/en/reference/manifolds/index.rst
> src/doc/en/reference/manifolds/manifold.rst
> src/doc/en/reference/manifolds/riem_manifold.rst
> src/doc/en/reference/manifolds/scalarfield.rst
> src/doc/en/reference/manifolds/tangent_space.rst
> src/doc/en/reference/manifolds/tensorfield.rst
> src/doc/en/reference/manifolds/vectorfield.rst
> src/doc/en/reference/tensor_free_modules/conf.py
> src/doc/en/reference/tensor_free_modules/alt_forms.rst
> src/doc/en/reference/tensor_free_modules/index.rst
> src/doc/en/reference/tensor_free_modules/morphisms.rst
> src/doc/en/reference/tensor_free_modules/tensors.rst
> src/sage/manifolds/all.py
> src/sage/manifolds/chart.py
> src/sage/manifolds/continuous_map.py
> src/sage/manifolds/coord_func.py
> src/sage/manifolds/coord_func_symb.py
> src/sage/manifolds/__init__.py
> src/sage/manifolds/manifold_homset.py
> src/sage/manifolds/manifold.py
> src/sage/manifolds/point.py
> src/sage/manifolds/scalarfield_algebra.py
> src/sage/manifolds/scalarfield.py
> src/sage/manifolds/structure.py
> src/sage/manifolds/subset.py
> src/sage/manifolds/utilities.py
> src/sage/manifolds/differentiable/affine_connection.py
> src/sage/manifolds/differentiable/automorphismfield_group.py
> src/sage/manifolds/differentiable/automorphismfield.py
> src/sage/manifolds/differentiable/chart.py
> src/sage/manifolds/differentiable/curve.py
> src/sage/manifolds/differentiable/diff_form_module.py
> src/sage/manifolds/differentiable/diff_form.py
> src/sage/manifolds/differentiable/diff_map.py
> src/sage/manifolds/differentiable/__init__.py
> src/sage/manifolds/differentiable/levi_civita_connection.py
> src/sage/manifolds/differentiable/manifold_homset.py
> src/sage/manifolds/differentiable/manifold.py
> src/sage/manifolds/differentiable/metric.py
> src/sage/manifolds/differentiable/real_line.py
> src/sage/manifolds/differentiable/scalarfield_algebra.py
> src/sage/manifolds/differentiable/scalarfield.py
> src/sage/manifolds/differentiable/tangent_space.py
> src/sage/manifolds/differentiable/tangent_vector.py
> src/sage/manifolds/differentiable/tensorfield_module.py
> src/sage/manifolds/differentiable/tensorfield_paral.py
> src/sage/manifolds/differentiable/tensorfield.py
> src/sage/manifolds/differentiable/vectorfield_module.py
> src/sage/manifolds/differentiable/vectorfield.py
> src/sage/manifolds/differentiable/vectorframe.py
> src/sage/tensor/modules/all.py
> src/sage/tensor/modules/comp.py
> src/sage/tensor/modules/ext_pow_free_module.py
> src/sage/tensor/modules/finite_rank_free_module.py
> src/sage/tensor/modules/format_utilities.py
> src/sage/tensor/modules/free_module_alt_form.py
> src/sage/tensor/modules/free_module_automorphism.py
> src/sage/tensor/modules/free_module_basis.py
> src/sage/tensor/modules/free_module_homset.py
> src/sage/tensor/modules/free_module_linear_group.py
> src/sage/tensor/modules/free_module_morphism.py
> src/sage/tensor/modules/free_module_tensor.py
> src/sage/tensor/modules/__init__.py
> src/sage/tensor/modules/tensor_free_module.py
> src/sage/tensor/modules/tensor_with_indices.py
>
> Running ./sage -b to re-build Sage.
> (cd .\
>  && export SAGE_ROOT=/doesnotexist\
>SAGE_SRC=/doesnotexist\
>SAGE_SRC_ROOT=/doesnotexist\
>SAGE_DOC_SRC=/doesnotexist\
>SAGE_SCRIPTS_DIR=/doesnotexist\
>SAGE_BUILD_DIR=/doesnotexist\
>SAGE_PKGS=/usr/lib/sagemath//build/pkgs\
>SAGE_CYTHONIZED=/usr/lib/sagemath//src/bui

[sage-support] Re: Solve gives incorrect solutions for polynomial

2016-11-06 Thread Dima Pasechnik


On Sunday, November 6, 2016 at 3:00:30 PM UTC, Francis Banks wrote:
>
> I am solving a polynomial which arises from plotting titration cures in 
> chemistry. The rule of signs suggests it has one positive root. Find_root 
> seems to find it. Solve with poly_solve=true does not. Instead it gives 4 
> complex roots, which don't appear to satisfy the equation. They do not even 
> form two conjugate pairs. Here is some code which illustrates the problem:
>
> var('Kb','b0','K1','Ks','a0')
> fx(x)=-Kb*x^4 - (b0*Kb + K1*Kb + Ks)*x^3 - (b0*K1*Kb - a0*K1*Kb + K1*Ks - 
> Kb*Ks)*x^2 + (a0*K1*Ks + K1*Kb*Ks + Ks^2)*x + K1*Ks^2
>
> fx(x)=fx.subs(K1=10^-2.15,Ks=10^-14,Kb=10^5.0,a0=0.1,b0=0)
> s=find_root(fx,0,0.025,1E-14)
> show(s)
> s1=solve(fx,x,to_poly_solve=true)
> show('roots from solve: 
> ',N(s1[0].rhs(),3));show(N(s1[1].rhs(),3));show(N(s1[2].rhs(),3));show(N(s1[3].rhs(),3))
> show('Substituting first root from solve: ',N(fx(s1[0].rhs()),10))
> show('Substituting first root from find_root: ',N(fx(s),10))
> plot(fx,0.001,0.03)
>
>
> Can someone shed light on this?
>

You are working very close to the numerical precision allowed by the usual 
float doubles (in particular with Ks^2 being 10^(-28)).
With degree 4 polynomials you might be better off using the exact formulae 
for their roots.

 

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Sage Crash Report

2016-11-06 Thread Dima Pasechnik


On Sunday, November 6, 2016 at 3:01:34 PM UTC, Afonso Henriques Silva Leite 
wrote:
>
> Please, I need some help here!
>

the important line in your report is

ImportError: libgfortran.so.3: cannot open shared object file: No such file 
or directory 

Probably you are using a binary release of Sage that was built on a machine 
with libgfortran.so.3
globally installed.
Chances are that if you install libgfortran on your system (i.e. if you run 
debian or ubuntu
this would be done by "apt-get install libgfortran")
and it will be the correct version, Sage would just work.

It would be possible to say more if you also mentioned how you installed 
Sage, which version, what OS you are running, etc.


-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sagemath-dev ppa

2016-11-06 Thread Henri Girard
Well I downgraded to 7.3. I guess it probably works with 7.4 because 
when I tried to make it with 7.3 I had the same problem. I restarted and 
I could do it ... well 7.3 suits to me I will wait 7.5 to to upgrade.


I guess my problem was to restart it had kept rights.

Regards

Henri


Le 06/11/2016 à 20:13, Jan Groenewald a écrit :

Hi

Did you install sagemath-upstream-binary-full? (yes)

Did you use sudo to install manifolds? (yes)

Regards,
Jan

On 5 November 2016 at 23:53, Henri Girard > wrote:


thanks... Anyway works fine for me, but I am trying sagemanifolds
update and I have this error, I don't understand it.

Regards

Henri

Downloading the sources of SageManifolds 0.9.1...
--2016-11-05 22:50:52--
http://sagemanifolds.obspm.fr/spkg/manifolds-0.9.1.tar.gz

Résolution de sagemanifolds.obspm.fr
 (sagemanifolds.obspm.fr
)… 145.238.179.10
Connexion à sagemanifolds.obspm.fr 
(sagemanifolds.obspm.fr
)|145.238.179.10|:80… connecté.
requête HTTP transmise, en attente de la réponse… 304 Not Modified
File «manifolds-0.9.1.tar.gz» not modified on server. Omitting
download.

Removing previous version of src/doc/en/reference/manifolds
Removing previous version of src/doc/en/reference/tensor_free_modules
Removing previous version of src/sage/manifolds
Removing previous version of src/sage/tensor/modules
Unpacking...
src/doc/en/reference/manifolds/conf.py
src/doc/en/reference/manifolds/chart.rst
src/doc/en/reference/manifolds/continuous_map.rst
src/doc/en/reference/manifolds/diff_form.rst
src/doc/en/reference/manifolds/diff_manifold.rst
src/doc/en/reference/manifolds/diff_map.rst
src/doc/en/reference/manifolds/diff_scalarfield.rst
src/doc/en/reference/manifolds/index.rst
src/doc/en/reference/manifolds/manifold.rst
src/doc/en/reference/manifolds/riem_manifold.rst
src/doc/en/reference/manifolds/scalarfield.rst
src/doc/en/reference/manifolds/tangent_space.rst
src/doc/en/reference/manifolds/tensorfield.rst
src/doc/en/reference/manifolds/vectorfield.rst
src/doc/en/reference/tensor_free_modules/conf.py
src/doc/en/reference/tensor_free_modules/alt_forms.rst
src/doc/en/reference/tensor_free_modules/index.rst
src/doc/en/reference/tensor_free_modules/morphisms.rst
src/doc/en/reference/tensor_free_modules/tensors.rst
src/sage/manifolds/all.py
src/sage/manifolds/chart.py
src/sage/manifolds/continuous_map.py
src/sage/manifolds/coord_func.py
src/sage/manifolds/coord_func_symb.py
src/sage/manifolds/__init__.py
src/sage/manifolds/manifold_homset.py
src/sage/manifolds/manifold.py
src/sage/manifolds/point.py
src/sage/manifolds/scalarfield_algebra.py
src/sage/manifolds/scalarfield.py
src/sage/manifolds/structure.py
src/sage/manifolds/subset.py
src/sage/manifolds/utilities.py
src/sage/manifolds/differentiable/affine_connection.py
src/sage/manifolds/differentiable/automorphismfield_group.py
src/sage/manifolds/differentiable/automorphismfield.py
src/sage/manifolds/differentiable/chart.py
src/sage/manifolds/differentiable/curve.py
src/sage/manifolds/differentiable/diff_form_module.py
src/sage/manifolds/differentiable/diff_form.py
src/sage/manifolds/differentiable/diff_map.py
src/sage/manifolds/differentiable/__init__.py
src/sage/manifolds/differentiable/levi_civita_connection.py
src/sage/manifolds/differentiable/manifold_homset.py
src/sage/manifolds/differentiable/manifold.py
src/sage/manifolds/differentiable/metric.py
src/sage/manifolds/differentiable/real_line.py
src/sage/manifolds/differentiable/scalarfield_algebra.py
src/sage/manifolds/differentiable/scalarfield.py
src/sage/manifolds/differentiable/tangent_space.py
src/sage/manifolds/differentiable/tangent_vector.py
src/sage/manifolds/differentiable/tensorfield_module.py
src/sage/manifolds/differentiable/tensorfield_paral.py
src/sage/manifolds/differentiable/tensorfield.py
src/sage/manifolds/differentiable/vectorfield_module.py
src/sage/manifolds/differentiable/vectorfield.py
src/sage/manifolds/differentiable/vectorframe.py
src/sage/tensor/modules/all.py
src/sage/tensor/modules/comp.py
src/sage/tensor/modules/ext_pow_free_module.py
src/sage/tensor/modules/finite_rank_free_module.py
src/sage/tensor/modules/format_utilities.py
src/sage/tensor/modules/free_module_alt_form.py
src/sage/tensor/modules/free_module_automorphism.py
src/sage/tensor/modules/free_module_basis.py
src/sage/tensor/modules/free_module_homset.py
src/sage/tensor/modules/free_module_linear_group.py
src/sage/tensor/modules/free_module_morphism.py
sr

Re: [sage-support] sagemath-dev ppa

2016-11-06 Thread Jan Groenewald
Hi Henri,

Can you send me the output in English? I think something like set LC_ALL=C
should work.

Regards,
Jan

On 6 November 2016 at 23:01, Henri Girard  wrote:

> Well I downgraded to 7.3. I guess it probably works with 7.4 because when
> I tried to make it with 7.3 I had the same problem. I restarted and I could
> do it ... well 7.3 suits to me I will wait 7.5 to to upgrade.
>
> I guess my problem was to restart it had kept rights.
>
> Regards
>
> Henri
>
> Le 06/11/2016 à 20:13, Jan Groenewald a écrit :
>
> Hi
>
> Did you install sagemath-upstream-binary-full? (yes)
>
> Did you use sudo to install manifolds? (yes)
>
> Regards,
> Jan
>
> On 5 November 2016 at 23:53, Henri Girard  wrote:
>
>> thanks... Anyway works fine for me, but I am trying sagemanifolds update
>> and I have this error, I don't understand it.
>>
>> Regards
>>
>> Henri
>>
>> Downloading the sources of SageManifolds 0.9.1...
>> --2016-11-05 22:50:52--  http://sagemanifolds.obspm.fr/
>> spkg/manifolds-0.9.1.tar.gz
>> Résolution de sagemanifolds.obspm.fr (sagemanifolds.obspm.fr)…
>> 145.238.179.10
>> Connexion à sagemanifolds.obspm.fr 
>> (sagemanifolds.obspm.fr)|145.238.179.10|:80…
>> connecté.
>> requête HTTP transmise, en attente de la réponse… 304 Not Modified
>> File «manifolds-0.9.1.tar.gz» not modified on server. Omitting download.
>>
>> Removing previous version of src/doc/en/reference/manifolds
>> Removing previous version of src/doc/en/reference/tensor_free_modules
>> Removing previous version of src/sage/manifolds
>> Removing previous version of src/sage/tensor/modules
>> Unpacking...
>> src/doc/en/reference/manifolds/conf.py
>> src/doc/en/reference/manifolds/chart.rst
>> src/doc/en/reference/manifolds/continuous_map.rst
>> src/doc/en/reference/manifolds/diff_form.rst
>> src/doc/en/reference/manifolds/diff_manifold.rst
>> src/doc/en/reference/manifolds/diff_map.rst
>> src/doc/en/reference/manifolds/diff_scalarfield.rst
>> src/doc/en/reference/manifolds/index.rst
>> src/doc/en/reference/manifolds/manifold.rst
>> src/doc/en/reference/manifolds/riem_manifold.rst
>> src/doc/en/reference/manifolds/scalarfield.rst
>> src/doc/en/reference/manifolds/tangent_space.rst
>> src/doc/en/reference/manifolds/tensorfield.rst
>> src/doc/en/reference/manifolds/vectorfield.rst
>> src/doc/en/reference/tensor_free_modules/conf.py
>> src/doc/en/reference/tensor_free_modules/alt_forms.rst
>> src/doc/en/reference/tensor_free_modules/index.rst
>> src/doc/en/reference/tensor_free_modules/morphisms.rst
>> src/doc/en/reference/tensor_free_modules/tensors.rst
>> src/sage/manifolds/all.py
>> src/sage/manifolds/chart.py
>> src/sage/manifolds/continuous_map.py
>> src/sage/manifolds/coord_func.py
>> src/sage/manifolds/coord_func_symb.py
>> src/sage/manifolds/__init__.py
>> src/sage/manifolds/manifold_homset.py
>> src/sage/manifolds/manifold.py
>> src/sage/manifolds/point.py
>> src/sage/manifolds/scalarfield_algebra.py
>> src/sage/manifolds/scalarfield.py
>> src/sage/manifolds/structure.py
>> src/sage/manifolds/subset.py
>> src/sage/manifolds/utilities.py
>> src/sage/manifolds/differentiable/affine_connection.py
>> src/sage/manifolds/differentiable/automorphismfield_group.py
>> src/sage/manifolds/differentiable/automorphismfield.py
>> src/sage/manifolds/differentiable/chart.py
>> src/sage/manifolds/differentiable/curve.py
>> src/sage/manifolds/differentiable/diff_form_module.py
>> src/sage/manifolds/differentiable/diff_form.py
>> src/sage/manifolds/differentiable/diff_map.py
>> src/sage/manifolds/differentiable/__init__.py
>> src/sage/manifolds/differentiable/levi_civita_connection.py
>> src/sage/manifolds/differentiable/manifold_homset.py
>> src/sage/manifolds/differentiable/manifold.py
>> src/sage/manifolds/differentiable/metric.py
>> src/sage/manifolds/differentiable/real_line.py
>> src/sage/manifolds/differentiable/scalarfield_algebra.py
>> src/sage/manifolds/differentiable/scalarfield.py
>> src/sage/manifolds/differentiable/tangent_space.py
>> src/sage/manifolds/differentiable/tangent_vector.py
>> src/sage/manifolds/differentiable/tensorfield_module.py
>> src/sage/manifolds/differentiable/tensorfield_paral.py
>> src/sage/manifolds/differentiable/tensorfield.py
>> src/sage/manifolds/differentiable/vectorfield_module.py
>> src/sage/manifolds/differentiable/vectorfield.py
>> src/sage/manifolds/differentiable/vectorframe.py
>> src/sage/tensor/modules/all.py
>> src/sage/tensor/modules/comp.py
>> src/sage/tensor/modules/ext_pow_free_module.py
>> src/sage/tensor/modules/finite_rank_free_module.py
>> src/sage/tensor/modules/format_utilities.py
>> src/sage/tensor/modules/free_module_alt_form.py
>> src/sage/tensor/modules/free_module_automorphism.py
>> src/sage/tensor/modules/free_module_basis.py
>> src/sage/tensor/modules/free_module_homset.py
>> src/sage/tensor/modules/free_module_linear_group.py
>> src/sage/tensor/modules/free_module_morphism.py
>> src/sage/tensor/modules/free_module_tensor.py
>> src/sage/tensor/modules/__init__.py
>> src/sage/tensor/modules/ten

[sage-support] Calling Magma SetNthreads() from SAGE produces an error

2016-11-06 Thread Rusydi H. Makarim
Hi,

Given a PolynomialSequence, I want to compute its Groebner basis using
magma implementation of F4 algorithm. However, when I want to call
SetNthreads() in magma to use multiple threads during F4 algorithm, SAGE
throws the following error :


sage: magma.SetNthreads(4)
---
TypeError Traceback (most recent call last)
 in ()
> 1 magma.SetNthreads(Integer(4))

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in __call__(self, *args, **kwds)
   1801list(args),
   1802params=kwds,
-> 1803nvals=nvals)
   1804

   1805 def _sage_doc_(self):

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in function_call(self, function, args, params, nvals)
   1159 fun = "%s(%s%s)" % (function, ",".join([s.name() for s in
args]), par)
   1160

-> 1161 return self._do_call(fun, nvals)
   1162

   1163 def _do_call(self, code, nvals):

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in _do_call(self, code, nvals)
   1209 ans = None
   1210 elif nvals == 1:
-> 1211 return self(code)
   1212 else:
   1213 v = [self._next_var_name() for _ in range(nvals)]

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in __call__(self, x, gens)
789 pass
790

--> 791 A = Expect.__call__(self, x)
792 if has_cache:
793 x._magma_cache[self] = A

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in __call__(self, x, name)
242

243 if isinstance(x, six.string_types):
--> 244 return cls(self, x, name=name)
245 try:
246 return self._coerce_from_special_method(x)

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc
in __init__(self, parent, value, is_name, name)
   1380 except (RuntimeError, ValueError) as x:
   1381 self._session_number = -1
-> 1382 raise_(TypeError, x, sys.exc_info()[2])
   1383 except BaseException:
   1384 self._session_number = -1

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc
in __init__(self, parent, value, is_name, name)
   1375 else:
   1376 try:
-> 1377 self._name = parent._create(value, name=name)
   1378 # Convert ValueError and RuntimeError to TypeError for
   1379 # coercion to work properly.

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in _create(self, value, name)
432 def _create(self, value, name=None):
433 name = self._next_var_name() if name is None else name
--> 434 self.set(name, value)
435 return name
436


/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in set(self, var, value)
624 13/5
625 """
--> 626 out = self.eval("%s:=%s" % (var, value))
627 if out.lower().find("error") != -1:
628 raise TypeError("Error executing Magma code:\n%s" % out)

/home/makarimrh/sage-forked/local/lib/python2.7/site-packages/sage/interfaces/magma.pyc
in eval(self, x, strip, **kwds)
558 ans = Expect.eval(self, x, **kwds).replace('\\\n', '')
559 if 'Runtime error' in ans or 'User error' in ans:
--> 560 raise RuntimeError("Error evaluating Magma
code.\nIN:%s\nOUT:%s" % (x, ans))
561 return ans
562


TypeError: Error evaluating Magma code.
IN:_sage_[2]:=SetNthreads(_sage_[1]);
OUT:
>> _sage_[2]:=SetNthreads(_sage_[1]);
 ^
Runtime error in 'SetNthreads': Bad argument types (possibly calling
function signature of intrinsic as a procedure)
Argument types given: RngIntElt



I use Magma 2.20-6 and Sage 7.3. Is this considered a bug ?

-- 
Rusydi H. Makarim

PhD Student
Mathematisch Instituut , Universiteit Leiden
 and
Cryptology Group , Centrum
Wiskunde & Informatica (CWI) 
Amsterdam, the Netherlands
Email : maka...@cwi.nl, r.h.maka...@math.leidenuniv.nl
Web : http://pub.math.leidenuniv.nl/~makarimrh/


-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https

[sage-support] Re: Calling Magma SetNthreads() from SAGE produces an error

2016-11-06 Thread Nils Bruin
On Sunday, November 6, 2016 at 1:28:45 PM UTC-8, Rusydi H. Makarim wrote:
>
>  ^
>
> Runtime error in 'SetNthreads': Bad argument types (possibly calling 
> function signature of intrinsic as a procedure)
> Argument types given: RngIntElt
>
>
>
> I use Magma 2.20-6 and Sage 7.3. Is this considered a bug ?
>

I don't think so. You get the error in Magma directly as well:

> c:=SetNthreads(3);

>> c:=SetNthreads(3);
 ^
Runtime error in 'SetNthreads': Bad argument types (possibly calling 
function 
signature of intrinsic as a procedure)
Argument types given: RngIntElt

The error message doesn't really say what's wrong, but the upshot is that 
SetNthreads gets used in a context where it doesn't fit (SetNThreads 
signature says it doesn't have a return value)

Instead do:

sage: magma.eval("SetNthreads(3)")
''
sage: magma.GetNthreads()
3

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sagemath-dev ppa

2016-11-06 Thread Henri Girard

I have no more english I am installing back


Le 06/11/2016 à 22:05, Jan Groenewald a écrit :

Hi Henri,

Can you send me the output in English? I think something like set 
LC_ALL=C should work.


Regards,
Jan

On 6 November 2016 at 23:01, Henri Girard > wrote:


Well I downgraded to 7.3. I guess it probably works with 7.4
because when I tried to make it with 7.3 I had the same problem. I
restarted and I could do it ... well 7.3 suits to me I will wait
7.5 to to upgrade.

I guess my problem was to restart it had kept rights.

Regards

Henri


Le 06/11/2016 à 20:13, Jan Groenewald a écrit :

Hi

Did you install sagemath-upstream-binary-full? (yes)

Did you use sudo to install manifolds? (yes)

Regards,
Jan

On 5 November 2016 at 23:53, Henri Girard mailto:henri.gir...@gmail.com>> wrote:

thanks... Anyway works fine for me, but I am trying
sagemanifolds update and I have this error, I don't
understand it.

Regards

Henri

Downloading the sources of SageManifolds 0.9.1...
--2016-11-05 22:50:52--
http://sagemanifolds.obspm.fr/spkg/manifolds-0.9.1.tar.gz

Résolution de sagemanifolds.obspm.fr
 (sagemanifolds.obspm.fr
)… 145.238.179.10
Connexion à sagemanifolds.obspm.fr
 (sagemanifolds.obspm.fr
)|145.238.179.10|:80… connecté.
requête HTTP transmise, en attente de la réponse… 304 Not
Modified
File «manifolds-0.9.1.tar.gz» not modified on server.
Omitting download.

Removing previous version of src/doc/en/reference/manifolds
Removing previous version of
src/doc/en/reference/tensor_free_modules
Removing previous version of src/sage/manifolds
Removing previous version of src/sage/tensor/modules
Unpacking...
src/doc/en/reference/manifolds/conf.py
src/doc/en/reference/manifolds/chart.rst
src/doc/en/reference/manifolds/continuous_map.rst
src/doc/en/reference/manifolds/diff_form.rst
src/doc/en/reference/manifolds/diff_manifold.rst
src/doc/en/reference/manifolds/diff_map.rst
src/doc/en/reference/manifolds/diff_scalarfield.rst
src/doc/en/reference/manifolds/index.rst
src/doc/en/reference/manifolds/manifold.rst
src/doc/en/reference/manifolds/riem_manifold.rst
src/doc/en/reference/manifolds/scalarfield.rst
src/doc/en/reference/manifolds/tangent_space.rst
src/doc/en/reference/manifolds/tensorfield.rst
src/doc/en/reference/manifolds/vectorfield.rst
src/doc/en/reference/tensor_free_modules/conf.py
src/doc/en/reference/tensor_free_modules/alt_forms.rst
src/doc/en/reference/tensor_free_modules/index.rst
src/doc/en/reference/tensor_free_modules/morphisms.rst
src/doc/en/reference/tensor_free_modules/tensors.rst
src/sage/manifolds/all.py
src/sage/manifolds/chart.py
src/sage/manifolds/continuous_map.py
src/sage/manifolds/coord_func.py
src/sage/manifolds/coord_func_symb.py
src/sage/manifolds/__init__.py
src/sage/manifolds/manifold_homset.py
src/sage/manifolds/manifold.py
src/sage/manifolds/point.py
src/sage/manifolds/scalarfield_algebra.py
src/sage/manifolds/scalarfield.py
src/sage/manifolds/structure.py
src/sage/manifolds/subset.py
src/sage/manifolds/utilities.py
src/sage/manifolds/differentiable/affine_connection.py
src/sage/manifolds/differentiable/automorphismfield_group.py
src/sage/manifolds/differentiable/automorphismfield.py
src/sage/manifolds/differentiable/chart.py
src/sage/manifolds/differentiable/curve.py
src/sage/manifolds/differentiable/diff_form_module.py
src/sage/manifolds/differentiable/diff_form.py
src/sage/manifolds/differentiable/diff_map.py
src/sage/manifolds/differentiable/__init__.py
src/sage/manifolds/differentiable/levi_civita_connection.py
src/sage/manifolds/differentiable/manifold_homset.py
src/sage/manifolds/differentiable/manifold.py
src/sage/manifolds/differentiable/metric.py
src/sage/manifolds/differentiable/real_line.py
src/sage/manifolds/differentiable/scalarfield_algebra.py
src/sage/manifolds/differentiable/scalarfield.py
src/sage/manifolds/differentiable/tangent_space.py
src/sage/manifolds/differentiable/tangent_vector.py
src/sage/manifolds/differentiable/tensorfield_module.py
src/sage/manifolds/differentiable/tensorfield_paral.py
src/sage/manifolds/differentiable/tensorfield.py
src/sage/manifolds/differenti

Re: [sage-support] sagemath-dev ppa

2016-11-06 Thread Henri Girard

pi@pc:/usr/lib/sagemath$ export LC_ALL=C
pi@pc:/usr/lib/sagemath$ sudo bash sm-install.sh

Downloading the sources of SageManifolds 0.9.1...
--2016-11-07 08:50:08-- 
http://sagemanifolds.obspm.fr/spkg/manifolds-0.9.1.tar.gz

Resolving sagemanifolds.obspm.fr (sagemanifolds.obspm.fr)... 145.238.179.10
Connecting to sagemanifolds.obspm.fr 
(sagemanifolds.obspm.fr)|145.238.179.10|:80... connected.

HTTP request sent, awaiting response... 304 Not Modified
File 'manifolds-0.9.1.tar.gz' not modified on server. Omitting download.

Removing previous version of src/doc/en/reference/manifolds
Removing previous version of src/doc/en/reference/tensor_free_modules
Removing previous version of src/sage/manifolds
Removing previous version of src/sage/tensor/modules
Unpacking...
src/doc/en/reference/manifolds/conf.py
src/doc/en/reference/manifolds/chart.rst
src/doc/en/reference/manifolds/continuous_map.rst
src/doc/en/reference/manifolds/diff_form.rst
src/doc/en/reference/manifolds/diff_manifold.rst
src/doc/en/reference/manifolds/diff_map.rst
src/doc/en/reference/manifolds/diff_scalarfield.rst
src/doc/en/reference/manifolds/index.rst
src/doc/en/reference/manifolds/manifold.rst
src/doc/en/reference/manifolds/riem_manifold.rst
src/doc/en/reference/manifolds/scalarfield.rst
src/doc/en/reference/manifolds/tangent_space.rst
src/doc/en/reference/manifolds/tensorfield.rst
src/doc/en/reference/manifolds/vectorfield.rst
src/doc/en/reference/tensor_free_modules/conf.py
src/doc/en/reference/tensor_free_modules/alt_forms.rst
src/doc/en/reference/tensor_free_modules/index.rst
src/doc/en/reference/tensor_free_modules/morphisms.rst
src/doc/en/reference/tensor_free_modules/tensors.rst
src/sage/manifolds/all.py
src/sage/manifolds/chart.py
src/sage/manifolds/continuous_map.py
src/sage/manifolds/coord_func.py
src/sage/manifolds/coord_func_symb.py
src/sage/manifolds/__init__.py
src/sage/manifolds/manifold_homset.py
src/sage/manifolds/manifold.py
src/sage/manifolds/point.py
src/sage/manifolds/scalarfield_algebra.py
src/sage/manifolds/scalarfield.py
src/sage/manifolds/structure.py
src/sage/manifolds/subset.py
src/sage/manifolds/utilities.py
src/sage/manifolds/differentiable/affine_connection.py
src/sage/manifolds/differentiable/automorphismfield_group.py
src/sage/manifolds/differentiable/automorphismfield.py
src/sage/manifolds/differentiable/chart.py
src/sage/manifolds/differentiable/curve.py
src/sage/manifolds/differentiable/diff_form_module.py
src/sage/manifolds/differentiable/diff_form.py
src/sage/manifolds/differentiable/diff_map.py
src/sage/manifolds/differentiable/__init__.py
src/sage/manifolds/differentiable/levi_civita_connection.py
src/sage/manifolds/differentiable/manifold_homset.py
src/sage/manifolds/differentiable/manifold.py
src/sage/manifolds/differentiable/metric.py
src/sage/manifolds/differentiable/real_line.py
src/sage/manifolds/differentiable/scalarfield_algebra.py
src/sage/manifolds/differentiable/scalarfield.py
src/sage/manifolds/differentiable/tangent_space.py
src/sage/manifolds/differentiable/tangent_vector.py
src/sage/manifolds/differentiable/tensorfield_module.py
src/sage/manifolds/differentiable/tensorfield_paral.py
src/sage/manifolds/differentiable/tensorfield.py
src/sage/manifolds/differentiable/vectorfield_module.py
src/sage/manifolds/differentiable/vectorfield.py
src/sage/manifolds/differentiable/vectorframe.py
src/sage/tensor/modules/all.py
src/sage/tensor/modules/comp.py
src/sage/tensor/modules/ext_pow_free_module.py
src/sage/tensor/modules/finite_rank_free_module.py
src/sage/tensor/modules/format_utilities.py
src/sage/tensor/modules/free_module_alt_form.py
src/sage/tensor/modules/free_module_automorphism.py
src/sage/tensor/modules/free_module_basis.py
src/sage/tensor/modules/free_module_homset.py
src/sage/tensor/modules/free_module_linear_group.py
src/sage/tensor/modules/free_module_morphism.py
src/sage/tensor/modules/free_module_tensor.py
src/sage/tensor/modules/__init__.py
src/sage/tensor/modules/tensor_free_module.py
src/sage/tensor/modules/tensor_with_indices.py

Running ./sage -b to re-build Sage.
(cd .\
 && export SAGE_ROOT=/doesnotexist \
   SAGE_SRC=/doesnotexist\
   SAGE_SRC_ROOT=/doesnotexist\
   SAGE_DOC_SRC=/doesnotexist\
   SAGE_SCRIPTS_DIR=/doesnotexist\
   SAGE_BUILD_DIR=/doesnotexist\
   SAGE_PKGS=/usr/lib/sagemath//build/pkgs\
   SAGE_CYTHONIZED=/usr/lib/sagemath//src/build/cythonized \
 && python -u setup.py build install)
The directory '/home/pi/.cache/pip/http' or its parent directory is not 
owned by the current user and the cache has been disabled. Please check 
the permissions and owner of that directory. If executing pip with sudo, 
you may want sudo's -H flag.

You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade