Displaying 20 results from an estimated 10000 matches similar to: "using compiled fortran in R"
1999 Oct 08
1
error using dyn.load
I am trying to use dynamic loading of an outside C routine. I am
attempting 6.12.1 of Phil Spector's book. When I try to load the object
file I get an error I don't understand:
> dyn.load("runa.o")
Error in dyn.load(x) : unable to load shared library
"/usr/home/tdlong/run_avg/runa.o":
/usr/home/tdlong/run_avg/runa.o: ELF file's phentsize not the expected
2005 Aug 03
7
call fortran in R
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 ~/Desktop/Fortan_kmeans/kmeans3.f
There is the wrapper I have paste inside de kmeans3.f file:
c
2005 Jul 25
1
Fortran function name not in load table
Using R 2.0.1 on Windows XP, I am getting an error
msg:
Error in .Fortran("conic", nxy = nxy, npt = npt, CP =
cp, EP1 = ep1, EP2 = ep2, :
Fortran function name not in load table
I am wondering if there is a way to see what function
names are in the load table? Maybe the function name
has been altered?
The first thing I do in my analysis script is to load
a DLL, conic.dll,
2001 Mar 01
2
db pkgs
Hi,
I am wondering if anyone has had experience w/the R database
packages: RMySQL, RODBC, RPgSQL, and/or RmSQL, and if so, if you have
any recommendations to make. We have some large tables we would like to
store -- something like 5-10 columns by 3.5 mil rows (or maybe 7 mil
rows).
thanks,
Natalie Hawkins
Statistical Research Associate
FHCRC/Scharp
2009 Jul 30
1
What changed in the R Windows interface from v2.6.2 to v2.7.0?
Dear R-devel,
I would like to launch the Rgui.exe from a Fortran console application (we
will call this FortranCon.exe), that I have written myself. To do this, I
send the command line "C:\Program Files\R\R-X.X.X\Rgui.exe" (where X.X.X is
the version number) as an argument to the
Windows API function CreateProcess (see
http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx)
1998 Nov 18
1
loading fortran with Redhat 5.1
Hi All,
I'm running R 0.63 on Redhat 5.1 and when I attempt
to load a fortran routine I get:
> dyn.load("/home/royle/Rstuff/varna.o")
Error in dyn.load(x) : unable to load shared library "/home/royle/Rstuff/varna.o"
this function varna.o was compiled with:
gcc -c varna.f
with no errors or warnings.
Does anyone have any thoughts on this?
Thanks! (and thanks to
2010 Feb 12
1
R - Compiling and calling Fortran code that uses IMSL libraries - Help!
Good Afternoon R Help!
On of my users is seriously thinking about moving to R from Splus. In his
testing, he has already found some benefits to it. He has, however run
into one issue, calling his Fortran functions in R. Previously, in Splus,
he would do the following:
1. Compile via f90 the *.f program
2. link the object file to the Fortran IMSL libraries via the 'ld' command
3.
2005 Jul 05
1
calling fortran functions CHOL and DPOTRF form Fortran
Hi all,
I'm working out some Fortran code for which
I want to compute the Choleski decomposition of a covariance matrix
in Fortran.
I tried to do it by two methods :
1) Calling the lapack function DPOTRF.
I can see the source code and check that my call is correct,
but it does not compile with:
system("R CMD SHLIB ~/main.f")
dyn.load("~/main.so")
I get:
Error in
2004 Apr 20
2
compile Fortran code which calls C subroutine
I used "R CMD SHLIB" to compile the fortran filename.f file and the
filename.so is generated. But since in filename.f it calls
another subroutine written in C, i had problem in "dyn.load" because it
could not find the C subroutine.
I have the .c file but don't know how to tell R about it.
How should I compile when I want to call the fortran function
2010 Aug 24
3
Compiling Fortran for R : .so: mach-o, but wrong architecture
Dear all,
I'm trying to compile FORTRAN code to be used in R, failing miserably. I got
a simple code function to try to figure out what is going wrong. Here is the
code (available on the web) :
subroutine bar(n, x)
integer n
double precision x(n)
integer i
do 100 i = 1, n
x(i) = x(i) ** 2
100 continue
end
1. I compiled the
1998 Nov 18
2
[jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]
I can not answer this (message only to me).
Certainly, some of you do..
Martin
-------
Date: Wed, 18 Nov 1998 13:22:47 -0500 (EST)
From: "J. Andy Royle" <jar@oriole.er.usgs.gov>
To: Martin Maechler <maechler@stat.math.ethz.ch>
Subject: Re: [R] loading fortran with Redhat 5.1
In-Reply-To: <199811181812.TAA26068@sophie.ethz.ch>
Hi Martin,
The reason I was
2009 Jun 01
2
Calling Fortran from C++
Hi,
can anybody point me to a package with C++ code that call Fortran
subroutines?
I am trying to do the same thing but we scarce success.
Error in dyn.load("utils.so") :
unable to load shared library 'utils.so':
dlopen(utils.so, 6): Symbol not found: _robcovf
Referenced from: utils.so
Expected in: dynamic lookup
[[alternative HTML version deleted]]
2002 Oct 26
2
Fortran
Hello everybody,
Could someone please send me a very simple example using Fortran from
R? Say pass a value to an executable and get the result in R. Actually it
seems it may be possible to call an *.f file ?? or I am wrong again?
The manual is very terse on the subject.
Thank you very much
Stephen Elijah
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help
2008 Apr 09
1
getNativeSymbolInfo fails with Fortran symbol.
In the following code routine 'initaquaphy' is defined in Fortran,
and dynamically loaded into R.:
test.f:
subroutine initaquaphy(odeparms)
external odeparms
double precision pars(19)
common /myparms/pars
call odeparms(19, pars)
return
end
$ R CMD SHLIB Aquaphy.f
gfortran -fpic -g -O2 -c test.f -o test.o
gcc -std=gnu99 -shared
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
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
2005 Apr 27
1
dyn.load(), DLL, Fortran, TLNise software
Dear all,
I would like to call TLNise ("Two-Level Normal indipendent sampling estimation")
software within R.
This software estimates a hierarchical model and it can be download from
Philip Everson's website at
"http://www.swarthmore.edu/NatSci/peverso1/TLNise/tlnise.htm".
The TLNise software consists of:
1) a Fortran source code (tlnisemv1.f) and
2) a Splus code
2013 Apr 24
1
Problems with Fortran calls when loaded a dll compiled with gfortran-4 Cygwin 4.5.3
An embedded and charset-unspecified text was scrubbed...
Name: inte tillg?nglig
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130424/70100a7f/attachment.pl>
2002 Apr 09
1
Fortran (77) in R
Hi,
I'm learning Fortran and trying to load a Fortran subroutine into R.
I've done:
R SHLIB Fibonacci.f
and it compiled fine.
Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+ .Fortran("Fibonacci",
+ as.integer(n))[[1]]
+ }
> Fib(5)
Error in .Fortran("Fibonacci", as.integer(n)) :