Re: [Rd] Optimization in R

2007-08-05 Thread Christophe Pouzat
Hi guys,

I ran into the same problem and solved it by changing one line in Andrew's
Makefile:

instead of:
gsl.so: vector.o multimin.o
gcc -g -Wall -shared $^ -lgsl -o $@

use:
gsl.so: vector.o multimin.o
gcc -g -Wall -shared $^  -o $@ -lgsl -lgslcblas -lm

Christophe


Thanks for the functions!
>
> I tried installing the multimin function. To get it to compile, I needed
> to change the Makefile to reflect my path and by adding the flags fPIC
> in response to the error: "/usr/bin/ld: vector.o: relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC"
>
> However, I get the following running test.R:
>
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>unable to load shared library '/home/mmorales/Desktop
> /multimin/gsl.so':
>  /usr/lib64/libgsl.so.0: undefined symbol: cblas_ctrmv
>
> I'm running R-2.5.1 compiled for x86_64 with a custom built ATLAS.
>


-- 
A Master Carpenter has many tools and is expert with most of them. If you
only know how to use a hammer, every problem starts to look like a nail.
Stay away from that trap.
Richard B Johnson.
--

Christophe Pouzat
Laboratoire de Physiologie Cerebrale
CNRS UMR 8118
UFR biomedicale de l'Universite Paris V
45, rue des Saints Peres
75006 PARIS
France

tel: +33 (0)1 42 86 38 28
fax: +33 (0)1 42 86 38 30

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] trivial typos R-admin

2007-08-05 Thread Tobias Verbeke

Please find below a patch against

https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi

for two trivial typos.


1337c1337
< vanilla @R{} installation).  This location cna be overridden by
---
 > vanilla @R{} installation).  This location can be overridden by
1343c1343
< site libraries are always include by @samp{.libPaths()}.
---
 > site libraries are always included by @samp{.libPaths()}.


Kind regards,
Tobias

-- 

Tobias Verbeke - Consultant
Business & Decision Benelux
Rue de la révolution 8
1000 Brussels - BELGIUM

+32 499 36 33 15
[EMAIL PROTECTED]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] trivial typos R-admin

2007-08-05 Thread Duncan Murdoch
On 05/08/2007 7:36 AM, Tobias Verbeke wrote:
> Please find below a patch against
> 
> https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi
> 
> for two trivial typos.
> 
> 
> 1337c1337
> < vanilla @R{} installation).  This location cna be overridden by
> ---
>  > vanilla @R{} installation).  This location can be overridden by
> 1343c1343
> < site libraries are always include by @samp{.libPaths()}.
> ---
>  > site libraries are always included by @samp{.libPaths()}.


Thanks, now fixed in R-devel.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] trivial typo R-lang

2007-08-05 Thread Tobias Verbeke
Please find below a patch for a trivial
typo in R-lang:


384c384
< Symbol have mode @code{"name"}, storage mode @code{"symbol"}, and type
---
 > Symbols have mode @code{"name"}, storage mode @code{"symbol"}, and type


Kind regards,
Tobias

-- 

Tobias Verbeke - Consultant
Business & Decision Benelux
Rue de la révolution 8
1000 Brussels - BELGIUM

+32 499 36 33 15
[EMAIL PROTECTED]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] trivial typo R-lang

2007-08-05 Thread Duncan Murdoch
On 05/08/2007 8:11 AM, Tobias Verbeke wrote:
> Please find below a patch for a trivial
> typo in R-lang:
> 
> 
> 384c384
> < Symbol have mode @code{"name"}, storage mode @code{"symbol"}, and type
> ---
>  > Symbols have mode @code{"name"}, storage mode @code{"symbol"}, and type

Fixed, thanks.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Compiling R for the Sony Playstation 3?

2007-08-05 Thread elw


>> Beyond that, there may be a few more things that can be done to make R 
>> run "stupidly fast" on ps3 or IBM Cell blades.

> Wouldn't the right way to go here be to make it use the PS3 graphics 
> hardware, in a http://www.gpgpu.org/ kind of way? Or are the Cell 
> processors on the PS3 graphics processors too?


The accelerated-graphics bits in the ps3 are not exposed to the linux 
kernel, due to NDA/licensing/SuperSekritTypeStuff at Sony.

But, yes, post-reverse engineering, that would be nice.  :-)

My understanding is that Sony expects to be able to make games for the PS3 
hardware for the next decade or so.  This seems fairly reasonable, given 
that they only stopped making games for the PS**ONE** two or three years 
ago.  I still occasionally see them in stores, even.


