similar to: Difference between .C and .Fortran (on Windows)

Displaying 20 results from an estimated 30000 matches similar to: "Difference between .C and .Fortran (on Windows)"

2005 Sep 09
2
A question on R memory management in .Fortran() calls under Windows
Dear R community, I have a question on how R manages memory allocation in .Fortran() calls under Windows. In brief, apparently, it is not possible to allocate large matrices inside a Fortran subroutine unless you pass them as arguments. If you do not act in this way RGUI crashes with a stack overflow error and acting on memory through vsize nsize ppsize and memory.limit does not help at all.
2005 Jun 14
3
Calling C from Fortran
I would like to call C routines from Fortran under linux as suggested in section 5.6 of the "Writing R extensions" documentation. I'm familiar with Fortran but not with C. I understand the example provided in Fortran: subroutine testit() double precision normrnd, x call rndstart() x = normrnd() call dblepr("X was", 5, x, 1) call rndend() end but I don't understand
2001 Oct 11
3
Underscores and Fortran code
This might more properly be filed as a bug report, but ... I came upon the following problem while trying to dyn.load a library of Fortran code into R. I'm running RedHat 7.1 on a Pentium III laptop, with R version 1.3.1 (latest rpm from CRAN) and gcc/g77 version 2.96. My library has a number of Fortran subroutines that have underscores in their names for readability. By default g77
2019 May 04
4
R problems with lapack with gfortran
On Sat, May 04, 2019 at 06:42:47PM +0200, Thomas K?nig wrote: > > > - figure out Fortran2003 specification for C/Fortran interoperability > > -- this _sounds_ like the right solution, but I don't think many > > understand how to use it and what is implied (in particular, will > > it require making changes to LAPACK itself?) > > That would actually be fairly
2004 Jan 19
1
memory limitation with Fortran interface
Hi, I'm using R 7.0 under Linux as a programming interface to Fortran (g77 v0.5.24). Basically, what I want to do is to call a fortran subroutine of mine which performs MCMC computations. Apparently I'm getting into memory management problems. To track the problem I wrote the following small Fortran subroutine (saved as test.f) : subroutine test(n,p) implicit none
2019 May 06
1
R problems with lapack with gfortran
On Mon, May 6, 2019 at 11:55 AM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > On 5/4/19 6:49 PM, Steve Kargl wrote: > > On Sat, May 04, 2019 at 06:42:47PM +0200, Thomas K?nig wrote: > >>> - figure out Fortran2003 specification for C/Fortran interoperability > >>> -- this _sounds_ like the right solution, but I don't think many >
2009 Sep 11
1
call Fortran from R
Dear R users, I have to call fortran program from within R (R 2.8.1 on ubuntu 8.10 machine). Suppose I have a fortran code like this (this is only a toy model, my working model is far more complex, but input/output is similar) DOUBLE PRECISION FUNCTION model(times, alfa, beta) DOUBLE PRECISION alfa, beta, times model=beta*sin(times)+alfa*cos(times) END FUNCTION which
2001 May 09
1
Fortran subroutines dblepr, realpr, intpr
I am making my first attempts at using some Fortran code with R, and so far it's going OK. To print from my Fortran programs, it seems I need subroutines dblepr, realpr and intpr. From the excellent "Writing R Extensions" document: "Three subroutines are provided to ease the output of information from FORTRAN code. subroutine dblepr(label, nchar, data, ndata)
2000 Feb 02
1
(not) compiling fortran -- dynamic loading problem
Hi, everyone. This may be properly a fortran question rather than an R question. I'm trying to add a few print statements to otherwise working fortran code in one of the libraries so I can see what's going on in the code. I have no problem doing so on an SGI machine, but under LinuxPPC I've run into a problem. The code compiles and creates a shared object (.so), but when I issue
2005 Sep 09
2
Debugging R/Fortran in Windows
Hi, I'm trying to debug an R interface to a Fortran subroutine from Windows. (Yes, I know I should try Unix/Linux as well, but a quick attempt suggested that the (MinGW g77) Fortran compiler I have installed on my Windows laptop works better on this Fortran code.) I'm trying to follow the instructions in the "Writing R Extensions" Manual: Start R under the debugger after
2005 Sep 09
2
Debugging R/Fortran in Windows
Hi, I'm trying to debug an R interface to a Fortran subroutine from Windows. (Yes, I know I should try Unix/Linux as well, but a quick attempt suggested that the (MinGW g77) Fortran compiler I have installed on my Windows laptop works better on this Fortran code.) I'm trying to follow the instructions in the "Writing R Extensions" Manual: Start R under the debugger after
2005 Jun 06
1
Missing values in argument of .Fortran.
I wish to pass a vector ``y'', some of whose entries are NAs to a fortran subroutine which I am dynamically loading and calling by means of .Fortran(). The subroutine runs through the vector entry by entry; obviously I want to have it do one thing if y[i] is present and a different thing if it is missing. The way I am thinking of proceeding is along the xlines of: ymiss <- is.na(y)
2007 Apr 11
3
Fortran coding standards
I have some comments on the Fortran code in the fseries package in file 4A-GarchModelling.f , especially the subroutine GARCHFIT and function DSNORM. I appended the code to the end of an earlier message, but it was rejected by some rule. Let me first say that I am grateful that packages for financial econometrics exist in R. Fortran 77 had PARAMETERs, and PARAMETERs equal to 99999 and 200 should
2001 Oct 02
1
Graceful exit from fortran. (fwd)
rolf at math.unb.ca said: > If I say something like > if(x .gt. 42.d0) stop > then indeed everything stops, i.e. R falls over. I'd ***like*** to be > able to print out an informative error message (which I guess could be > done - In Fortran: subroutine foo(..., ier) integer ier ier=0 ... if (x .gt. 42.d0) then ier=1 return endif
2009 Apr 15
1
Compiling Fortran Subroutines as R Shared Objects on Mac OS-X
Hello, I am trying to compile some F77 subroutines as shared objects for R on my Mac. --> Mac OS-X Version 10.4.11 (Tiger Intel Mac) I have done this (successfully) before on Sun Solaris and Linux Fedora systems using the following command. > R CMD SHLIB myfile.f I have g77 installed from this page. http://hpc.sourceforge.net/ I am using R 2.8.1, and I have installed all 4 additional
2005 May 18
2
Fortran 95 in R ?
Is it possible to run Fortran 95 code from R? I don't think so, but hopefully someone can prove me wrong. Here is the test I tried: A little fortran 95 subroutine: subroutine allloc() real, dimension(:, :), allocatable :: a integer :: n n = 10 allocate(a(n,n+1)) end I then compiled: >g95 -c allloc.f >R CMD SHLIB allloc.o Here is what happens when I try to dyn.load it in R 2.1.0
2005 May 18
2
Fortran 95 in R ?
Is it possible to run Fortran 95 code from R? I don't think so, but hopefully someone can prove me wrong. Here is the test I tried: A little fortran 95 subroutine: subroutine allloc() real, dimension(:, :), allocatable :: a integer :: n n = 10 allocate(a(n,n+1)) end I then compiled: >g95 -c allloc.f >R CMD SHLIB allloc.o Here is what happens when I try to dyn.load it in R 2.1.0
2010 Mar 24
1
Fortran DLLs and R
Hi All, I'm writing R code that would benefit from doing certain tasks using compiled blocks of code, specifically Fortran subroutines of my own (already written, debugged in both Fortran77 and Fortran90). I am currently working on a Windows machine using Lahey and/or MinGW(g77) compilers. It is possible to dynamically load Fortran DLLs into R as evidenced from the several documents
2005 Oct 26
1
pb with dyn.load - fortran code now attached
Hi, here are a couple of strange things happening with R.2.2.0 compiled under Mandrake-10.1 At the begining of the story I have segmentation fault using package RandomFields in conjuction with some Fortran code of mine loaded with dyn.load. One of my fortran programs contains a subroutine named fstat Trying to trace , I simplified the sequence as much as possible and I end up with the the
2004 Apr 30
1
configure problem - mixed fortran/c
I'm trying to build R 1.9.0 to get the opportunity to build rpy for some folks at my office. (I'm a Python guy, not an R guy, so I'm completely unfamiliar with the machinations of building R.) I'm having trouble getting past the configure step. A plain old configure generates this output at the end: checking whether we can compute C Make dependencies... yes, using gcc -MM