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

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to