Using mpi4py in sage 'online' notebook (atsagenb.org)

Showing 1-6 of 6 messages
Using mpi4py in sage 'online' notebook (atsagenb.org) ravine 3/16/12 3:06 PM
Hi,

I just started using sage and am loving it! However, I was wondering,
is there a way to use the mpi4py package in the online (sagenb.org)
notebook ?

I was hoping to do so, but am stuck due to the following two issues:

1) The documentation at Sage (http://www.sagemath.org/doc/
numerical_sage/mpi4py.html
) says that one can execute this code by
running "./local/bin/mpirun -np 5 ./sage -python filename.py" from
command line of the system. However, I do not know how to do the same
in the online notebook.

2) I tried to simply evaluate the sample program given in the
documentation page for mpi4py in sage:
from mpi4py import MPI
import numpy
rank=MPI.rank
size=MPI.size
v=numpy.array([rank]*5,dtype=float)
MPI.COMM_WORLD.Send(v,dest=(rank+1)%size)
data=MPI.COMM_WORLD.Recv(source=(rank-1)%size)
print(``my rank is %d"%n)
print(``I received this:'')
print(data)

However, it throws the error: "ImportError: No module named mpi4py"

It also does not allow me to install the "optional" mpi4py package on
its own server using "install_package" (since I obviously don't have
the required permissions).

So, is there a way that i can use mpi4py in the online notebook ?

Thanks a lot !
Ravi
Re: Using mpi4py in sage 'online' notebook (atsagenb.org) Volker Braun 3/16/12 5:28 PM
You can't install MPI on the public Sage server without administrative privileges.

Also, unless you want to learn MPI for educational purposes your are using the wrong tool to run stuff on a single machine. For tightly coupled problems you can't beat threads that way, and for very parallel problems you should just go with fork and the @parallel decorator.
Re: Using mpi4py in sage 'online' notebook (atsagenb.org) Simon King 3/18/12 10:57 PM
Why has the original post been marked as spam?
Re: [sage-support] Re: Using mpi4py in sage 'online' notebook (atsagenb.org) Anton Sherwood 3/19/12 12:42 AM
On 2012-3-18 22:57, Simon King wrote:
> Why has the original post been marked as spam?

Possibly the phrase "I just started using **** and am loving it!" is a
red flag.  (I didn't see it marked as spam.)

--
Anton Sherwood *\\* www.bendwavy.org *\\* www.zazzle.com/tamfang

Re: Using mpi4py in sage 'online' notebook (atsagenb.org) Harald Schilly 3/19/12 3:57 AM


On Monday, March 19, 2012 6:57:16 AM UTC+1, Simon King wrote:
Why has the original post been marked as spam?

I guess someone clicked on the "mark spam" button. I also found the setting to revert this... :-)

Re: Using mpi4py in sage 'online' notebook (atsagenb.org) Simon King 3/19/12 5:55 AM
Hi Harald,

Harald Schilly <harald.schilly <at> gmail.com> writes:
> I guess someone clicked on the "mark spam" button. I also found the setting to
revert this...

I also clicked on the "not spam" button...

Cheers,
Simon