Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add R21 PEV profiles #333

Merged
merged 15 commits into from
Sep 12, 2024
Merged

Add R21 PEV profiles #333

merged 15 commits into from
Sep 12, 2024

Conversation

lmhaile
Copy link
Contributor

@lmhaile lmhaile commented Sep 9, 2024

Hi everyone,

Just pushing the R21 vaccine profiles to the dev branch, which @NoSchID has checked over. If there are any downstream changes needed also happy to make them.

Thanks!

giovannic and others added 12 commits July 3, 2023 16:42
The recent dqrng 0.4.0 release has a few small incompatible changes that
makes the build fail.

The changes necessary have been applied to the dev branch already as
part of larger pull requests #280 and #305. This commit cherry-picks
just the fixes for the master branch.
Cherry-pick fixes for latest dqrng release.
The workflow runs on-demand by commenting `/benchmark` on any pull
request. It runs a few iterations of both the base branch and the PR and
posts the results back to the pull request as a comment. Additionally,
detailed plots are available as images in the workflow artifacts.
Unfortunately GitHub doesn't have a way for actions to upload images in
comments.

At the moment the workflow runs two benchmarks, one at a 10k population
size and 10k time steps, and second one at 1M population size and 1k
time steps.

The workflow currently takes on the order of 1 hour to run. We can
easily tweak the set of benchmarks in the future if we want to run more
scenarios, or conversly if we want to reduce the total time.

There is no long-term tracking of benchmark results yet. Doing so is
tricky as the performance of the underlying CI is unlikely to be stable
long-term.
It was merged into touchstone upstream.
I'm getting issues with 24.04 where pak installs some system packages
with apt-get, some system services are upgraded and restarted and the CI
runner is canceled. Not sure what the reason is, but 22.04 doesn't have
this problem.
Add GitHub workflow for continuous benchmarking.
Copy link
Member

@giovannic giovannic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! If you could run devtools::document() and then add and commit the updated documentation, then it'll be ready.

@lmhaile
Copy link
Contributor Author

lmhaile commented Sep 10, 2024

Hi Giovanni, when I try to document it errors out-- maybe not worth investigating if anyone else can document and push that version successfully?

Here's my traceback:

> devtools::document()
ℹ Updating malariasimulation documentation
Setting `RoxygenNote` to "7.3.2"
ℹ Loading malariasimulation
Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/Random.h:

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/adult_mosquito_eqs.cpp:
   Rcpp::XPtr<AdultMosquitoModel> create_adult_mosquito_model(Rcpp::XPtr<AquaticMosquitoModel> growth_model, double mu, double tau, double susceptible, double foim)
   void adult_mosquito_model_update(Rcpp::XPtr<AdultMosquitoModel> model, double mu, double foim, double susceptible, double f)
   std::vector<double> adult_mosquito_model_save_state(Rcpp::XPtr<AdultMosquitoModel> model)
   void adult_mosquito_model_restore_state(Rcpp::XPtr<AdultMosquitoModel> model, std::vector<double> state)
   Rcpp::XPtr<Solver> create_adult_solver(Rcpp::XPtr<AdultMosquitoModel> model, std::vector<double> init, double r_tol, double a_tol, size_t max_steps)

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/aquatic_mosquito_eqs.cpp:
   Rcpp::XPtr<AquaticMosquitoModel> create_aquatic_mosquito_model(double beta, double de, double mue, Rcpp::XPtr<Timeseries> k_timeseries, double gamma, double dl, double mul, double dp, double mup, size_t total_M, bool model_seasonality, double g0, std::vector<double> g, std::vector<double> h, double R_bar, double mum, double f, double rainfall_floor)
   void aquatic_mosquito_model_update(Rcpp::XPtr<AquaticMosquitoModel> model, size_t total_M, double f, double mum)
   Rcpp::XPtr<Solver> create_aquatic_solver(Rcpp::XPtr<AquaticMosquitoModel> model, std::vector<double> init, double r_tol, double a_tol, size_t max_steps)

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/mosquito_biology.cpp:
   double carrying_capacity(const size_t timestep, const bool model_seasonality, const double g0, const std::vector<double>& g, const std::vector<double>& h, const double K0, const double R_bar, const double rainfall_floor)
   double eggs_laid(double beta, double mu, double f)
   double rainfall(const size_t t, const double g0, const std::vector<double>& g, const std::vector<double>& h, const double floor)

