Re: [Rd] call fortran in R

2005-08-05 Thread Sébastien Durand
Ok, Thanks a lot for all the info. I will take the time to fix my system, recompile my fortran code and create my package... Sincerely, Sébastien Le 05-08-05 à 17:07, stefano iacus a écrit : > Sebastien, > > if you want to use the R binary from CRAN, then you should assume gcc > 3.3 and g7

Re: [Rd] call fortran in R

2005-08-05 Thread stefano iacus
Sebastien, if you want to use the R binary from CRAN, then you should assume gcc 3.3 and g77 3.4.2 (which comes with the installer for this reason). You can force gcc to default to 3.3 using sudo gcc_select 3.3 and sudo gg_select 4.0 to restore the new compiler. If you want to use gcc 4.0 and

Re: [Rd] call fortran in R

2005-08-05 Thread Sébastien Durand
I am starting to get confused, What should I used to make sure I got the corrected and most recent setup that will allow me to correctly compile and run fortran routine under R.2.1.1 Please note that I am using the last version of MAC OS X, TIGER which is 10.4.2 And that I have presently i

Re: [Rd] call fortran in R

2005-08-05 Thread Bill Northcott
On 04/08/2005, at 8:00 PM, Sebastien Durand wrote: > I used a mac G5, R.2.1.1, and G77 3.4.4 and I would like to use and > call a fortran subroutine. > The trouble is that it seems I am not able to correctly load the > compiled code. . > base > 2 /Library/Frameworks/R.framew

Re: [Rd] call fortran in R

2005-08-04 Thread stefano iacus
please don't mix gcc 4.0 and g77. Also don't mix R binary which is gcc-3.3/g77-3.4.2 with gcc4 or gfortran. stefano On 04/ago/05, at 17:25, Sébastien Durand wrote: > Dear all, > > Since the command you ask me to type doesn't show anything > Here some more information, on my system and on the fo

Re: [Rd] call fortran in R

2005-08-04 Thread Simon Urbanek
On Aug 4, 2005, at 1:38 PM, Sébastien Durand wrote: > Ok, I am presently updating my system. > > How do you set > setenv gcc /usr/local/bin/gfortran. That won't help even if you do it in bash - this is wrong! (F77=gfortran is what may help if you want to re-compile R with gcc4). If you

