[sage-devel] Re: Command line processing sage-python

2008-09-12 Thread Simon Beaumont

I am happy to report that boost_1_35_0, pycuda 0.9 (plus my hacks) are
all now working and tested against this build. Thanks to David for his
help and patches. Game on.

On Sep 12, 1:28 am, Simon Beaumont [EMAIL PROTECTED] wrote:
 Ok - got there in the end...

 I did a fresh build (OS X 10.5.4 intel) with 3.1.1 sources.
 Applied David's patches and fixed up the externs in cvxopt sources as
 he indicated. All built just fine.

 All test pass apart from trace - which is no doubt due to sage command
 line not being able to load readline - which is odd since it has been
 built ok - I guess it's the python framework that is not loading this.
 I'm sure there's an easy fix.

 Now onto patching boost and seeing if this wont all play nicely
 together.

 Be nice is this was the default (supported) build for OS X since
 nothing else is a starter if packages need to link against the python.
 I only want to run one python and I want all my python code and any
 packages I use to play in sage. That's the whole point for me -
 extensibility in all directions.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-09-12 Thread David Philp

Glad it eventually worked for you. Sorry I forgot to mention the  
readline bug. My brain is not big enough to remember all those steps.  
It does cause a doctest failure.

As you probably have realized, Michael already has a patch for it in  
the pipeline, it will be fixed in 3.1.2 I believe. If you want sage to  
have a working command line, you could use the newer python spkg.

D


M: +61 423 535 397
W: +61 2 6125 8260

On 12/09/2008, at 19:52, Simon Beaumont [EMAIL PROTECTED] wrote:


 I am happy to report that boost_1_35_0, pycuda 0.9 (plus my hacks) are
 all now working and tested against this build. Thanks to David for his
 help and patches. Game on.

 On Sep 12, 1:28 am, Simon Beaumont [EMAIL PROTECTED] wrote:
 Ok - got there in the end...

 I did a fresh build (OS X 10.5.4 intel) with 3.1.1 sources.
 Applied David's patches and fixed up the externs in cvxopt sources as
 he indicated. All built just fine.

 All test pass apart from trace - which is no doubt due to sage  
 command
 line not being able to load readline - which is odd since it has been
 built ok - I guess it's the python framework that is not loading  
 this.
 I'm sure there's an easy fix.

 Now onto patching boost and seeing if this wont all play nicely
 together.

 Be nice is this was the default (supported) build for OS X since
 nothing else is a starter if packages need to link against the  
 python.
 I only want to run one python and I want all my python code and any
 packages I use to play in sage. That's the whole point for me -
 extensibility in all directions.
 

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-31 Thread Simon Beaumont

Thanks for that... someone might care to fix it... I think it used to
work. It calls sage -python passing all the command line.

More importantly what would be involved in using the system framework
based python - would it just be a case of setting $PYTHON to be /usr/
bin/python?

Cheers,

Simon


