Skip to content

Commit

Permalink
fix lto issue
Browse files Browse the repository at this point in the history
prepare for submission
  • Loading branch information
boennecd committed Jan 3, 2020
1 parent f2e8696 commit 09be724
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 29 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pargm 0.1.4
* `stop`s when there are more variables than observations. Previously, this
caused a crash.
* handle Fortran string length argument.

# pargm 0.1.3
* Fix bug found with Valgrind.
Expand Down
4 changes: 1 addition & 3 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
make a function which can take a function input which yields the input for
each chunk to allow for larger data sets that do not fit in memory
make a method like `speedglm` which computes the cross product of the weighted
design matrix which is faster but less stable
the Armadillo `rows` may be slow when the copy is made?
the Armadillo `rows` may be slow when the copy is made?
there may be an overhead with the current abstract family class
fix issue with order in `summary.glm`
34 changes: 13 additions & 21 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
## Test environments
* Ubuntu 18.04 LTS
R version 3.5.3
* Ubuntu 14.04.5 LTS (on travis-ci with codename: trusty)
R version 3.5.2
* win-builder (devel and release)
* Local Ubuntu 18.04 with R 3.5.2 and with clang 6.0.0 with ASAN and
* Ubuntu 18.04 LTS with gcc 8.3.0
R version 3.6.1
* Ubuntu 16.04 LTS (on travis-ci)
R version 3.6.1
* Ubuntu 18.04 LTS with gcc 8.3.0 with --enable-lto
R devel (2019-11-06 r77376)
* Ubuntu 18.04 LTS with clang 6.0.0 with ASAN and
UBSAN checks
* The following rhub platforms:
fedora-clang-devel
fedora-gcc-devel
debian-gcc-patched
debian-gcc-devel
debian-gcc-release
linux-x86_64-rocker-gcc-san
solaris-x86-patched

R devel (2019-11-06 r77376)
* win-builder (devel and release)
* `rhub::check_on_solaris()`

## R CMD check results
There were no ERRORs, or WARNINGs. There is a NOTE on `fedora-gcc-devel`
on rhub, my local machine, and `debian-gcc-release` on rhub about the size
of the package.

## Resubmission
`R CMD check --use-valgrind --as-cran` passes without any errors.
The LTO issue have been solved. There is a note about the size of the
package on some platforms.
1 change: 1 addition & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PKG_CPPFLAGS = -DUSE_FC_LEN_T
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
22 changes: 17 additions & 5 deletions src/R_BLAS_LAPACK.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#include <Rcpp.h>
#include <Rconfig.h>
#include <R_ext/BLAS.h>
#ifndef FCLEN
#define FCLEN
#endif
#ifndef FCONE
#define FCONE
#endif
#include <R_ext/Lapack.h>

#include <Rcpp.h>

#include <R_ext/Applic.h>
#include "R_BLAS_LAPACK.h"

Expand All @@ -27,7 +36,7 @@ namespace R_BLAS_LAPACK {
&n, &nrhs,
A, &n,
B, &n,
&info);
&info FCONE FCONE FCONE);

if(info != 0){
std::stringstream str;
Expand All @@ -42,7 +51,8 @@ namespace R_BLAS_LAPACK {
const double* tau, double* c, const int* ldc,
double* work, const int* lwork, int* info){
F77_CALL(dormqr)(
side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info);
side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info
FCONE FCONE);
}

void dgeqp3(const int* m, const int* n, double* a, const int* lda,
Expand All @@ -65,13 +75,15 @@ namespace R_BLAS_LAPACK {
const double *alpha, const double *a, const int *lda,
const double *x, const int *incx, const double *beta,
double *y, const int *incy){
F77_CALL(dgemv)(trans, m, n, alpha, a, lda, x, incx, beta, y, incy);
F77_CALL(dgemv)(trans, m, n, alpha, a, lda, x, incx, beta, y, incy
FCONE);
}

void dsyrk(const char *uplo, const char *trans,
const int *n, const int *k,
const double *alpha, const double *a, const int *lda,
const double *beta, double *c, const int *ldc){
F77_CALL(dsyrk)(uplo, trans, n, k, alpha, a, lda, beta, c, ldc);
F77_CALL(dsyrk)(uplo, trans, n, k, alpha, a, lda, beta, c, ldc
FCONE FCONE);
}
}

0 comments on commit 09be724

Please sign in to comment.