\\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/processes.cpp:
   Rcpp::XPtr<process_t> exponential_process_cpp(Rcpp::XPtr<DoubleVariable> variable, const double rate)

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/solver.cpp:
   std::vector<double> solver_get_states(Rcpp::XPtr<Solver> solver)
   void solver_set_states(Rcpp::XPtr<Solver> solver, double t, std::vector<double> state)
   void solver_step(Rcpp::XPtr<Solver> solver)

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/solver.h:

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/timeseries.cpp:
   Rcpp::XPtr<Timeseries> create_timeseries(size_t size, double default_value)
   double timeseries_at(Rcpp::XPtr<Timeseries> timeseries, double timestep, bool linear)
   void timeseries_push(Rcpp::XPtr<Timeseries> timeseries, double value, double timestep)
   Rcpp::List timeseries_save_state(Rcpp::XPtr<Timeseries> timeseries)
   void timeseries_restore_state(Rcpp::XPtr<Timeseries> timeseries, Rcpp::List state)

Exports from \\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/utils.cpp:
   void random_seed(size_t seed)
   std::string random_save_state()
   void random_restore_state(std::string state)
   std::vector<size_t> bernoulli_multi_p_cpp(const std::vector<double> p)
   std::vector<size_t> bitset_index_cpp(Rcpp::XPtr<individual_index_t> a, Rcpp::XPtr<individual_index_t> b)
   Rcpp::IntegerVector fast_weighted_sample(size_t size, std::vector<double> probs)

\\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/src/RcppExports.cpp updated.
\\wpia-hn/Malaria/Lydia/quick_reclone/malariasimulation/R/RcppExports.R updated.
ℹ Re-compiling malariasimulation (debug build)
── R CMD INSTALL ───────────────────────────────────────────────────────────────
─  installing *source* package 'malariasimulation' ...
   ** using staged installation
   ** libs
   using C++ compiler: 'G__~1.EXE (GCC) 13.2.0'
   using C++14
   g++  -std=gnu++14 -I"C:/PROGRA~1/R/R-44~1.1/include" -DNDEBUG  -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/Rcpp/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/individual/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/BH/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/testthat/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/dqrng/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/sitmo/include'   -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"  -I../inst/include/   -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c Random.cpp -o Random.o
   Assembler messages:
   Fatal error: can't create Random.o: Invalid argument
   make: *** [C:/PROGRA~1/R/R-44~1.1/etc/x64/Makeconf:296: Random.o] Error 1
   ERROR: compilation failed for package 'malariasimulation'
─  removing 'C:/Users/lhaile/AppData/Local/Temp/Rtmp4gmpIa/devtools_install_5b0452d81bf5/malariasimulation'
Error:
! ! System command 'Rcmd.exe' failed
Hide Traceback
     ▆
  1. ├─devtools::document()
  2. │ └─roxygen2::roxygenise(pkg$path, roclets)
  3. │   └─roxygen2 (local) load_code(base_path)
  4. │     └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
  5. │       └─pkgbuild::compile_dll(path, quiet = quiet)
  6. │         ├─pkgbuild:::withr_with_makevars(...)
  7. │         │ ├─pkgbuild:::withr_with_envvar(...)
  8. │         │ │ └─base::force(code)
  9. │         │ └─base::force(code)
 10. │         ├─pkgbuild:::withr_with_envvar(c(DEBUG = "true"), build())
 11. │         │ └─base::force(code)
 12. │         └─pkgbuild::build()
 13. │           └─pkgbuild:::install_min(...)
 14. │             └─pkgbuild::rcmd_build_tools(...)
 15. │               ├─pkgbuild::with_build_tools(...)
 16. │               │ └─pkgbuild:::withr_with_path(rtools_path(), code)
 17. │               │   └─base::force(code)
 18. │               ├─base::withCallingHandlers(...)
 19. │               └─callr::rcmd_safe(...)
 20. │                 └─callr:::run_r(options)
 21. │                   ├─base::with(...)
 22. │                   └─base::with.default(...)
 23. │                     └─base::eval(substitute(expr), data, enclos = parent.frame())
 24. │                       └─base::eval(substitute(expr), data, enclos = parent.frame())
 25. │                         ├─callr:::with_envvar(...)
 26. │                         │ └─base::force(code)
 27. │                         ├─base::do.call(...)
 28. │                         └─processx (local) `<fn>`(...)
 29. │                           └─throw(...)
 30. │                             └─base::signalCondition(cond)
 31. └─pkgbuild (local) `<fn>`(`<systm___>`)
 32.   └─asNamespace("callr")$err$throw(e)

