Displaying 20 results from an estimated 20000 matches similar to: "Debugging R/Fortran in Windows"
2005 Mar 18
2
Trouble debugging with gdb, R on Windows
I'm trying to follow the example in the R for Windows FAQ on running
gdb and am getting stuck because gdb tells me "Cannot access memory at
address ...".
Here's what my gdb session looks like (This one from a cygwin shell,
but same results from plain Windows CMD shell):
$ cd R-devel/src/gnuwin32
$ gdb ../../bin/Rgui.exe
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation,
2011 May 05
2
Compiling a FORTRAN program under Windows 7
Hi,
I am trying to compile a FORTRAN program to call from R under Windows 7 but
I am having problem in the compiling step. To demonstrate this is the
program testit.f:
------------------------------------------
subroutine TESTIT(x,n,m)
dimension x(n)
do 10 i=1,n
10 x(i)=x(i)**m
end
--------------------------------------------
When I compile it with gfortran I get
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.
2004 Feb 11
3
RGui (Windows) crashes after use of a Salford Fortran DLL
Anybody out there successfully using the Salford Fortran compilers
with R?
I have created a DLL using the Salford FTN95 compiler and it works
in as far I can dyn.load it, run the routines and get the right
answers back. Unfortunately subsequently, sometime later, the
Rgui crashes (access violation I think from the DrWatson log). The
crashes depend on whether or not I paste the code as one
2017 Jun 20
1
Fortran programs not writing stdout on windows
A user has reported an issue that appears when a fortran executable is
called via R on Windows. I am unsure if this expected behavior or a
bug in Fortran or in how R calls Windows executables.
The problem is that when the fortran program is called from R, stdout
gets written to a file "fort.6" instead of stdout. When the same
executable is called from the terminal it works fine and
2014 Sep 15
1
Debug an R windows (Fortran) DLL within R with gdb?
Hi,?
I have a Fortran 77 subroutine (dll).
On windows XP, how ?would I 'debug it(Fortran) within R' using gdb?
This is how I made it.
----------------------
R CMD SHLIB main.f
gfortran -m32 ? ? -O3 ?-mtune=core2 -c main.f -o main.o
gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib
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
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
2009 Apr 12
3
problem with DivX9 and winetricks
HI
Trying to install Divx9 using winetricks. Using Ubuntu 8.10 and have cabextract installed, and my graphics card has it's driver installed (NVIDIA GEforce FX 5200).
Installation seems to go ok but does not re-start machine and there appear to be error messages in the terminal window, despite the fact that it says DivX is isntalled.
Testing results by trying to play Age of Empires II -
2003 May 03
2
Memory leakage?
Hi, all:
I'm using R 1.7.0 on WinXP under SDI mode. However, very often after I
closed all R windows, my CPU usage was still 100%. By checking the task
manager, I found there are one or several "Rgui.exe" still running and took
all the CPU. I had to close them one by one manually. This happened to me
with R 1.6.1, R 1.6.2 also and also on Win2K. Rememeber there was a
2013 Jan 18
1
debugging C/Fortran code with Visual Studio and Intel compilers
Hello,
My R code calles a C/Fortran dll and I want to debug C code using Visual
Studio and Intel compilers /debugger
Debugging with Rcpp and RInsight does not work correctly on Windows.
Is there some other way to set breakpoints in C code and access to
variables ?
Thank you !
Kind regards,
Vitaliy
[[alternative HTML version deleted]]
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)
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
2003 Apr 17
2
Difference between .C and .Fortran (on Windows)
In updating my web page on using non-standard compilers in Windows,
I've been trying to figure out exactly what the differences are
between .C() and .Fortran(), but the code is pretty convoluted.
Can someone let me know if the following is correct?
There are two differences between .C("foo", ...) and .Fortran("foo").
1. .C looks for the symbol "foo" in the
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
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
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)
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
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