On Dec 2, 2009, at 7:53 PM, Minh Nguyen wrote:

> Hi Ethan,
>
> On Thu, Dec 3, 2009 at 2:22 PM, Ethan Van Andel <[email protected]>  
> wrote:
>> Does sage support multi-core or multi-processor computation?
>>
>> If so, in what format (MPI, OpenMP etc)

There's mpi4py and pyMPI, and probably several packages one can  
install and use.

> I think one way to answer such a question is to survey what's
> available in Sage and the Python ecosystem. Starting with Python 2.6,
> Python has the module multiprocessing [1] to support process-based
> threading. Approaching this built-in module from the perspective of a
> novice to parallel programming, I find the module rather cumbersome to
> use. However, anyone is welcome to disagree. Apart from built-in
> modules for multiprocessing, the Python ecosystem also consists of
> numerous third-party libraries [2] that cater to parallel programming,
> grid computing, cluster computing, etc.
>
> I have been using Parallel Python (pp) [3] for about a week now,
> mainly to parallelize the computation of a database of least primitive
> roots modulo odd primes. For this purpose, I find that pp serves my
> needs without requiring me to learn the low-level details of parallel
> programming. So far, I have used pp to calculate least primitive roots
> modulo odd primes up to one million. That computation is now complete.
> I'm currently using pp to extend the database beyond one million.
>
> You might also notice that Sage comes with the dsage module [4] for
> distributed computation. It used to be part of the Sage library, but
> is now distributed as a standard spkg. As far as I know, not much work
> has been done to develop this module further since its lead developer
> graduated about a year ago.
>
>
>> If not, are there plans to include it?
>
> You can install any third-party Python library into the Python
> distribution that comes with Sage. That's how I come to access
> functionalities of pp for computing the above mentioned database.
> There was a recent discussion about Sun's Project Fortress [5] and
> having some interface to it for parallelizing computation.

Of course, you can't just "install parallelism" and expect everything  
to suddenly use multiple cores... Most of what's in Sage is (support  
for) medium to course-grained parallelism, which happens to be  
suitable for a lot of problems many of the Sage developers attack. It  
would be nice to see some parallelism at lower levels as well, the  
only thing that I can think of off the top of my head that by default  
maxes out two cores is the linear algebra, leveraging the multi- 
threaded support of ATLAS.

- Robert

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to