@pwinskill
Copy link
Member

I've re-doc'd @lmhaile

@giovannic
Copy link
Member

Hi Giovanni, when I try to document it errors out-- maybe not worth investigating if anyone else can document and push that version successfully?

Here's my traceback:
...
─ installing source package 'malariasimulation' ...
** using staged installation
** libs
using C++ compiler: 'G__1.EXE (GCC) 13.2.0'
using C++14
g++ -std=gnu++14 -I"C:/PROGRA
1/R/R-441.1/include" -DNDEBUG -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/Rcpp/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/individual/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/BH/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/testthat/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/dqrng/include' -I'C:/Users/lhaile/AppData/Local/R/win-library/4.4/sitmo/include' -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -I../inst/include/ -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c Random.cpp -o Random.o
Assembler messages:
Fatal error: can't create Random.o: Invalid argument
make: *** [C:/PROGRA
1/R/R-44~1.1/etc/x64/Makeconf:296: Random.o] Error 1
ERROR: compilation failed for package 'malariasimulation'
─ removing 'C:/Users/lhaile/AppData/Local/Temp/Rtmp4gmpIa/devtools_install_5b0452d81bf5/malariasimulation'
Error:
! ! System command 'Rcmd.exe' failed
Hide Traceback

  1. ├─devtools::document()
  2. │ └─roxygen2::roxygenise(pkg$path, roclets)
  3. │ └─roxygen2 (local) load_code(base_path)
  4. │ └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
  5. │ └─pkgbuild::compile_dll(path, quiet = quiet)
  6. │ ├─pkgbuild:::withr_with_makevars(...)
  7. │ │ ├─pkgbuild:::withr_with_envvar(...)
  8. │ │ │ └─base::force(code)
  9. │ │ └─base::force(code)
  10. │ ├─pkgbuild:::withr_with_envvar(c(DEBUG = "true"), build())
  11. │ │ └─base::force(code)
  12. │ └─pkgbuild::build()
  13. │ └─pkgbuild:::install_min(...)
  14. │ └─pkgbuild::rcmd_build_tools(...)
  15. │ ├─pkgbuild::with_build_tools(...)
  16. │ │ └─pkgbuild:::withr_with_path(rtools_path(), code)
  17. │ │ └─base::force(code)
  18. │ ├─base::withCallingHandlers(...)
  19. │ └─callr::rcmd_safe(...)
  20. │ └─callr:::run_r(options)
  21. │ ├─base::with(...)
  22. │ └─base::with.default(...)
  23. │ └─base::eval(substitute(expr), data, enclos = parent.frame())
  24. │ └─base::eval(substitute(expr), data, enclos = parent.frame())
  25. │ ├─callr:::with_envvar(...)
  26. │ │ └─base::force(code)
  27. │ ├─base::do.call(...)
  28. │ └─processx (local) <fn>(...)
  29. │ └─throw(...)
  30. │ └─base::signalCondition(cond)
  31. └─pkgbuild (local) <fn>(<systm___>)
  32. └─asNamespace("callr")$err$throw(e)

Very bizarre error message!..

@giovannic giovannic merged commit db57035 into dev Sep 12, 2024
4 checks passed
@giovannic giovannic deleted the r21_profiles branch September 12, 2024 08:23
@giovannic giovannic mentioned this pull request Sep 12, 2024
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants