[Rpy] Using Rpy with MPI

2007-05-04 Thread Tomi Korhonen
Hello,

I'm trying to use Rpy in a MPI-environment ( pypar ) where I distribute my 
processing to multiple CPU's. I'd like to be able to plot out the results from 
the same program I use for calculations but there seems to be somesort of bug 
or 
some weird feature I don't know how to handle.

At least I can reproduce this behaviour with this simple program:

mpi.py:
-
a = []
for i in range( 0, 10 ):
a.append( i )

from rpy import *
r.plot( a )



Now, if I run that with "python -i mpi.py" the plotting works ok. But if I run 
it with "mpirun -np 1 python -i mpi.py" it executes everything just fine but it 
doesn't even create the window for the plot. No errors, nothing.

I'm using python version 2.4.4 and Rpy version 2.4.1.

Any ideas or pointers would be much appreciated since when I don't have any 
kind 
of idea what might be going wrong and there's no error messages either...

Thanks,
-toma



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] build problems (OS X, MacPorts version of R)

2007-05-04 Thread John Owens
John Owens  yahoo.com> writes:

> 
> Greetings, I'm puzzled about this build error. 
> 
> Basically the problem is that it's trying to link to a
> dynamic library "libRblas.dylib" that is clearly in the 
> right place (/opt/local/lib/R/lib/libRblas.dylib) and whose
> directory is explicitly specified with -L. (LD_LIBRARY_PATH
> didn't help either.)

OK good news, I think I figured this out. Bad news, I need
some help to continue to make progress.

The MacPorts R distribution must be built with a newer gcc.
It uses gcc 4.0.4 (the default is 4.0.1). On a MacPorts
system, the new gcc is called gcc-dp-4.0. I believe the
link problems were because of an incompatibility between R's
gcc and the native gcc that I get when I python setup.py build.

I am not sure how to say "use gcc-dp-4.0 instead of gcc". The
best I've come up with is:

 CC=gcc-dp-4.0 python setup.py build

which sort-of works. The problem is that gcc is called with
the following command line from within the script:

gcc-dp-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -DWITH_NUMERIC
-DRPY_SHNAME="_rpy2050" -DINIT_RPY=init_rpy2050 -UPRE_2_2
-I/opt/local/lib/R/include -Isrc
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
-I/opt/local/include/python2.4 -c src/rpymodule2050.c -o
build/temp.darwin-8.9.0-Power_Macintosh-2.4/src/rpymodule2050.o
gcc-dp-4.0: unrecognized option '-no-cpp-precomp'
cc1: error: unrecognized command line option "-Wno-long-double"
error: command 'gcc-dp-4.0' failed with exit status 1

What I need to do is delete the two command-line options
-Wno-long-double and -no-cpp-precomp. They are valid in
default gcc 4.0.1 but not in new gcc-dp-4.0 (4.0.4). I don't
know how to do this in the setup.py script. 

The other possible option was:

python setup.py build --compiler=gcc-dp-4.0

which tells us:

error: don't know how to compile C/C++ code on platform 'posix' with
'gcc-dp-4.0' compiler

So: What I'd love to know is how I can change the default
options passed to gcc to get rid of two options. The default
options don't appear to be anywhere in setup.py, so I'm not
sure from where they come, but I think this does solve the
problem (or at least let me make more progress), so anyone
who understands setup.py and the distutils magic, I'd appreciate
help!

Thanks!

JDO


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list