steve-the-bayesian / BOOM

A C++ library for Bayesian modeling, mainly through Markov chain Monte Carlo, but with a few other methods supported. BOOM = "Bayesian Object Oriented Modeling". It is also the sound your computer makes when it crashes.
GNU Lesser General Public License v2.1
35 stars 14 forks source link

Remove igraph from list of required packages. #44

Closed akrun1 closed 4 years ago

akrun1 commented 4 years ago

root@05b1afcb4beb:/work/boom/BOOM# ./install/create_boom_rpackage -i Copying top level files Copying source files ./install/create_boom_rpackage: ./install/install_headers.py: /usr/local/bin/python3: bad interpreter: No such file or directory Copying R source files copying documentation copying headers cp: cannot create regular file 'rpackage/Boom/src/math/cephes': No such file or directory cp: target 'rpackage/Boom/src/Bmath' is not a directory ./install/create_boom_rpackage: ./install/install_headers.py: /usr/local/bin/python3: bad interpreter: No such file or directory cp: target 'rpackage/Boom/inst/include/Eigen/' is not a directory ./install/create_boom_rpackage: line 121: gsed: command not found ./install/create_boom_rpackage: line 122: gsed: command not found ./install/create_boom_rpackage: line 126: gsed: command not found ./install/create_boom_rpackage: line 127: gsed: command not found ./install/create_boom_rpackage: line 129: gsed: command not found ./install/create_boom_rpackage: line 130: gsed: command not found

./inst/include/r_interface/create_poisson_cluster_components.hpp:22:57: fatal error: Models/PointProcess/PoissonClusterProcess.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_poisson_cluster_components.o' failed make: [create_poisson_cluster_components.o] Error 1 create_mixture_component.cpp:6:36: fatal error: cpputil/report_error.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_mixture_component.o' failed make: [create_mixture_component.o] Error 1 parse_model_formula.cpp:21:50: fatal error: cpputil/make_unique_preserve_order.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'parse_model_formula.o' failed make: [parse_model_formula.o] Error 1 extract_mixture_data.cpp:4:32: fatal error: Models/DataTypes.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'extract_mixture_data.o' failed make: [extract_mixture_data.o] Error 1 create_poisson_process.cpp:20:36: fatal error: cpputil/report_error.hpp: No such file or directory compilation terminated. In file included from list_io.cpp:18:0: ../inst/include/r_interface/list_io.hpp:21:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. In file included from seed_rng_from_R.cpp:19:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_poisson_process.o' failed make: [create_poisson_process.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'list_io.o' failed make: [list_io.o] Error 1 In file included from ../inst/include/r_interface/sufstats.hpp:22:0, from sufstats.cpp:19: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'sufstats.o' failed make: [sufstats.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'seed_rng_from_R.o' failed make: [seed_rng_from_R.o] Error 1 In file included from ../inst/include/r_interface/determine_nthreads.hpp:22:0, from determine_nthreads.cpp:19: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. In file included from boom_r_tools.cpp:22:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'determine_nthreads.o' failed make: [determine_nthreads.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'boom_r_tools.o' failed make: [boom_r_tools.o] Error 1 In file included from prior_specification.cpp:19:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'prior_specification.o' failed make: [prior_specification.o] Error 1 In file included from ../inst/include/r_interface/prior_specification.hpp:22:0, from spike_slab_prior.cpp:1: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'spike_slab_prior.o' failed make: [spike_slab_prior.o] Error 1 ERROR: compilation failed for package ‘Boom’

I cloned the repo, and build using bazel in linux. Direct installation in R is also resulting in error

steve-the-bayesian commented 4 years ago

Sorry, this is happening because of errors in the install scripts. Looks like your python3 interpreter is in a different place than mine, and you probably need sed rather than gsed. You might try the 'dev' branch of BOOM, which gets updated much more often than the master branch.

On Sat, Dec 28, 2019 at 8:30 AM aksa111 notifications@github.com wrote:

