Skip to content

Commit e8cdb88

Browse files
committed
fix issue with vignettes that are not included
try to solve issue with Solaris on the CRAN checks results.
1 parent a58f91d commit e8cdb88

File tree

6 files changed

+31
-19
lines changed

6 files changed

+31
-19
lines changed

.Rbuildignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
^CRAN-RELEASE$
12
^.*\.Rproj$
23
^\.Rproj\.user$
34
\.log$
@@ -12,14 +13,11 @@ dynamichazard\.dll$
1213
^\.travis\.yml$
1314
release_questions\.R$
1415
cran-comments\.md$
15-
1616
src/pf/est_params_generic.cpp
17-
1817
^README
1918
^README_cache
2019
^examples
21-
22-
^vignettes/[^/]*\.(?!(Rnw|bib|pdf\.asis|pdf|Rmd|csl)).*$
20+
^vignettes/[^\./]*\.(?!(Rnw|bib|pdf\.asis|pdf|Rmd|csl))
2321
vignettes/ddhazard\.pdf
2422
vignettes/fig
2523
vignettes/tex2pdf
@@ -28,7 +26,6 @@ vignettes/Diagnostics/data_prep\.R
2826
vignettes/Diagnostics/Rossi_ex\.html
2927
vignettes/Diagnostics/Rossi_source\.url
3028
vignettes/Diagnostics/Rossi\.txt
31-
3229
^\.sandbox
3330
^speedtest
3431
tests/testthat/previous_results/local_tests

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: dynamichazard
22
Type: Package
33
Title: Dynamic Hazard Models using State Space Models
4-
Version: 0.6.2
4+
Version: 0.6.3
55
Authors@R: c(person("Benjamin", "Christoffersen",
66
email = "boennecd@gmail.com",
77
role = c("cre", "aut")),

cran-comments.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ I still get this error with the UBSAN check: https://github.com/RcppCore/Rcpp/is
2424

2525
Though, it does not seem to trigger on CRAN and Dirk Eddelbuettel and Kevin
2626
Ushey indicate that it may not be a problem.
27+
28+
## Resubmission
29+
This is a resubmission. In this version I have:
30+
31+
* Added vignettes which are currently not included due to an error in
32+
`.Rbuildignore`.
33+
* Tried to fix the error on Solaris in the CRAN check results.

src/BLAS_LAPACK/R_BLAS_LAPACK.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ namespace R_BLAS_LAPACK {
6363
void square_tri_inv(double *out, int n, int ldr){
6464
int info;
6565

66-
F77_CALL(dtrtri)("L", "N", &n, out, &ldr, &info);
66+
char c1 = 'L', c2 = 'N';
67+
F77_CALL(dtrtri)(&c1, &c2, &n, out, &ldr, &info);
6768

6869
if(info != 0){
6970
std::stringstream str;
@@ -75,7 +76,8 @@ namespace R_BLAS_LAPACK {
7576
void symmetric_mat_chol(double *out, int n, int lda){
7677
int info;
7778

78-
F77_CALL(dpotrf)("L", &n, out, &lda, &info);
79+
char c1 = 'L';
80+
F77_CALL(dpotrf)(&c1, &n, out, &lda, &info);
7981

8082
if(info != 0){
8183
std::stringstream str;
@@ -92,7 +94,9 @@ namespace R_BLAS_LAPACK {
9294
// ( 1 + ( n - 1 )*abs( INCX ) ).
9395

9496
int incx = 1;
95-
F77_CALL(dtrmv)("L", is_transpose ? "T" : "N", "N", &n, A, &lda, x, &incx);
97+
char c1 = 'L', c2 = is_transpose ? 'T' : 'N', c3 = 'N';
98+
F77_CALL(dtrmv)(
99+
&c1, &c2, &c3, &n, A, &lda, x, &incx);
96100
}
97101

98102
void sym_mat_rank_one_update(
@@ -104,13 +108,14 @@ namespace R_BLAS_LAPACK {
104108
// See http://www.netlib.org/lapack/explore-html/d7/d15/group__double__blas__level2_ga35ca25bb135cd7bfdd5d6190b1aa4d07.html#ga35ca25bb135cd7bfdd5d6190b1aa4d07
105109

106110
int inx = 1;
111+
char c1 = 'U';
107112

108113
//F77_CALL(dger)(const int *m, const int *n, const double *alpha,
109114
// const double *x, const int *incx,
110115
// const double *y, const int *incy,
111116
// double *a, const int *lda);
112117
F77_CALL(dsyr)(
113-
"U", n, alpha,
118+
&c1, n, alpha,
114119
x, &inx,
115120
A, n);
116121
}
@@ -132,9 +137,10 @@ namespace R_BLAS_LAPACK {
132137

133138
const double dum_d = 1.0;
134139
const int dum_i = 1L;
140+
char c1 = 'U';
135141

136142
F77_CALL(dsymv)(
137-
"U", n,
143+
&c1, n,
138144
&dum_d, A, n,
139145
x, &dum_i, &dum_d,
140146
y, &dum_i);
@@ -160,9 +166,10 @@ namespace R_BLAS_LAPACK {
160166
// Notice that we set UPLO to U so only the upper part is updated
161167

162168
const double dum_d = 1.0;
169+
char c1 = 'U', c2 = 'N';
163170

164171
F77_CALL(dsyrk)(
165-
"U", "N",
172+
&c1, &c2,
166173
n, k, &dum_d,
167174
A, n,
168175
&dum_d, C, n);
@@ -181,12 +188,10 @@ namespace R_BLAS_LAPACK {
181188
*/
182189

183190
int info;
184-
char uplo[2] = { is_upper ? 'U' : 'L' }, tra[2] = { trans ? 'T' : 'N' };
191+
char c1 = is_upper ? 'U' : 'L', c2 = trans ? 'T' : 'N', c3 = 'N';
185192

186193
F77_CALL(dtrtrs)(
187-
uplo,
188-
tra,
189-
"N",
194+
&c1, &c2, &c3,
190195
&n, &nrhs,
191196
A, &n,
192197
B, &n,

src/PF/dmvnrm.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ double dmvnrm_log(
99

1010
// z = sigma_chol_inv.t() * z;
1111
int incx = 1;
12+
char uplo = 'U', trans = 'T', diag = 'N';
1213
R_BLAS_LAPACK::dtrmv(
13-
"U" /* UPLO */, "T" /* TRANS */, "N" /* diag */,
14+
&uplo, &trans, &diag,
1415
&xdim /* N */, sigma_chol_inv.memptr() /* A */,
1516
&xdim /* LDA */, z.memptr() /* X */, &incx /* INCX */);
1617

@@ -36,8 +37,9 @@ double dmvtrm_log(
3637

3738
/* z = sigma_chol_inv.t() * z; */
3839
int incx = 1;
40+
char uplo = 'U', trans = 'T', diag = 'N';
3941
R_BLAS_LAPACK::dtrmv(
40-
"U" /* UPLO */, "T" /* TRANS */, "N" /* diag */,
42+
&uplo, &trans, &diag,
4143
&xdim /* N */, sigma_chol_inv.memptr() /* A */,
4244
&xdim /* LDA */, z.memptr() /* X */, &incx /* INCX */);
4345

src/sample_funcs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ arma::mat mvrnorm(const int m, const arma::mat &sigma_chol){
5959

6060
// Y <-- Y * chol(Sigma)
6161
const double alpha = 1.;
62+
char side = 'R', uplo = 'U', transa = 'N', diag = 'N';
6263
R_BLAS_LAPACK::dtrmm(
63-
"R" /* side */, "U" /* UPLO */, "N" /* TRANSA */, "N" /* DIAG */,
64+
&side, &uplo, &transa, &diag,
6465
&m /* M */, &n /* N */, &alpha /* ALPHA */,
6566
sigma_chol.memptr() /* A */, &n /* LDA */,
6667
Y.memptr() /* B */, &m /* LDB */);

0 commit comments

Comments
 (0)