search for: dpotrf

Displaying 17 results from an estimated 17 matches for "dpotrf".

Did you mean: dpbtrf
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 dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library [...] undefined symbol: dpo...
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
...s, 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] = mat[1]; lmat[2] = mat[3]; F77_CALL(dppsv)("L", &d, &d, lmat, id, &d, &info); // id now contains L^(-T) F77_CALL(dpotri)("L", &d, mat, &d, &info); // mat contains mat^(-1) Rp...
2010 Oct 07
2
long double, C, fortran
...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 a matrix of REALs be sufficient for holding long doubles, or will it be cast back to doubles? 3. Will calls to FORTRAN BLAS (like dsymv, dpotrf, dpotri) still work with long doubles? Thanks for any help you can provide. -- Richard D. Morey Assistant Professor Psychometrics and Statistics Rijksuniversiteit Groningen / University of Groningen http://drsmorey.org/research/rdmorey
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 illustrates two possible > uses of a Cholesky decomp for inverting a matrix, equally valid at > least in theor...
2004 Aug 04
1
R Matrix package solve
...said the matrix is singular). I recently updated my versions of R to 1.9.1 and also the Matrix package, but I can't seem to get any similar equivalent matrix calculations to work (I get error messages like ".Call function name not in DLL for package Matrix" or "Lapack routine dpotrf returned error code 4"). I have also tried using symmetric matrix commands, but to no avail. Can anyone help me out? many thanks Matt Nunes ------------------------ Matt Nunes School of Mathematics, University of Bristol, University Walk, Bristol. BS8 1TW. UK. office tel. 0117 3311662...
2010 Oct 22
2
Linking to lapack
...mmetric matrix. For this, I wish to use lapack, as is concisely suggested in "Writing R extensions", since this will have better performance than I could ever write myself. After some twiddling I have got my code to compile by including "R_ext/Lapack.h" and using "F77_CALL(dpotrf)", but unfortunately, I don't get this to link properly. I get this message: " testc.o:testc.c:(.text+0x255): undefined reference to `dpotrf_'" which seems logical to me as far as my understanding of C reaches, but I don't know how to resolve it. I'm quite sure I need...
2023 Oct 24
1
About FlexiBLAS in the R-admin docs
...LAPACK functions from the backend really end up called via flexiblas, and I don't think it could be realistically checked. But I've checked one case manually in Fedora 38 using Linux perf tool. The following code: S <- toeplitz((10:1)/10) repeat { R <- rWishart(10, 20, S) } uses dpotrf from LAPACK, which is optimized in OpenBLAS and ATLAS and the corresponding optimized implementations really appeared on the sampling profile for me from the backend libraries. The comment from R Admin has been removed now and if anyone runs into the problem (that an optimized LAPACK function i...
2010 Jan 18
1
A question about build R-2.10.0 on HP-UX ia64 server.
...uot;dgemm" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dgemv" in file CHOLMOD.a[cholmod_l_super_solve.o] ld: Unsatisfied symbol "main" in file <no file> ld: Unsatisfied symbol "alloca" in file CHMfactor.o ld: Unsatisfied symbol "dpotrf" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "zpotrf" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dsyrk" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dtrsm" in file CHOLMOD.a[cholmod_l_super_...
2004 Aug 03
0
(no subject)
...ince the generic solve said the matrix is singular). I recently updated my versions of R to 1.9.1 and also Matrix package, but I can't seem to get any similar equivalent to work (I get error messages like ".Call function name not in DLL for package Matrix" or "Lapack routine dpotrf returned error code 4"). Can anyone help me out? many thanks Matt Nunes
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 time-to-time in the upper (or lower depending on the s...
2010 Jan 18
0
Build R-2.10.0 on HP-UX ia64 server
...uot;dgemm" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dgemv" in file CHOLMOD.a[cholmod_l_super_solve.o] ld: Unsatisfied symbol "main" in file <no file> ld: Unsatisfied symbol "alloca" in file CHMfactor.o ld: Unsatisfied symbol "dpotrf" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "zpotrf" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dsyrk" in file CHOLMOD.a[cholmod_l_super_numeric.o] ld: Unsatisfied symbol "dtrsm" in file CHOLMOD.a[cholmod_l_super_...
2009 Sep 04
1
calling Lapack and BLAS routines from C
...-L/usr/local/lib -o testmore.so testmore.o However, I get the following error in R: > dyn.load("testmore.so") Error in dyn.load("testmore.so") : unable to load shared library '/home/mhitczen/Cstuff/testmore.so': /home/mhitczen/Cstuff/testmore.so: undefined symbol: dpotrf_ This error goes away and everything works when I simply call the BLAS routine (In the testmore.c file I simply remove funct2, leaving funct which calls the routine "dgemm" found in the BLAS.h file). I read the "Writing R Extensions" and created a file: /R-2.9.0/src/Makevars t...
2002 Mar 05
1
Matrix identification bug (PR#1361)
...tz(.5^seq(0,999)))) [1] 30.29 0.21 30.59 NA NA This was the first time that windows R outperformed linux R even PIII Xeon 1GHz is slightly faster than PIII 1.125GHz. Notice the abnormal result 9.4s from PIII-M 1.2GHz (cannot be three times faster). After using native fortran lapack (call to dpotrf and dpotri returns 9s for PIII Xeon), I realized that R may treat the matrix as a general matrix rather than symmetric except the abnormal case. To confirm this, I modified the R_LapackPP.cc in Matrix package and it turned out that is.MMatrix() failed to return true. Hence if (checkCl...
2004 Feb 28
2
matrix inverse in C
Hi, I'm writing an R package using the C code i've written. I'm wondering if anyone knows an easy way to calculate an inverse and cholesky factor of a matrix using the Fortran/C library of R: and how to call them from C. My code is based on the Numerical Reciepe code, and I'm trying to use something that is already in R. Thanks for your help in advance, Kosuke
2013 Aug 27
1
Error in simulation. NAN
...**************************** // // STARTING MCMC // *****************************************/ // MATRICE DI COVARIANZA covexp(rho_acc_P[0], C_P, H_P, nn_j); F77_NAME(dscal)(&nn_j, &sigma2_acc_P[0], C_P, &incOne); //invert C and log det cov F77_NAME(dpotrf)(upper, &n_j, C_P, &n_j, &info); if(info != 0) { error("c++ error: Cholesky failed in sp.lm (N1)\n"); } // adesso C contiene la parte superiore dellafattorizzazione di cholesky logdet = 0.0; for(i = 0; i < n_j; i++) logdet += 2*log(C_P[i*...
2023 Oct 11
2
About FlexiBLAS in the R-admin docs
I agree that the "R Installation and Administration" guide statement about FlexiBLAS needs an update. Standard R in CentOS Stream 9, which is now downstream from Fedora, gives the following result for Matrix products in sessionInfo(): > sessionInfo() R version 4.3.1 (2023-06-16) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Stream 9 Matrix products: default
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
r-devel list, I have recently written an R package that solves a linear least squares problem, and computes the multivariate normal density function. The bulk of the code is written in C, with interfacing code to the BLAS and Lapack libraries. The motivation here is speed. I ran into a problem computing the determinant of a symmetric matrix in packed storage. Apparently, there are no explicit