root@05b1afcb4beb:/work/boom/BOOM# ./install/create_boom_rpackage -i Copying top level files Copying source files ./install/create_boom_rpackage: ./install/install_headers.py: /usr/local/bin/python3: bad interpreter: No such file or directory Copying R source files copying documentation copying headers cp: cannot create regular file 'rpackage/Boom/src/math/cephes': No such file or directory cp: target 'rpackage/Boom/src/Bmath' is not a directory ./install/create_boom_rpackage: ./install/install_headers.py: /usr/local/bin/python3: bad interpreter: No such file or directory cp: target 'rpackage/Boom/inst/include/Eigen/' is not a directory ./install/create_boom_rpackage: line 121: gsed: command not found ./install/create_boom_rpackage: line 122: gsed: command not found ./install/create_boom_rpackage: line 126: gsed: command not found ./install/create_boom_rpackage: line 127: gsed: command not found ./install/create_boom_rpackage: line 129: gsed: command not found ./install/create_boom_rpackage: line 130: gsed: command not found

-

checking for file ‘Boom/DESCRIPTION’ ... OK

preparing ‘Boom’:

checking DESCRIPTION meta-information ... OK

cleaning src

checking for LF line-endings in source and make files and shell scripts

checking for empty or unneeded directories

building ‘Boom_0.9.2.tar.gz’

installing to library ‘/usr/local/lib/R/site-library’

installing source package ‘Boom’ ... ** using staged installation .....