On Aug 29, 1:34 am, Carl Witty [EMAIL PROTECTED] wrote:
 On Aug 28, 4:34 pm, Simon Beaumont [EMAIL PROTECTED] wrote:

  Well any python code fails to work as expected:

  try: sage-python -c import sys
   File string, line 1
      import
           ^
  SyntaxError: invalid syntax

  ... -c print;print # will print two line feeds however

  this came up when trying to configure boost for sage, wherein
  configure has:

  $PYTHON -c import sys; print (\%d.%d\ % (sys.version_info[0],
  sys.version_info[1]))`

 sage-python is a shell script that sends its arguments to the Sage
 python (assuming sage is in your path).  Evidently it is buggy.

 However, you don't want to be using sage-python anyway; instead, you
 want to arrange things so that $PYTHON points to $SAGE_ROOT/local/bin/
 python .

 Carl
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread William Stein

On Thu, Aug 28, 2008 at 1:19 PM, Simon Beaumont [EMAIL PROTECTED] wrote:

 got a rather weird one - os x 10.5.2 sage 3.1.1 (binary build) I am
 trying to build boost (python) for this version on os x - so I can get
 pycuda going against the OS X 2.0 cuda.

 well the python (python-sage) seems not to handle the -c command
 like regular python that is import fails with a syntax error and
 print 'foo' doesn't...

 Any ideas?

For clarification can you post an actual log of what you input and what
happens?

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread mabshoff



On Aug 28, 2:32 pm, William Stein [EMAIL PROTECTED] wrote:
 On Thu, Aug 28, 2008 at 1:19 PM, Simon Beaumont [EMAIL PROTECTED] wrote:

Hi,

  got a rather weird one - os x 10.5.2 sage 3.1.1 (binary build) I am
  trying to build boost (python) for this version on os x - so I can get
  pycuda going against the OS X 2.0 cuda.

David Philip has been playing with building PyCuDA against Sage's
Python on OSX. He switched the build to use ucs2 and also builds Sage
as a FrameWork. It is not 100% ready for prime time, but check out
http://trac.sagemath.org/sage_trac/ticket/3924.

  well the python (python-sage) seems not to handle the -c command
  like regular python that is import fails with a syntax error and
  print 'foo' doesn't...

  Any ideas?

 For clarification can you post an actual log of what you input and what
 happens?

Yeah, that would be helpful. You need boost 1.35, too, and the
experimental boost package we provide is 1.34. Making one for 1.35
should be trivial.

 William

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread David Philp

On 29/08/2008, at 7:56 AM, mabshoff wrote:

 David Philip has been playing with building PyCuDA against Sage's
 Python on OSX.

No!!!  I'd love to do it but I haven't got time for CUDA.  I've been  
using boost.python, for the sake of /other/ C++ code of mine.  I  
originally tried to sort of bodgy them together, but didn't have much  
luck.

But I think you will pretty much need the framework build as per the  
trac ticket Michael linked.  You then build boost python against  
that---but to build boost python against a non-system python on a mac,  
you need to patch boost build.  See
http://svn.boost.org/trac/boost/changeset/48322

I hope you can use CUDA with all that... thus we continue towards  
SageOS... The alternative I suppose is to redirect the rest of sage to  
use system python, which is conceivably necessary for CUDA.

D



==
David J Philp
Postdoctoral Fellow
National Centre for Epidemiology and Population Health
Building 62, cnr Mills Rd  Eggleston Rd
The Australian National University
Canberra ACT 0200 Australia

T: +61 2 6125 8260
F: +61 2 6125 0740
M: 0423 535 397
W: http://nceph.anu.edu.au/

CRICOS Provider #00120C



--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread Simon Beaumont



On Aug 28, 11:22 pm, David Philp [EMAIL PROTECTED] wrote:
 On 29/08/2008, at 7:56 AM, mabshoff wrote:

  David Philip has been playing with building PyCuDA against Sage's
  Python on OSX.

 No!!!  I'd love to do it but I haven't got time for CUDA.  I've been  
 using boost.python, for the sake of /other/ C++ code of mine.  I  
 originally tried to sort of bodgy them together, but didn't have much  
 luck.

 But I think you will pretty much need the framework build as per the  
 trac ticket Michael linked.  You then build boost python against  
 that---but to build boost python against a non-system python on a mac,  
 you need to patch boost build.  
 Seehttp://svn.boost.org/trac/boost/changeset/48322

 I hope you can use CUDA with all that... thus we continue towards  
 SageOS... The alternative I suppose is to redirect the rest of sage to  
 use system python, which is conceivably necessary for CUDA.

 D

Phew! nothing simple on OS X eh?  I might just get a 8800 for my linux
box ;-)  took me about ten minutes to do this on gentoo...
boost seems a real pain on OS X - i'll try and build against the
standard framework based python for a starter and take it from there.

Thanks for the heads up...

Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread Simon Beaumont

Well any python code fails to work as expected:

try: sage-python -c import sys
 File string, line 1
import
 ^
SyntaxError: invalid syntax

... -c print;print # will print two line feeds however

this came up when trying to configure boost for sage, wherein
configure has:

$PYTHON -c import sys; print (\%d.%d\ % (sys.version_info[0],
sys.version_info[1]))`

On Aug 28, 10:32 pm, William Stein [EMAIL PROTECTED] wrote:
 On Thu, Aug 28, 2008 at 1:19 PM, Simon Beaumont [EMAIL PROTECTED] wrote:

  got a rather weird one - os x 10.5.2 sage 3.1.1 (binary build) I am
  trying to build boost (python) for this version on os x - so I can get
  pycuda going against the OS X 2.0 cuda.

  well the python (python-sage) seems not to handle the -c command
  like regular python that is import fails with a syntax error and
  print 'foo' doesn't...

  Any ideas?

 For clarification can you post an actual log of what you input and what
 happens?

 William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread David Philp


