Ask Your Question

maldun's profile - activity

2014-02-07 07:43:57 +0200 received badge  Famous Question (source)
2014-02-04 07:24:52 +0200 received badge  Famous Question (source)
2014-01-27 14:02:16 +0200 received badge  Famous Question (source)
2013-11-21 22:55:13 +0200 received badge  Popular Question (source)
2012-02-25 19:12:14 +0200 received badge  Notable Question (source)
2011-12-14 07:20:57 +0200 received badge  Notable Question (source)
2011-11-23 23:56:54 +0200 received badge  Notable Question (source)
2011-11-22 13:52:47 +0200 received badge  Nice Question (source)
2011-07-02 01:19:31 +0200 received badge  Popular Question (source)
2011-04-14 09:35:11 +0200 received badge  Popular Question (source)
2011-04-02 07:33:10 +0200 received badge  Popular Question (source)
2011-01-27 23:39:48 +0200 received badge  Taxonomist
2011-01-25 10:30:49 +0200 commented answer error while trying to import weave

I fixed the docu, so the ticket would need review. (and sorry for the duplicate, today is truly not my day...)

2010-10-14 23:11:12 +0200 received badge  Student (source)
2010-10-14 23:11:12 +0200 received badge  Teacher (source)
2010-10-14 23:11:11 +0200 received badge  Editor (source)
2010-10-14 23:11:11 +0200 received badge  Supporter
2010-09-24 18:32:50 +0200 answered a question Sage and CUDA