./inst/include/r_interface/create_poisson_cluster_components.hpp:22:57: fatal error: Models/PointProcess/PoissonClusterProcess.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_poisson_cluster_components.o' failed make: [create_poisson_cluster_components.o] Error 1 create_mixture_component.cpp:6:36: fatal error: cpputil/report_error.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_mixture_component.o' failed make: [create_mixture_component.o] Error 1 parse_model_formula.cpp:21:50: fatal error: cpputil/make_unique_preserve_order.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'parse_model_formula.o' failed make: [parse_model_formula.o] Error 1 extract_mixture_data.cpp:4:32: fatal error: Models/DataTypes.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'extract_mixture_data.o' failed make: [extract_mixture_data.o] Error 1 create_poisson_process.cpp:20:36: fatal error: cpputil/report_error.hpp: No such file or directory compilation terminated. In file included from list_io.cpp:18:0: ../inst/include/r_interface/list_io.hpp:21:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. In file included from seed_rng_from_R.cpp:19:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'create_poisson_process.o' failed make: [create_poisson_process.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'list_io.o' failed make: [list_io.o] Error 1 In file included from ../inst/include/r_interface/sufstats.hpp:22:0, from sufstats.cpp:19: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'sufstats.o' failed make: [sufstats.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'seed_rng_from_R.o' failed make: [seed_rng_from_R.o] Error 1 In file included from ../inst/include/r_interface/determine_nthreads.hpp:22:0, from determine_nthreads.cpp:19: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. In file included from boom_r_tools.cpp:22:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'determine_nthreads.o' failed make: [determine_nthreads.o] Error 1 /usr/lib/R/etc/Makeconf:176: recipe for target 'boom_r_tools.o' failed make: [boom_r_tools.o] Error 1 In file included from prior_specification.cpp:19:0: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'prior_specification.o' failed make: [prior_specification.o] Error 1 In file included from ../inst/include/r_interface/prior_specification.hpp:22:0, from spike_slab_prior.cpp:1: ../inst/include/r_interface/boom_r_tools.hpp:24:29: fatal error: LinAlg/Vector.hpp: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:176: recipe for target 'spike_slab_prior.o' failed make: [spike_slab_prior.o] Error 1 ERROR: compilation failed for package ‘Boom’

  • removing ‘/usr/local/lib/R/site-library/Boom’

I cloned the repo, and build using bazel in linux.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVNXTKFBJ2ZPZATZ4UDQ255LVA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDBCMJQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVOKVRV3PJJEZMZHBL3Q255LVANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian Thank you for the reply. I tried on a local docker container and in ubuntu server. I could install the package from the PPA (https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5), but in server, it is not allowed due to security settings and this is the reason I am creating a local_repo. Is there any preferred way for installing BOOM

steve-the-bayesian commented 4 years ago

It is mostly used to support an r package, in which case installing from cran should work.

On Sat, Dec 28, 2019, 11:37 AM aksa111 notifications@github.com wrote:

@steve-the-bayesian https://github.com/steve-the-bayesian I tried on a local docker container and in ubuntu server. I could install the package from the PPA (https://launchpad.net/~marutter/+archive/ubuntu/c2d4u3.5), but in server, it is not allowed due to security settings and this is the reason I am creating a local_repo. Is there any preferred way for installing BOOM

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVIRHLEUV4YPRGAK2FTQ26THXA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYQYEQ#issuecomment-569445394, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVK6VKDTVN5RGGYRQBLQ26THXANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian That was the first thing I tried. The R package I am trying to install is bsts and it is failing at the Boom package. With dev branch, it got stucked at

`LinAlg/Matrix.cpp:668:65: required from here ../inst/include/Eigen/src/Core/DenseCoeffsBase.h:650:34: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type {aka __vector(2) double}’ [-Wignored-attributes] return internal::first_aligned<int(unpacket_traits::alignment),Derived>(m); ^~~~~~~~~~~~~~ ERROR: compilation failed for package ‘Boom’

steve-the-bayesian commented 4 years ago

Got it. Installing BOOM using bazel won't get you the R package. Just the C++ library. The errors you sent were from the install scripts that I use to create the R package. Can you send the errors you get when you try installing from the package itself?

On Sat, Dec 28, 2019 at 1:07 PM aksa111 notifications@github.com wrote:

@steve-the-bayesian https://github.com/steve-the-bayesian That was the first thing I tried. The R package I am trying to install is bsts and it is failing at the Boom package

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVMIQX2WFFNRHCS2SU3Q265YHA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYSFIQ#issuecomment-569451170, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVLVP4DYXUJCOQW5HVTQ265YHANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian Similar to the one mentioned in https://phabricator.wikimedia.org/T147682 g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I../inst/include -IBmath -Imath/cephes -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DRLANGUAGE -I"/home/otto/R/x86_64-pc-linux-gnu-library/3.2/BH/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Models/Bart/Bart.cpp -o Models/Bart/Bart.o. To correct this, I added the ~/.R/Makevars by checking https://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux. None of them helped in resolving the issue. I tested this in docker container as well as in server ubuntu

steve-the-bayesian commented 4 years ago

That's a compiler command. I need to see the error it generates. Try downloading the Boom package from cran ( https://cran.r-project.org/src/contrib/Boom_0.9.3.tar.gz) When you get it downloaded, issue the command: MAKEFLAGS="-j 16" R CMD install Boom_0.9.3.tar.gz

R will create a directory called Boom.Rcheck. Please send me 00install.out from that directory.

On Sat, Dec 28, 2019 at 2:29 PM aksa111 notifications@github.com wrote:

@steve-the-bayesian https://github.com/steve-the-bayesian Similar to the one mentioned in https://phabricator.wikimedia.org/T147682 g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I../inst/include -IBmath -Imath/cephes -DNO_BOOST_THREADS -DNO_BOOSTFILESYSTEM -DADD -DRLANGUAGE -I"/home/otto/R/x86_64-pc-linux-gnu-library/3.2/BH/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Models/Bart/Bart.cpp -o Models/Bart/Bart.o. To correct this, I added the ~/.R/Makevars by checking https://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux. None of them helped in resolving the issue

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVPMD7EIPGY5EYSA5RTQ27HOJA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYTK6Y#issuecomment-569455995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVNATOH5QGWRZ3J7H4DQ27HOJANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian I tried that, but it didn't create that directory

`inAlg/Matrix.cpp:668:65: required from here ../inst/include/Eigen/src/Core/DenseCoeffsBase.h:650:34: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type {aka __vector(2) double}’ [-Wignored-attributes] return internal::first_aligned<int(unpacket_traits::alignment),Derived>(m); ^~~~~~~~~~~~~~ ERROR: compilation failed for package ‘Boom’

In the server, I was able to install Boom with that tar file, but the BoomSpikeSlab failed because igraph is failing and igraph installation shows

`/bin/bash: 77: command not found /usr/lib/R/etc/Makeconf:190: recipe for target 'AMD/Source/amd.o' failed make: *** [AMD/Source/amd.o] Error 127 ERROR: compilation failed for package ‘igraph’

The downloaded source packages are in ‘/tmp/RtmpixrcUH/downloaded_packages’ Warning message: In install.packages("igraph", repos = CRAN_mirror) : installation of package ‘igraph’ had non-zero exit status`

My objective is to install bsts.

steve-the-bayesian commented 4 years ago

Try R CMD CHECK then.

On Sat, Dec 28, 2019, 5:49 PM aksa111 notifications@github.com wrote:

@steve-the-bayesian https://github.com/steve-the-bayesian I tried that, but it didn't create that directory

`inAlg/Matrix.cpp:668:65: required from here ../inst/include/Eigen/src/Core/DenseCoeffsBase.h:650:34: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type {aka __vector(2) double}’ [-Wignored-attributes] return internal::first_aligned<int(unpacket_traits::alignment),Derived>(m); ^~~~~~~~~~~~~~ ERROR: compilation failed for package ‘Boom’

  • removing ‘/usr/local/lib/R/site-library/Boom’ root@14a356aa1074:/work# cd /usr/local/lib/R/site-library/Boom bash: cd: /usr/local/lib/R/site-library/Boom: No such file or directory root@14a356aa1074:/work# cd /usr/local/lib/R/site-library root@14a356aa1074:/usr/local/lib/R/site-library# ls docopt root@14a356aa1074:/usr/local/lib/R/site-library# cd docopt root@14a356aa1074:/usr/local/lib/R/site-library/docopt# ls DESCRIPTION help html INDEX LICENSE Meta NAMESPACE NEWS paper R spec root@14a356aa1074:/usr/local/lib/R/site-library/docopt# cd R root@14a356aa1074:/usr/local/lib/R/site-library/docopt/R# ls docopt docopt.rdb docopt.rdx `

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVMD2ECXDUEJ4IEPFHDQ2764NA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYV3DY#issuecomment-569466255, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVPMGEDJ6PERMCMOPWTQ2764NANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian With igraph, I get the 00check.log

` checking for file ‘igraph/DESCRIPTION’ ... OK

Another issue is that graph is no longer available in CRAN and server is not allowing to install from bioconductor https://www.bioconductor.org/packages/release/bioc/html/graph.html

steve-the-bayesian commented 4 years ago

from https://cran.r-project.org/web/packages/igraph/index.html it seems that "graph" is a suggested package for igraph. igraph should still install without it. The only required package is 'methods.' If install.packages does not let you install igraph, you could download the source and install it manually.

igraph is not a particularly important package for bsts. If it is causing problems I will try to remove that dependency for the next release.

On Sat, Dec 28, 2019 at 6:19 PM aksa111 notifications@github.com wrote:

@steve-the-bayesian https://github.com/steve-the-bayesian With igraph, I get the 00check.log

` checking for file ‘igraph/DESCRIPTION’ ... OK

  • this is package ‘igraph’ version ‘1.2.4.2’
  • package encoding: UTF-8
  • checking package namespace information ... OK
  • checking package dependencies ... ERROR Packages suggested but not available: 'graph', 'rgl'`

Another issue is that graph is no longer available in CRAN and server is not allowing to install from bioconductor https://www.bioconductor.org/packages/release/bioc/html/graph.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/steve-the-bayesian/BOOM/issues/44?email_source=notifications&email_token=ABMVDVI6HP3U3A4GHRFNFQLQ3ACLPA5CNFSM4KAPB422YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYWFEI#issuecomment-569467537, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVJU2CQA5YARPZK5EWTQ3ACLPANCNFSM4KAPB42Q .

akrun1 commented 4 years ago

@steve-the-bayesian Thank you. It would be better to have an easier and common framework for R installation of packages.

steve-the-bayesian commented 4 years ago

closed pending release