similar to: weird behaviour when calling c++

Displaying 20 results from an estimated 10000 matches similar to: "weird behaviour when calling c++"

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]]
2003 Jul 22
3
R and C++ compared with only C++
My computer is a pentium 4 running at 2.4 GHz. My R is 1.7.1 I have written a program in R that calls C++. The program spends most of the time in C++ ( > 90% ). R basically deals with output and input. How slower can this be compared with the program I would get from rewriting everything in C++? Thank you.
2010 Oct 25
2
R-Fortran question (multiple subroutines)
Dear R-helpers, apologies if this is somewhere in a manual, I have not been able to find anything relevant. I run Windows Vista. I have some Fortran code in a subroutine, and have no problem calling this from R with .Fortran, compiling the code either with 'R CMD SHLIB' or independently with gfortran. But is it possible to have more than one subroutine in my source file, one depending
2011 May 04
3
Error in .Fortran Call
I have the following FORTRAN code converted to a DLL: ! my_xmean.f90 ! ! FUNCTIONS/SUBROUTINES exported from my_function.dll: ! my_function - subroutine ! subroutine my_xmean(X,N,XMEAN) ! Expose subroutine my_function to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'my_xmean_'::my_xmean ! Body of my_function DOUBLE PRECISION X(N) XMEAN=0D0 DO J=1,N
2006 Dec 21
2
Add line to plot. The line falls outside the current plot.
Hi, I have plotted the graph of x^2 and I would like to add to it a line that is currently outside of the plot ( the points of the line fall outside of the plot ). When I use the function 'lines' the graphics window does not became larger to show this line. Is there any way I can fix this? Also, how can I eliminate the axis from the plot? Thank you.
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)
2014 Oct 14
1
Do subroutines need their own h extension?
Hi all, According to the documentation ( http://www.voip-info.org/wiki/view/Asterisk+h+extension): Be aware: Macros require their own h extension as they do not make use of the calling context's h extension! Does this apply to subroutines too? I am unable to find the corresponding explanation. If not: what happens when a call is hanged-up during the execution of a subroutine? Is the h
2008 Apr 29
1
behaviour of .Fortran in terms of "double precision" and "real" datatype
Hello R-world! This is my first post to the R list, so I feel that I need to say thanks to the community (I'm using R now for 5 months)! I'd greatly appreciate if somebody could explain some odd behavior of ".Fortran" to me. Let's assume a primitive Fortran subroutine barfoo.f ---------------------------- subroutine bar(y, v) double precision y real v
2005 Nov 17
1
Linking Fortran subroutines
Hi, I just started using R a few weeks ago and have a problem with linking Fortran subroutines to R. For some reasons, I need to compile a Fortran program in R (or Splus) and the whole program consists a couple of subroutines, say, subA and subB. There is no difficulty in linking the subroutines individually, but two subroutines are nested, as shown below, SUBROUTINE subA(arg.) EXTERNAL
2007 Jun 12
1
package with fortran 90 subroutines under windows xp
Hello, I work under windows xp and I am trying to build a R package with a subroutine written in fortran 90. I have installed all the updated tools and I am working with R-2.4.0 or R-2.5.0. When I check a package with a subroutine in fortran 77 (and extension f) everything is ok. When I try to build the same package with a subroutine in fortran 90 (with extension f90) the following warning
2012 Oct 20
1
Trouble returning 2D array into R from Fortran
Hello, I have been trying to use a collection of Fortran subroutines to return a 2D array of calculated values to my R code, calling a Fortran wrapper subroutine from R. I've done this successfully before with C & C++ code. The Fortran wrapper subroutine which is to be called by R takes a set of input arguments & then should return an array of 2 columns & the specified number of
2016 Mar 04
3
ALLOCATE in a FORTRAN subroutine
Hi, I am a FORTRAN developer and I am 'translating' R functions in FORTRAN subroutines. I am 'new' to R. It's my first question in this mailing-list and English is not my natural language. Very often, an R function gives an 'array' as result and you don't have to bother with the dimension of the array : R creates automatically an array with the good length.
2011 Nov 03
0
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
A helpful link-time optimization would be to place subroutines that are used close together in time also close together in the executable file. That also goes for data that is in the executable file, whether initialized (.data segment) or zero-initialized (.bss). If the unit of linkage of code is the function rather than the compilation module, and the unit of linkage of data is the individual
2013 Aug 02
1
Dial application "b" subroutine arguments not passing?
Asterisk 11.1.0 I'm trying to use the "b" subroutine of the Dial application so that I can do some stuff with our internal applications that need to have access to the called channel information. I can see that the subroutine is being executed, but the arguments I pass don't see to make it to the subroutine. [callmenow] exten => s,1,NoOp(callmenow: Queue without answer)
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.
2011 Nov 03
1
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
On Wed, Nov 2, 2011 at 11:05 PM, Don Quixote de la Mancha <quixote at dulcineatech.com> wrote: > A helpful link-time optimization would be to place subroutines that > are used close together in time also close together in the executable > file.  That also goes for data that is in the executable file, whether > initialized (.data segment) or zero-initialized (.bss). > > If
2002 Sep 23
1
calling a DLL/shared lib from R directly?
Is it possible to call a basic function/subroutine in a DLL/shared lib from within R without having to build an R package? I have a function like: void __stdcall testfunc2( unsigned long a, double b, unsigned long c ) { return a * b * c; } or=20 subroutine fortran_2002_bh_age (sp,site,total_age,bh_age) integer*2 sp real*4 site=20 real*4 total_age integer*2 bh_age
2019 Sep 11
1
Fw: Calling a LAPACK subroutine from R
On 2019-09-11 22:16, Avraham Adler wrote: > Can you write a small C function that calls LAPACK call that fro your > Fortran code? Yes, an extra step but maybe less traumatic than rewriting > parts of LAPACK directly. Yes, I know how to do that, but I find it somewhat bizarre that it is impossible to call a Fortran subroutine from Fortran. And rewriting 'dgemv' was simple:
2004 Feb 12
3
How to detect whether a file exists or not?
I would like my program to load variables x,y,x from a file 'myFile.r' but if this file does not exist, I want my program to create/initialize x,y,z. Does anyone know how to do this? Thank you very much. Francisco J. Molina
2009 Dec 29
2
Calling Fortran90 code from R
Dear all, I am currently trying to create a package wrapping Fortran90 code, the RRTMG radiative transfer model( http://rtweb.aer.com/rrtm_frame.html). I am doing this on a Linux workstation, with gcc/gfortran, in case this matters. The code heavily relies on F90 features, in particular modules, which seem to clash with R's assumptions for calling compiled code. What I have done: -compiled