> Of course if you are doing this for fun I'd like to see a Nintendo Wii 
> port, just so I can play Super Mario Generalised Linear Modelling by 
> waving the controller around.


There is a python script available to make the wiimotes act as a standard 
X11 mouse device (on linux, via /dev/input/mice);  I hear that this works 
just fine.  The link to instructions is here:

http://www.wiili.org/index.php/WMD

I bought a Wiimote and a Nunchuck (which has a couple extra buttons, 
trigger, a 'hat'-style analog joystick, and a few more accelerometers) a 
couple months ago with the intent of eventually doing some experimenting 
with them.  No time available, yet.

[What I want is to be able to fly through large social network graphs in 
R... rendered in OpenGL.  Is that too much to ask?  :-)]

--e

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Compiling R for the Sony Playstation 3?

2007-08-05 Thread elw

> I bought a Wiimote and a Nunchuck (which has a couple extra buttons, 
> trigger, a 'hat'-style analog joystick, and a few more accelerometers) a 
> couple months ago with the intent of eventually doing some experimenting 
> with them.  No time available, yet.

(for folks who don't already know this - the wiimotes are bluetooth 
devices.  there are also bits available to use them as mice with windows 
or a macintosh)

--e

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Optimization in R

2007-08-05 Thread Petr Savicky
I would like to add a remark and a question.

Remark.

There is a part of R, which allows the user to select
among several methods for the same task and also to add
his own C code: random number generation. However, the interface
for optimization is more complex. In my opinion, looking
for a unified interface for this is desirable, but it is
a research problem, not a suggestion for an immediate
code modification.

Question.

Is there a way how to optimize a function written in C
using optim? This would be very useful, if the optimization
needs a lot of iterations. This may be done by defining 
an R function, which does nothing more than calling .C with
appropriate parameters,
but this looses efficiency. A more efficient solution
could be adding a specified entry point (or several, if derivatives
are also available), similar as in the user defined random number
generator. Then, a parameter of optim could control, whether
the function to be optimized is fn or the C entry point.

Petr Savicky.

> I don't have an example of that but that does not make it less
> desirable.  If one wants to use method 1, 2 or 3 then one can
> use optim with a method= but if one wants to use methods 4
> or 5 then one must use an entirely different function.  Surely
> it would be better to be consistent from the user's viewpoint
> and allow all of them to work consistently through the same
> interface.
> 
> On 8/4/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> > On 04/08/2007 2:53 PM, Gabor Grothendieck wrote:
> > > The example of generic functions.
> >
> > Show me an example where we have a list of ways to do a calculation
> > passed as an argument (analogous to the method argument of optim), where
> > the user is allowed to add his own function to the list.
> >
> > Duncan Murdoch
> > >

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Optimization in R

2007-08-05 Thread Petr Savicky
I am sorry for omitting a citation in my previous post.
The complete message is as follows (my text unchanged). PS

I would like to add a remark and a question.

Remark.

There is a part of R, which allows the user to select
among several methods for the same task and also to add
his own C code: random number generation. However, the interface
for optimization is more complex. In my opinion, looking
for a unified interface for this is desirable, but it is
a research problem, not a suggestion for an immediate
code modification.

Question.

Is there a way how to optimize a function written in C
using optim? This would be very useful, if the optimization
needs a lot of iterations. This may be done by defining 
an R function, which does nothing more than calling .C with
appropriate parameters,
but this looses efficiency. A more efficient solution
could be adding a specified entry point (or several, if derivatives
are also available), similar as in the user defined random number
generator. Then, a parameter of optim could control, whether
the function to be optimized is fn or the C entry point.

Petr Savicky.

On Sat, Aug 04, 2007 at 06:56:47PM -0400, Gabor Grothendieck wrote:
> I don't have an example of that but that does not make it less
> desirable.  If one wants to use method 1, 2 or 3 then one can
> use optim with a method= but if one wants to use methods 4
> or 5 then one must use an entirely different function.  Surely
> it would be better to be consistent from the user's viewpoint
> and allow all of them to work consistently through the same
> interface.
> 
> On 8/4/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> > On 04/08/2007 2:53 PM, Gabor Grothendieck wrote:
> > > The example of generic functions.
> >
> > Show me an example where we have a list of ways to do a calculation
> > passed as an argument (analogous to the method argument of optim), where
> > the user is allowed to add his own function to the list.
> >
> > Duncan Murdoch
> > >

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel