Git Product home page Git Product logo

dynamichazard's People

Contributors

boennecd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dynamichazard's Issues

Compilation failed error

Hello

I get "make: *** [PF/dists.o] Error 1" error while trying to install the library

System info


$ uname -a
Linux apsrp07947 3.10.0-1160.2.1.el7.x86_64 #1 SMP Mon Sep 21 21:00:09 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux


$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0    remotes_2.4.0 

Steps:

1- I installed Rcpp and RcppArmadillo

2- Try to install the library by both install.packages("dynamichazard") and remotes::install_github("boennecd/dynamichazard").

Error log (I used MYDIR to mask the full address):


> install.packages("dynamichazard")
Installing package into ‘<MYDIR>/app/R_Library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/dynamichazard_0.6.8.tar.gz'
Content type 'application/x-gzip' length 4447834 bytes (4.2 MB)
==================================================
downloaded 4.2 MB

* installing *source* package ‘dynamichazard’ ...
** package ‘dynamichazard’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/PF_score_n_Hess.cpp -o PF/PF_score_n_Hess.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/PFs.cpp -o PF/PFs.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/covarmat.cpp -o PF/covarmat.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/resamplers.cpp -o PF/resamplers.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/densities.cpp -o PF/densities.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/cond_approx.cpp -o PF/cond_approx.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c PF/dists.cpp -o PF/dists.o
PF/dists.cpp:219:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
 #pragma omp declare reduction(armaVP: arma::vec: omp_out += omp_in)
 ^
PF/dists.cpp:220:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
 #pragma omp declare reduction(armaMP: arma::mat: omp_out += omp_in)
 ^
PF/dists.cpp: In member function ‘arma::vec observational_cdist<T>::gradient(const vec&) const’:
PF/dists.cpp:292:13: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘armaVP’
   reduction(armaVP:result) firstprivate(first_it)
             ^
PF/dists.cpp: In member function ‘arma::mat observational_cdist<T>::neg_Hessian(const vec&) const’:
PF/dists.cpp:330:53: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘armaMP’
 #pragma omp parallel for schedule(static) reduction(armaMP:result) \
                                                     ^
make: *** [PF/dists.o] Error 1
ERROR: compilation failed for package ‘dynamichazard’
* removing ‘<MYDIR>/app/R_Library/dynamichazard’
Warning in install.packages :
  installation of package ‘dynamichazard’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/Rtmps7OTdz/downloaded_packages’

Appreciate any words of wisdom that might help to tackle this.

Does the package have any binary version to avoid compilation?

dangerous use of internal armadillo functionality

arma::arma_ostream::print_elem(os, to_print.at(row,col), true);

The function arma::arma_ostream::print_elem() is an internal Armadillo function subject to change and/or removal without notice. Extract from Armadillo documentation on the dangers of using internal functions:

Caveat: any function, class, constant or other code not explicitly described in the public API documentation is considered as part of the underlying internal implementation details, and may change or be removed without notice. (In other words, don't use internal functionality).

CC: @eddelbuettel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.