Re: [Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
Forget that last reply! I found how to set the environment! Le 05-08-04 à 13:38, Sébastien Durand a écrit : > Ok, I am presently updating my system. > > How do you set > setenv gcc /usr/local/bin/gfortran. > > Using bash. > > Then I will the command to compile the foo.f file been the same

Re: [Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
Ok, I am presently updating my system. How do you set setenv gcc /usr/local/bin/gfortran. Using bash. Then I will the command to compile the foo.f file been the same! I guess so S. > > also gcc 4061 is a bit old -- the tiger update in 10.4.2 was > 50xx, i think, cvs is up to apple build

Re: [Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
You are totally write I will learn and already did learn more than much with master Ripley replies. Thus I do still state that I mentionned that I was using mac os x in a message that was scrubbed (???) see Duncan Murdoch reply for proof... ;) Any how next time I will make sure it shows in

Re: [Rd] call fortran in R

2005-08-04 Thread Prof Brian Ripley
So the problem IS that your symbol is not exported by your shared object, and you need advice on the tools you are using (not R). On Thu, 4 Aug 2005, Sébastien Durand wrote: Ok, Dear all, I have state previously, I am using mac os X tiger on a g5, using the last version of R 2.1.1 When I ty

Re: [Rd] call fortran in R

2005-08-04 Thread Jeffrey Horner
Sébastien Durand wrote: > Ok, > > Dear all, > > I have state previously, I am using mac os X tiger on a g5, using the > last version of R 2.1.1 Well, to Prof. Ripley's point, you never stated that you were running OS X, just a mac G5. Linux also runs on a G5. Learn much, you will, from Maste

[Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
Dear all, Since the command you ask me to type doesn't show anything Here some more information, on my system and on the foo.so compiled file I am using g77 version 3.4.4 Configured with: ../gcc/configure -- enable-threads=posix --enable-languages=f77 I am using gcc version 4.0.0 20041026 (App

[Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
Ok, Dear all, I have state previously, I am using mac os X tiger on a g5, using the last version of R 2.1.1 When I type in the terminal nm -g ~/Desktop/Fortan_kmeans/kmeans3.so or nm /Users/sebas/Desktop/Fortan_kmeans/kmeans3.so | grep ' T ' Nothing appears on my screen When I type nm ~/D

Re: [Rd] call fortran in R

2005-08-04 Thread Prof Brian Ripley
On Thu, 4 Aug 2005, Duncan Murdoch wrote: Sébastien Durand wrote: At the beginning I was not using symbol.For(), and whatever I add a "_" or not e.g.: .Fortran("wrapper",... I get the same error You could look at symbol.For("wrapper"), and see if the name it prints is exported from your .s

Re: [Rd] call fortran in R

2005-08-04 Thread Duncan Murdoch
Sébastien Durand wrote: > At the beginning I was not using symbol.For(), and whatever I add a > "_" or not > > e.g.: > > .Fortran("wrapper",... > > I get the same error You could look at symbol.For("wrapper"), and see if the name it prints is exported from your .so. I don't know how to see

Re: [Rd] call fortran in R

2005-08-04 Thread Duncan Murdoch
Sébastien Durand wrote: > Thanks for your help, > > I had read those web pages already, and the post you referred to > already. > > So I will try to give more details to what I have done till now > > First I must mention again that I am using a mac under tiger. So I > am using .so files. >

[Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
At the beginning I was not using symbol.For(), and whatever I add a "_" or not e.g.: .Fortran("wrapper",... I get the same error Sebastien > You want to just say: > > .Fortran("wrapper", ... > > not > > .Fortran(symbol.For("wrapper"), ... > > Patrick Burns > [EMAIL PROTECTED] > +44 (0)20 8

[Rd] call fortran in R

2005-08-04 Thread Sébastien Durand
Thanks for your help, I had read those web pages already, and the post you referred to already. So I will try to give more details to what I have done till now First I must mention again that I am using a mac under tiger. So I am using .so files. My fortran file is called kmeans.f, and my

Re: [Rd] call fortran in R

2005-08-04 Thread Ales Ziberna
If I understand correctly, you used .Fortran("wrapper",) The problem might be that the function name ("wrapper") was changed in the compilation of the code! See the mail bellow for clues (a previous post on R-help by Duncan Murdoch) Natalie Hawkins wrote: > Using R 2.0.1 on Windows XP, I am

Re: [Rd] call fortran in R

2005-08-03 Thread Sebastien Durand
Hi Paul, In fact, I used the three points just hide the long and exhaustive serie of parameters. >From what I understood of the error warnings, my serie of parameters didn't even had the chance to be properly read and shall not be the cause of what we are seeing. Even so I change the function

Re: [Rd] call fortran in R

2005-08-03 Thread Paul Roebuck
On Wed, 3 Aug 2005, =?iso-8859-1?Q?S=E9bastien_Durand_ wrote: > I used a mac G5, R.2.1.1, and G77 3.4.4 and I would like to use and > call a fortran subroutine. > The trouble is that it seems I am not able to correctly load the > compiled code. > > Here is what I have done: > > In the terminal thi

[Rd] call fortran in R

2005-08-03 Thread Sébastien Durand
Hello, I used a mac G5, R.2.1.1, and G77 3.4.4 and I would like to use and call a fortran subroutine. The trouble is that it seems I am not able to correctly load the compiled code. Here is what I have done: In the terminal this how I compiled my fortran code: R CMD SHLIB ~/Deskto