Closed wfmackey closed 4 years ago
OK backwards compat is more difficult than I thought. Please run:
devtools::install_github("hughparsonage/hutilscpp", ref = "omp040")
Will obviously need to properly test later.
😭
> devtools::install_github("hughparsonage/hutilscpp", ref = "omp040")
Downloading GitHub repo hughparsonage/hutilscpp@omp040
Skipping 1 packages ahead of CRAN: data.table
✓ checking for file ‘/private/var/folders/g2/728t399s5gbbk6bgj5ndlgy1w8w938/T/Rtmpck1EYg/remotes109aab958f14/HughParsonage-hutilscpp-ec5d4cb/DESCRIPTION’ (361ms)
─ preparing ‘hutilscpp’:
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘hutilscpp_0.4.0.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'
Warning: invalid gid value replaced by that for user 'nobody'
Installing package into ‘/Users/mackeyw/Library/R/4.0/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘hutilscpp’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c AnyCharMatch.cpp -o AnyCharMatch.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c AnyWhich.cpp -o AnyWhich.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c Implies.cpp -o Implies.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c anyOutside.cpp -o anyOutside.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_and3s.cpp -o do_and3s.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_cumsum_reset.cpp -o do_cumsum_reset.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_even.cpp -o do_even.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_logical3s.cpp -o do_logical3s.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_or3s.cpp -o do_or3s.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_range.cpp -o do_range.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_sum_dbl_par.cpp -o do_sum_dbl_par.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_which_first.cpp -o do_which_first.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c do_xor2.cpp -o do_xor2.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c haversineDistance.cpp -o haversineDistance.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c is_safe2int.cpp -o is_safe2int.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c is_sorted.cpp -o is_sorted.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c logical3.cpp -o logical3.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/mackeyw/Library/R/4.0/library/Rcpp/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c omp_diagnose.cpp -o omp_diagnose.o
omp_diagnose.cpp:28:52: error: use of undeclared identifier 'omp_get_num_procs'
if (threads_requested > 0 && threads_requested < omp_get_num_procs()) {
^
omp_diagnose.cpp:37:27: error: use of undeclared identifier 'omp_get_num_procs'
if (threads_requested > omp_get_num_procs()) {
^
2 errors generated.
make: *** [omp_diagnose.o] Error 1
ERROR: compilation failed for package ‘hutilscpp’
* removing ‘/Users/mackeyw/Library/R/4.0/library/hutilscpp’
* restoring previous ‘/Users/mackeyw/Library/R/4.0/library/hutilscpp’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/g2/728t399s5gbbk6bgj5ndlgy1w8w938/T//Rtmpck1EYg/file109aa7e46ffd/hutilscpp_0.4.0.tar.gz’ had non-zero exit status
OK inadequate OMP protection there. Try installing covid19.model.sa2
now.
Still no OpenMP @wfmackey ? That's a pity.
I had it! Update to R 4.0.0
coincided with me not having it / not working.
I seem to remember the CRAN listserv yelling at MacOS for a variety of reasons.
Updated; new error:
library(covid19.model.sa2)
simulate_sa2()
#> Error in fifelse(run): object 'run' not found
Created on 2020-06-02 by the reprex package (v0.3.0)
Fixed
Reinstalling
Working -- thanks
Session info attached
Created on 2020-06-02 by the reprex package (v0.3.0)
Session info
``` r devtools::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.0 (2020-04-24) #> os macOS Catalina 10.15.4 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_AU.UTF-8 #> ctype en_AU.UTF-8 #> tz Australia/Melbourne #> date 2020-06-02 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib #> assertthat 0.2.1 2019-03-21 [2] #> backports 1.1.7 2020-05-13 [1] #> callr 3.4.3 2020-03-28 [2] #> checkmate 2.0.0 2020-02-06 [2] #> cli 2.0.2 2020-02-28 [2] #> covid19.model.sa2 * 0.23.0 2020-06-02 [1] #> crayon 1.3.4 2017-09-16 [2] #> data.table 1.12.9 2020-05-13 [1] #> desc 1.2.0 2018-05-01 [2] #> devtools 2.3.0 2020-04-10 [2] #> digest 0.6.25 2020-02-23 [2] #> dqrng 0.2.1 2019-05-17 [2] #> ellipsis 0.3.0 2019-09-20 [2] #> evaluate 0.14 2019-05-28 [2] #> fansi 0.4.1 2020-01-08 [2] #> fastmatch 1.1-0 2017-01-28 [2] #> fs 1.4.1 2020-04-04 [2] #> fst 0.9.2 2020-04-01 [2] #> glue 1.4.1 2020-05-13 [1] #> highr 0.8 2019-03-20 [2] #> htmltools 0.4.0 2019-10-04 [2] #> hutils 1.5.1 2020-05-13 [1] #> hutilscpp 0.4.0 2020-05-13 [1] #> knitr 1.28 2020-02-06 [2] #> magrittr 1.5 2014-11-22 [2] #> memoise 1.1.0 2017-04-21 [2] #> pkgbuild 1.0.8 2020-05-07 [1] #> pkgload 1.0.2 2018-10-29 [2] #> prettyunits 1.1.1 2020-01-24 [2] #> processx 3.4.2 2020-02-09 [2] #> ps 1.3.3 2020-05-08 [1] #> R6 2.4.1 2019-11-12 [2] #> Rcpp 1.0.4.6 2020-04-09 [1] #> remotes 2.1.1 2020-02-15 [2] #> rlang 0.4.6.9000 2020-05-13 [1] #> rmarkdown 2.1 2020-01-20 [2] #> rprojroot 1.3-2 2018-01-03 [2] #> sessioninfo 1.1.1 2018-11-05 [2] #> stringi 1.4.6 2020-02-17 [2] #> stringr 1.4.0 2019-02-10 [2] #> testthat 2.3.2 2020-03-02 [2] #> usethis 1.6.0 2020-04-09 [2] #> withr 2.2.0 2020-04-20 [2] #> xfun 0.13 2020-04-13 [2] #> yaml 2.2.1 2020-02-01 [2] #> source #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (grattan/covid19.model.sa2@05ae86b) #> CRAN (R 4.0.0) #> local #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (hughparsonage/hutils@3c64ef4) #> Github (hughparsonage/hutilscpp@31b6d97) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> Github (r-lib/rlang@4bea875) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> CRAN (R 4.0.0) #> #> [1] /Users/mackeyw/Library/R/4.0/library #> [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library ```