Displaying 20 results from an estimated 3000 matches similar to: "F77_CALL, F77_NAME definition"
2015 Mar 25
4
F77_CALL/NAME problem
Dear R-devel,
I am trying to use Fortran DGESV subroutine into C. Here it is the relevant
part of the C file I am currently writing
#include<stdio.h>
#include<R.h>
#include<Rmath.h>
#include<math.h>
void F77_NAME(DGESV)( int*, int*, double*, int*, int*, double*, int*, int*);
void solve( int *p, double *A, double *Ainv)
{
...
F77_CALL(DGESV)(p, p, Ain, p, ipiv,
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
Dear R contributors,
Considering the following sample C code, that illustrates two possible
uses of a Cholesky decomp for inverting a matrix, equally valid at
least in theory:
SEXP test() {
int d = 2;
int info = 0;
double mat[4] = {2.5, 0.4, 0.4, 1.7};
double id[4] = {1.0, 0.0, 0.0, 1.0};
double lmat[3];
F77_CALL(dpotrf)("L", &d, mat, &d, &info);
lmat[0] = mat[0];
lmat[1]
2008 Mar 27
1
Cannot update packages on F8
Dear All,
I have just updated R to the version 2.6.2 on F8 (with the official F8
rpm). However, when running as root the following command:
update.packages(checkBuilt=T)
I get a bunch of errors like the ones below. Any ideas?
Thanks in advance,
Paul
-----------------------------------------------
* Installing *source* package 'nlme' ...
** libs
gcc -m32 -std=gnu99 -I/usr/include/R
2012 Mar 06
2
Calling FORTRAN function from R issue?
Hello,
I am trying to call the BLAS Level1 function zdotc from R via
a .C call like this:
#include "R.h"
#include "R_ext/BLAS.h"
void testzdotc() {
Rcomplex zx[3], zy[3], ret_val;
zx[0].r = 1.0; zx[0].i = 0.0;
zx[1].r = 2.0; zx[0].i = 0.0;
zx[2].r = 3.0; zx[0].i = 0.0;
zy[0].r = 1.0; zy[0].i = 0.0;
zy[1].r = 2.0; zy[0].i = 0.0;
zy[2].r = 3.0;
2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
Hi
I am new to writing C code and am trying to write an R extension in C. I
have hit a wall with F77_CALL(dgemm) in that it produces wrong results.
The code below is a simplified example that multiplies the matrices Ab and
Bm to give Cm. The results below show clearly that Cm is wrong.
Am=
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
Bm=
1 1 1
1 1
2006 Apr 28
0
random NaN in dpotri result
Hello all,
In a piece of c++ code (part of a future R package), I'm inverting a
relatively large covariance matrix many times using:
F77_CALL(dpotrf)(&upper, &xnrow, R, &xnrow, &info);
F77_CALL(dpotri)(&upper, &xnrow, R, &xnrow, &info);
I am sure that the input matrix is PD and inverts just fine. However, I
have found that dpotri gives one or more NaNs from
2006 Dec 19
1
precision when calling a C function; presence of Fortran call
I'm trying to figure out why the presence of a Fortran call affects the
result of a floating-point operation. I have C functions
void test1(int *n, double *f){
int outC;
double c0;
c0 = (double) *n * *f;
outC = floor(c0);
printf("when f computed by R, C says %d by itself\n",outC);
}
void test2(int *n, double *f){
extern int F77_NAME(ifloor)(double *);
int
2013 Aug 27
1
Error in simulation. NAN
Hi all,
im triyng to implement a bayesian model with R and c++.
I have a strange problem. I can't reproduce the error with a small
script and then i post the original one.
The problem is after the line
for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++)
For the first 34 iterations all work fine, after, all the simulations
of mu_acc_P return an "nan". If i delete the line
2011 Feb 20
2
Problem using F77_CALL(dgemm) in a package
Dear R-devel,
I've written a numerical solver for SOCPs (second order cone programs)
in R, and now I want to move most of the solver code into C for speed.
I've written combined R/C packages before, but in this case I need to
do matrix operations in my C code. As I have never done that before,
I'm trying to write some simple examples to make sure I understand the
basics. I am stuck
2014 Dec 20
0
Unexplained difference between results of dppsv and dpotri LAPACK routines
This isn't the help list for LAPACK, but as far as I can tell, dppsv expects a symmetric matrix input compacted as triangular, not a Choleski decomposed one. So try assigning lmat before the call to dpotrf.
-pd
> On 20 Dec 2014, at 22:06 , Pierrick Bruneau <pbruneau at gmail.com> wrote:
>
> Dear R contributors,
>
> Considering the following sample C code, that
2009 Mar 26
1
Bug? FORTTRAN help
I was feeling masochistic the other day and we have been having some wierd memory problems so I started digging into the source for L-BFGS-B. In the lbgfsb.c file I see the following code:
/* Cholesky factorization of (2,2) block of wn. */
F77_CALL(dpofa)(&wn[*col + 1 + (*col + 1) * wn_dim1], &m2, col, info);
if (*info != 0) {
*info = -2;
return;
}
If I am not mistaken
2004 Jul 05
1
passing char's from C to Fortran (mac os x)
Hello All,
In some package I use a c-routine which calls a fortran routine which
expects a char-string as input.
As per the writing R-extensions manual,
the Fortran routine is declared in C as:
void F77_NAME (setoptions) (char **option);
and then it is calles as follows:
char **option;
option = new char*[1];
option[0] = new char[256];
option[0] = strcpy(option[0],"Iteration
2019 Apr 29
3
R 3.6.0 for Debian buster
Am Montag, 29. April 2019, 15:03:54 CEST schrieb Kurt Hornik:
> >>>>> Johannes Ranke writes:
> > Am Montag, 29. April 2019, 13:44:03 CEST schrieb Kurt Hornik:
> >> >>>>> Johannes Ranke writes:
> >> Thanks. You may have seen that with current gfortran in
> >> testing/unstable, there are problems with the R BLAS/LAPACK API entries
2009 Sep 23
2
R + C + Lapack toy regression example
dear list,
since matrix manipulations is often of interest in statistical
computations, i'd like to get a working example of using Lapack for
regression. However, i run into an error.
My matrix-lapack-example.c file:
#include <R_ext/Lapack.h>
void reg(const char* trans, const int* m, const int* n,
const int* nrhs, double* a, const int* lda,
double* b, const int*
2019 Apr 29
3
R 3.6.0 for Debian buster
Am Montag, 29. April 2019, 13:44:03 CEST schrieb Kurt Hornik:
> >>>>> Johannes Ranke writes:
> Thanks. You may have seen that with current gfortran in
> testing/unstable, there are problems with the R BLAS/LAPACK API entries
> using a Fortran interface (and hence in particular when using the BLAS
> and LAPACK sources that ship with R).
No, I wasn't aware of
2019 Apr 29
1
R 3.6.0 for Debian buster
On 29 April 2019 at 15:03, Kurt Hornik wrote:
| >>>>> Johannes Ranke writes:
|
| > Am Montag, 29. April 2019, 13:44:03 CEST schrieb Kurt Hornik:
| >> >>>>> Johannes Ranke writes:
| >> Thanks. You may have seen that with current gfortran in
| >> testing/unstable, there are problems with the R BLAS/LAPACK API entries
| >> using a Fortran
2002 Feb 08
1
question about F77_NAME()
Dear R-help,
Sorry if this is way obvious. (It just wasn't for me...)
Do all parameters passed to Fortran routines from C need to be declared as
pointers? In various header files (e.g., Linpack.h), that seems to be the
case.
Also, what type should I declare in front of F77_NAME() for a subroutine?
void?
Thanks for any help!
Regards,
Andy
2013 Apr 23
2
Help: Where can I find the code for 'C_Cdqrls'?
Dear all,
I’m not sure if it is O.K. to ask this question here.
But where can I find the code for the function ‘C_Cdqrls’ which is called by the R function ‘lsfit‘.
Thank you all.
Sorry for being naïve if so.
--------------------
Ziqiang Zhao
2013-04-23
[[alternative HTML version deleted]]
2010 Oct 07
2
long double, C, fortran
I'm using .Call() to call C code from R under Windows (on an Intel
Core 2 duo). The C code involves some very small numbers, and I think
I'm losing precision using doubles. I thought I might use long doubles
to see if I can get that precision back. I have a few questions:
1. Does this affect the portability to other OSs or processors?
2. I'm returning the results in a matrix. Will
2020 Jul 15
2
Openblas?
On 2020-07-15 14:36, Dirk Eddelbuettel wrote:
>
> G?ran,
>
> This is not an easy email to reply to because it _contains nothing
> reproducible_.
Thanks Dirk,
Sorry about that, but my real question was (see below): "Is the problem
that openblas uses C versions of blas?" That is, do I need to change
F77_CALL(name)(...);
to
cblas_name(...);
everywhere? And if so, is