-
Notifications
You must be signed in to change notification settings - Fork 1
/
compilation_notes.txt
52 lines (40 loc) · 2.66 KB
/
compilation_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Original:
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c commons.cpp -o commons.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c sample_gibbs.cpp -o sample_gibbs.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c sample_gibbs.cpp -o sample_gibbs.o
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppArmadillo/include"
-I"/home/alumbreras/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -g -c sample_gibbs.cpp -o sample_gibbs.o
Instruccion final, es aqui!!
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions
-Wl,-z,relro -o MMLENMF.so RcppExports.o commons.o likelihood_closeform.o sample_gibbs.o
sample_gibbs_z.o sample_hmc.o sample_mala.o sample_metropolis.o sample_nuts_optim.o variational.o
-lsuperlu -L/usr/lib/R/lib -lR
... -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
Referencias:
http://gallery.rcpp.org/articles/armadillo-with-superlu/
https://stackoverflow.com/questions/45009964/speed-up-rcpparmadillo-how-to-link-to-openblas-in-an-r-package (see Dirk comments)