Skip to content

Commit

Permalink
checking for cmake version in plots
Browse files Browse the repository at this point in the history
  • Loading branch information
mberaha committed Jul 6, 2022
1 parent acb7a96 commit 863c439
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ if (ENABLE_DOCS)
endif()

if (NOT DISABLE_PLOTS)
if (${CMAKE_VERSION} VERSION_LESS "3.20.0")
message(FATAL_ERROR
"Your cmake version is too old: version >= 3.20.0 is required for plotting.")
endif()
include(FetchContent)

set(FETCHCONTENT_QUIET OFF)
Expand Down
7 changes: 5 additions & 2 deletions python/reproducibility/replicate_jss_paper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shutil
import subprocess

import arviz as az
Expand Down Expand Up @@ -178,11 +179,13 @@ def run_bayesmix(log_fold, dataset, name, g0_params, univariate: bool):
png_fold = os.path.join(OUTPUT_PATH, "png")
build_fold = os.path.join(OUTPUT_PATH, os.pardir, os.pardir, "build")

shutil.rmtree(build_fold, ignore_errors=True)

for fold in (log_fold, csv_fold, png_fold, build_fold):
os.makedirs(fold, exist_ok=True)

subprocess.call("cmake .. -DDISABLE_BENCHMARKS=ON".split(), cwd="../build/")
subprocess.call("make plot_mcmc -j4".split(), cwd="../build/")
subprocess.call("cmake .. -DDISABLE_BENCHMARKS=ON".split(), cwd=build_fold)
subprocess.call("make plot_mcmc -j4".split(), cwd=build_fold)

build_bayesmix(4)

Expand Down

0 comments on commit 863c439

Please sign in to comment.