On 29/08/2008, at 9:29 AM, Simon Beaumont wrote:

 On Aug 28, 11:22 pm, David Philp [EMAIL PROTECTED] wrote:
 On 29/08/2008, at 7:56 AM, mabshoff wrote:

 David Philip has been playing with building PyCuDA against Sage's
 Python on OSX.

 No!!!  I'd love to do it but I haven't got time for CUDA.  I've been
 using boost.python, for the sake of /other/ C++ code of mine.  I
 originally tried to sort of bodgy them together, but didn't have much
 luck.

 But I think you will pretty much need the framework build as per the
 trac ticket Michael linked.  You then build boost python against
 that---but to build boost python against a non-system python on a  
 mac,
 you need to patch boost build.  
 Seehttp://svn.boost.org/trac/boost/changeset/48322

 I hope you can use CUDA with all that... thus we continue towards
 SageOS... The alternative I suppose is to redirect the rest of sage  
 to
 use system python, which is conceivably necessary for CUDA.

 D

 Phew! nothing simple on OS X eh?  I might just get a 8800 for my linux
 box ;-)  took me about ten minutes to do this on gentoo...
 boost seems a real pain on OS X - i'll try and build against the
 standard framework based python for a starter and take it from there.

Well, it's all in the pipeline so the future is a bit rosier.  The  
boost patch won't appear till 1.37 AIUI, and the sage/python/framework  
won't appear till Michael Abshoff is happy with it.

There are also a couple of bugs in the version of cvxopt that ships  
with sage.  Those appear to be fixed in the latest version of cvxopt,  
so they are also in the pipeline (assuming that sage will upgrade to  
cvxopt 1.0 and/or make cxvopt optional, there doesn't seem to be a lot  
of point bothering with a sage-specific patch to cvxopt-0.9.)  But if  
you want my (hacked  untested but compiling) cvxopt spkg, let me know.

D


==
David J Philp
Postdoctoral Fellow
National Centre for Epidemiology and Population Health
Building 62, cnr Mills Rd  Eggleston Rd
The Australian National University
Canberra ACT 0200 Australia

T: +61 2 6125 8260
F: +61 2 6125 0740
M: 0423 535 397
W: http://nceph.anu.edu.au/

CRICOS Provider #00120C





--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread Simon Beaumont

I have pycuda working on OSX 10.5.2 with the standard framework based
python and nv CUDA 2.0... now for the hacks!

Not at all sure about the right direction for this CUDA stuff yet.

Simon

On Aug 29, 12:29 am, Simon Beaumont [EMAIL PROTECTED] wrote:
 On Aug 28, 11:22 pm, David Philp [EMAIL PROTECTED] wrote:



  On 29/08/2008, at 7:56 AM, mabshoff wrote:

   David Philip has been playing with building PyCuDA against Sage's
   Python on OSX.

  No!!!  I'd love to do it but I haven't got time for CUDA.  I've been  
  using boost.python, for the sake of /other/ C++ code of mine.  I  
  originally tried to sort of bodgy them together, but didn't have much  
  luck.

  But I think you will pretty much need the framework build as per the  
  trac ticket Michael linked.  You then build boost python against  
  that---but to build boost python against a non-system python on a mac,  
  you need to patch boost build.  
  Seehttp://svn.boost.org/trac/boost/changeset/48322

  I hope you can use CUDA with all that... thus we continue towards  
  SageOS... The alternative I suppose is to redirect the rest of sage to  
  use system python, which is conceivably necessary for CUDA.

  D

 Phew! nothing simple on OS X eh?  I might just get a 8800 for my linux
 box ;-)  took me about ten minutes to do this on gentoo...
 boost seems a real pain on OS X - i'll try and build against the
 standard framework based python for a starter and take it from there.

 Thanks for the heads up...

 Simon
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Command line processing sage-python

2008-08-28 Thread Carl Witty

On Aug 28, 4:34 pm, Simon Beaumont [EMAIL PROTECTED] wrote:
 Well any python code fails to work as expected:

 try: sage-python -c import sys
  File string, line 1
     import
          ^
 SyntaxError: invalid syntax

 ... -c print;print # will print two line feeds however

 this came up when trying to configure boost for sage, wherein
 configure has:

 $PYTHON -c import sys; print (\%d.%d\ % (sys.version_info[0],
 sys.version_info[1]))`

sage-python is a shell script that sends its arguments to the Sage
python (assuming sage is in your path).  Evidently it is buggy.

However, you don't want to be using sage-python anyway; instead, you
want to arrange things so that $PYTHON points to $SAGE_ROOT/local/bin/
python .

Carl

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---