Okay I found some time and build now a package for pycuda. (see Ticket #10010 for details)

on Ticket #10009 I provide also a package for PyOpenCL which can also used with ATI cards as well.

The PyCUDA package can be downloaded from:

http://code.google.com/p/spkg-upload/downloads/detail?name=pycuda-0.94.1.spkg

(direct link: http://spkg-upload.googlecode.com/files/pycuda-0.94.1.spkg )

Installation Notes:

  • Install CUDA on your machine: http://developer.nvidia.com/object/cu...
  • set the SAGE_CUDA variable in your shell with:

    export SAGE_CUDA =/where/you/have/installed/cuda

    (i wrote this in .bashrc)

  • install package. (Download it from the links above)
  • IMPORTANT: After installation the setuptools package has to be reinstalled!! Because the installer uses the distributed egg package. This messes somehow with setuptools and will be removed after the installation. But this destroys setup tools!
  • enjoy!

It works for me. Hope it's usefull!

2010-09-16 19:35:02 +0200 commented answer Sage and CUDA

Ah I thought that no one's interested in it, so I'm decided to start attempts to get it up and running! I already bought a new graphics card. I hope in the next weeks I will start to get it built on my sage. I will try to get PyOpenCl also running. If there's interest I can start a ticket on this!

2010-09-08 05:53:39 +0200 commented answer linking libraries in cython

Thanx that worked! Is then the last code line in this tutorial ( http://docs.cython.org/src/tutorial/external.html ) false, outdated or does sage handle this different?

2010-09-07 19:22:49 +0200 asked a question linking libraries in cython

Hi!

I have the following problem: I want to link an extern library like for example -lm to cython.

If I now write for example the following problem:

%cython
#clib: m

cdef extern from "math.h":
    double sin(double)

def f(x):
    return sin(x)

I get the following errors:

Traceback (most recent call last):
`File "<stdin>", line 1, in <module>
 File "_sage_input_8.py", line 10, in <module>
 exec compile(u'_support_.cython_import_all("/home/maldun/.sage/sage_notebook.sagenb        /home/admin/0/code/sage14.spyx", globals())
 File "", line 1, in <module>

 File "/home/maldun/sage/sage-4.5.2/local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg  /sagenb/misc/support.py", line 519, in cython_import_all
 create_local_c_file=create_local_c_file)
 File "/home/maldun/sage/sage-4.5.2/local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/misc/support.py", line 496, in cython_import
 create_local_c_file=create_local_c_file)
 File "/home/maldun/sage/sage-4.5.2/local/lib/python2.6/site-packages/sage/misc/cython.py", line 409, in cython
 raise RuntimeError, "Error compiling %s:\n%s\n%s"%(filename, log, err)
 RuntimeError: Error compiling /home/maldun/.sage/sage_notebook.sagenb/home/admin/0/code/sage14.spyx:
 running build
 running build_ext
 building '_home_maldun__sage_sage_notebook_sagenb_home_admin_0_code_sage14_spyx_0' extension
 creating build
 creating build/temp.linux-x86_64-2.6
 gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/home   /maldun/sage/sage-4.5.2/local/include/csage/ -I/home/maldun/sage/sage-4.5.2/local/include/ -I/home/maldun/sage/sage-4.5.2/local/include/python2.6/ -I/home/maldun/sage/sage-4.5.2/local/lib/python2.6/site-packages/numpy/core/include -I/home/maldun/sage/sage-4.5.2/devel/sage/sage/ext/ -I/home/maldun/sage/sage-4.5.2/devel/sage/ -I/home/maldun/sage/sage-4.5.2/devel/sage/sage/gsl/ -I/home/maldun/.sage/sage_notebook.sagenb/home/admin/0/code -I/home/maldun/sage/sage-4.5.2/local/include/python2.6 -c _home_maldun__sage_sage_notebook_sagenb_home_admin_0_code_sage14_spyx_0.c -o build/temp.linux-x86_64-2.6/_home_maldun__sage_sage_notebook_sagenb_home_admin_0_code_sage14_spyx_0.o -w -O2
 creating build/lib.linux-x86_64-2.6
 gcc -pthread -shared build/temp.linux-x86_64-2.6/_home_maldun__sage_sage_notebook_sagenb_home_admin_0_code_sage14_spyx_0.o -L/home/maldun/sage/sage-4.5.2/local//lib/ -L/home/maldun/sage/sage-4.5.2/local/lib -l: -lm -lmpfr -lgmp -lgmpxx -lstdc++ -lpari -lm -lcurvesntl -lg0nntl -ljcntl -lrankntl -lgsl -lgslcblas -latlas -lntl -lcsage -lpython2.6 -o build/lib.linux-x86_64-2.6/_home_maldun__sage_sage_notebook_sagenb_home_admin_0_code_sage14_spyx_0.so -L/home/maldun/sage/sage-4.5.2/local//lib

/usr/bin/ld: cannot find -l:
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1`

So now my questions: Why does this fail? Am I able to link labraries anyhow? Can I link external libraries into sage that are installed on my system but not in sage like fftw? Or have I to install them somehow into sage before using it?

Thanx in Advance! Maldun

2010-09-07 11:04:13 +0200 asked a question Sage and CUDA

Hi there!

Is it possible to use CUDA within Sage. I didn't find any good answers yet.

Can it somehow be linked, or is it even possible to use PyCUDA?

2010-08-26 12:12:06 +0200 asked a question Latest versions of numpy+scipy

Hi, I want to use the latest versions of numpy and scipy in Sage, but they are not up-to-date yet. My question is now: is it possible for me just to build the packages and install them (I guess not, because updating seems to be a time intense procedure)

If someone is working on the Issues for numpy 1.5b and scipy 0.8 can he give me some infos? (I only found tickets for 1.4 or 1.7.1 which aren't ready yet) I also would provide help, if there is something todo, like testing.

If nobody is working on this perhaps I have to start the tickets myself...

2010-08-24 19:23:47 +0200 commented answer problems with symbolic integration and then numerical evaluating

that's an interesting behavior. Thanks for your quick response!

2010-08-24 19:08:05 +0200 asked a question problems with symbolic integration and then numerical evaluating

can anyone explain this:

sage: integrate(legendre_P(64,x)*sin((1+x)*pi/2),x,-1,1).n()
1.16508247725542e79

from approximation one know's that the legendre coefficients converge exponentially to zero and not to infinity!

and indeed with mpmath I get a better answer:

sage: import sage.libs.mpmath.all as mpmath
sage: mpmath.call(mpmath.quad,lambda x: mpmath.legendre(64,x)*mpmath.sin(pi/2*(x+1)),[-1,1])
-5.04684703543649e-25

Is there an overhead happening, when I numerically evaluate large rationals or something???

Thanks in advance, maldun