search for: nrx

Displaying 20 results from an estimated 20 matches for "nrx".

Did you mean: nr
2005 Oct 12
1
Using matprod from array.c
...matprod function from array.c in my own C routine. I tried the following as a test /* my_matprod.c */ # include <Rinternals.h> /* for REAL, SEXP etc */ # include <R_ext/Applic.h> /* array.c says need for dgemm */ /* following copied from array.c */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; int i, j, k; double one = 1.0, zero = 0.0, sum; Rboolean have_na = FALSE; if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) { /* Do...
2006 Mar 09
0
When calling external C-function repeatedly I get different results; can't figure out why..
...Inspired by the R-source code, I've created the following functions (I am *new* to writing external C-functions, so feel free to laugh at my code - or, perhaps, suggest changes): #include <Rinternals.h> #include <R_ext/Applic.h> /* for dgemm */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; double one = 1.0, zero = 0.0; F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, x, &nrx, y, &nry, &zero, z, &nrx); } SEXP trProd2...
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
...;ve created the following > functions (I am *new* to writing external C-functions, so > feel free to laugh at my code - or, perhaps, suggest changes): > > #include <Rinternals.h> > #include <R_ext/Applic.h> /* for dgemm */ > > static void matprod(double *x, int nrx, int ncx, > double *y, int nry, int ncy, double *z) { > char *transa = "N", *transb = "N"; > double one = 1.0, zero = 0.0; > F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one, > x, &nrx, y, &nry, &zero, z, &...
2006 Aug 03
1
question about dll crashing R
...y correct answer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call .Call("foobar"....) seperately more than two tims it crashes R. For the most part I am doing matirx multiplies using EXP matrixprod (SEXP x , SEXP y ) { int nrx , ncx , nry , ncy , mode; SEXP xdims , ydims , ans ; char *transa = "N" , *transb = "N" ; double one = 1.0 , zero = 0.0 ; xdims = getAttrib (x , R_DimSymbol ) ; ydims = getAttrib (y , R_DimSymbol ) ; mode = REALSXP; nrx = INTEGER( xdims ) [ 0 ] ; ncx = INTEGER( xdims ) [ 1 ] ; n...
2010 Aug 23
1
Speeding up matrix multiplies
...4 (Ubuntu 4.2.4-1ubuntu4) I didn't change any R configuration options regarding compilation. Below is my modified version of the matprod function in src/main/array.c. Radford Neal ------------------------------------------------------------------------ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z) { char *transa = "N", *transb = "N"; int i, j, k; double one = 1.0, zero = 0.0; LDOUBLE sum; Rboolean do_it_here; /* NOTE: ncx must be equal to nry. */ if (nrx==1 && ncy==1) {...
2010 Aug 23
1
Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)
...39;t change any R configuration options regarding compilation. > > Below is my modified version of the matprod function in src/main/array.c. > > ? Radford Neal > > ------------------------------------------------------------------------ > > static void matprod(double *x, int nrx, int ncx, > ? ? ? ? ? ? ? ? ? ?double *y, int nry, int ncy, double *z) > { > ? ?char *transa = "N", *transb = "N"; > ? ?int i, ?j, k; > ? ?double one = 1.0, zero = 0.0; > ? ?LDOUBLE sum; > ? ?Rboolean do_it_here; > > ? ?/* NOTE: ncx must be equal to nr...
2019 Apr 05
2
patch to improve matrix conformability error message
...do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho) if (PRIMVAL(op) == 0) { /* primitive, so use call */ if (ncx != nry) - errorcall(call, _("non-conformable arguments")); + errorcall(call, _("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), + nrx, ncx, nry, ncy); } else if (PRIMVAL(op) == 1) { if (nrx != nry) - error(_("non-conformable arguments")); + error(_("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), + nrx, ncx, nry, ncy); } else { if (ncx != ncy) - error(_("...
2017 Oct 09
1
Using response variable in interaction as explanatory variable in glm crashes R
...i)+adj); then in firstfactor(), we see the segfault (when running R with '-d gdb') : > model.matrix(dob_mon ~ dob_day*dob_mon, data = tab) Program received signal SIGSEGV, Segmentation fault. 0x00007fffeafa76b5 in firstfactor (ncx=0, v=0x5c3b37c, ncc=1, nrc=2, c=0x5c90008, nrx=8, x=0x5cbf150) at ../../../../../R/src/library/stats/src/model.c:252 252 else xj[i] = cj[v[i]-1]; Missing separate debuginfos, ................. (gdb) list 247 for (int j = 0; j < ncc; j++) { 248 xj = &x[j * (R_xlen_t)nrx]; 249 cj = &c[j * (R_xlen_t)nr...
2019 Apr 30
0
patch to improve matrix conformability error message
...EXP op, SEXP args, SEXP rho) > if (PRIMVAL(op) == 0) { > /* primitive, so use call */ > if (ncx != nry) >- errorcall(call, _("non-conformable arguments")); >+ errorcall(call, _("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), >+ nrx, ncx, nry, ncy); > } > else if (PRIMVAL(op) == 1) { > if (nrx != nry) >- error(_("non-conformable arguments")); >+ error(_("non-conformable arguments of dimension (%d, %d) and (%d, %d)"), >+ nrx, ncx, nry, ncy); > } > else { >...
2017 Oct 06
2
Using response variable in interaction as explanatory variable in glm crashes R
The following code crashes R (I know I shouldn't try to estimate such a model; this was a bug in some code of mine). I also tried with R-devel; same result. tab <- structure(list(dob_day = c(FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE), dob_mon = c(FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE), dob_year = c(FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE), n =
2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so? Best S??ren
2017 Jan 07
2
accelerating matrix multiply
...time 58.351572s ??? user?? system? elapsed 2710.154?? 20.999?? 58.398 The NaN checking code is not being vectorized because of the early exit when NaN is detected: /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 * The test is only O(n) here. */ for (R_xlen_t i = 0; i < NRX*ncx; i++) if (ISNAN(x[i])) {have_na = TRUE; break;} if (!have_na) for (R_xlen_t i = 0; i < NRY*ncy; i++) if (ISNAN(y[i])) {have_na = TRUE; break;} I tried deleting the 'break'. By inspecting the asm code, I verified that the loop was not being vectorized before, but now is...
2019 Sep 12
0
Fw: Calling a LAPACK subroutine from R
...E_FC_LEN_T >>> ????? #include <Rconfig.h> >>> ????? #include <R_ext/BLAS.h> >>> ????? #ifndef FCONE >>> ????? # define FCONE >>> ????? #endif >>> ????? ... >>> ????????????? F77_CALL(dgemm)("N", "T", &nrx, &ncy, &ncx, &one, x, >>> ????????????????????????????? &nrx, y, &nry, &zero, z, &nrx FCONE >>> FCONE); >>> (Note there is no comma before or between the 'FCONE' invocations.)? It >>> is strongly recommended that packages whic...
2017 Jan 11
2
accelerating matrix multiply
...gt; 2710.154 20.999 58.398 > > The NaN checking code is not being vectorized because of the early > exit when NaN is detected: > > /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 > * The test is only O(n) here. > */ > for (R_xlen_t i = 0; i < NRX*ncx; i++) > if (ISNAN(x[i])) {have_na = TRUE; break;} > if (!have_na) > for (R_xlen_t i = 0; i < NRY*ncy; i++) > if (ISNAN(y[i])) {have_na = TRUE; break;} > > I tried deleting the 'break'. By inspecting the asm code, I verified > that the loop was not...
2017 Jan 10
0
accelerating matrix multiply
...> 2710.154 20.999 58.398 > > The NaN checking code is not being vectorized because of the > early exit when NaN is detected: > > /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 > * The test is only O(n) here. > */ > for (R_xlen_t i = 0; i < NRX*ncx; i++) > if (ISNAN(x[i])) {have_na = TRUE; break;} > if (!have_na) > for (R_xlen_t i = 0; i < NRY*ncy; i++) > if (ISNAN(y[i])) {have_na = TRUE; break;} > > I tried deleting the 'break'. By inspecting the asm code, I > verified that the loop was not b...
2009 Jun 20
1
Fw: RE:Nagios under *[solved]
Hi Steve Thanks for all your help, i followed your answers and found on that nagios was being run as user nagios....and if i executed the last command it asked for a password [i tried nagios password,root password etc] but it did not work..it the end i opened nagios.cfg and changed the NAGIOS_USER to root and changed the ownership permissons on the script also to root..I now get the correct
2017 Jan 16
1
accelerating matrix multiply
...>> >> The NaN checking code is not being vectorized because of the early >> exit when NaN is detected: >> >> /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 >> * The test is only O(n) here. >> */ >> for (R_xlen_t i = 0; i < NRX*ncx; i++) >> if (ISNAN(x[i])) {have_na = TRUE; break;} >> if (!have_na) >> for (R_xlen_t i = 0; i < NRY*ncy; i++) >> if (ISNAN(y[i])) {have_na = TRUE; break;} >> >> I tried deleting the 'break'. By inspecting the asm code, I verified >...
2017 Jan 16
0
accelerating matrix multiply
...8 >> >> The NaN checking code is not being vectorized because of the early >> exit when NaN is detected: >> >> /* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582 >> * The test is only O(n) here. >> */ >> for (R_xlen_t i = 0; i < NRX*ncx; i++) >> if (ISNAN(x[i])) {have_na = TRUE; break;} >> if (!have_na) >> for (R_xlen_t i = 0; i < NRY*ncy; i++) >> if (ISNAN(y[i])) {have_na = TRUE; break;} >> >> I tried deleting the 'break'. By inspecting the asm code, I verified >&...
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Sorry for cross-posting, but I realized my question might be more appropriate for r-devel... Thank you, Giovanni ________________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of Giovanni Petris <gpetris at uark.edu> Sent: Tuesday, September 10, 2019 16:44 To: r-help at r-project.org Subject: [R] Calling a LAPACK subroutine from R Hello R-helpers!
2006 Aug 05
0
using probleme
Hello I use Centos 4.3 and samba installed directly by the OS. Ver :3.0101462 I have Xp pro sp2. On the windows I see the linux folder but as I try to open it it ask for a password. On samba I didn't provide any password. I tried the user and passwd used on my xp session but didn't work. On the great book http://us2.samba.org/samba/docs/using_samba/ they say to set up a samba user.