Skip to content

Commit

Permalink
fix issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
boennecd authored and Benjamin committed Mar 3, 2021
1 parent 7648ee1 commit 0e96c54
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mdgc
Type: Package
Title: Missing Data Imputation Using Gaussian Copulas
Version: 0.1.2
Version: 0.1.3
Authors@R: c(
person("Benjamin", "Christoffersen",
email = "[email protected]",
Expand Down
10 changes: 3 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
R devel 2021-02-05 r79941 with ASAN and UBSAN
* Github actions on windows-latest (release), macOS-latest (release),
ubuntu-20.04 (release), and ubuntu-20.04 (devel)
* win-builder (devel and release)
* win-builder (devel, oldrelease, and release)
* `rhub::check_for_cran()`
* `rhub::check(platform = c("fedora-clang-devel", "solaris-x86-patched", "macos-highsierra-release-cran"))`

Expand All @@ -20,12 +20,8 @@ There were no WARNINGs or ERRORs.

There is a NOTE about the package size in some cases.

For some reason, using `std::current_exception()` with Rcpp does not seem to
work Fedora with clang-11 using libc++. I have made a workaround. Details of the
issue is provided at https://stackoverflow.com/q/66362932/5861244 and
https://github.com/RcppCore/Rcpp/issues/972#issuecomment-785670233.

I have fixed the LTO issue.
I have fixed the error on the older version of Windows which showed up on
2020-02-29. I am still working on the Solaris issue.

The ASAN and UBSAN checks with clang-6.0.0 yields a false positive I think. I
get the following:
Expand Down
2 changes: 1 addition & 1 deletion mdgc.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageBuildArgs: --run-donttest
PackageCheckArgs: --run-donttest --as-cran --no-multiarch --no-stop-on-test-error
2 changes: 2 additions & 0 deletions src/arma-wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define ARMA_NO_DEBUG
#endif

#define ARMA_DONT_PRINT_ERRORS

#include <RcppArmadillo.h>

#endif
5 changes: 3 additions & 2 deletions src/fast-commutation.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#ifndef FAST_COM_H
#define FAST_COM_H
#include "arma-wrap.h"
#include <memory>

inline std::unique_ptr<size_t[]> get_commutation_unequal_vec
(unsigned const n, unsigned const m, bool const transpose){
unsigned const nm = n * m,
nnm_p1 = n * nm + 1L,
nm_pm = nm + m;
nnm_p1 = n * nm + 1L,
nm_pm = nm + m;
std::unique_ptr<size_t[]> out(new size_t[nm]);
size_t * const o_begin = out.get();
size_t idx = 0L;
Expand Down

0 comments on commit 0e96c54

Please sign in to comment.