stan-dev / stan-dev/cmdstan

Error compiling a simple model with read-only access to CmdStan

Open
#1,175 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

makefile
Dominant language
C++
Stars
238
Forks
106
Avg merge
2h 29m
Merged PRs (30d)
6

Description

Summary:

I cannot compile Stan models if I only have read permissions to CmdStan.

Description:

I work in a large highly-regulated company with a centrally-maintained computing environment. Users are discouraged from installing their own software because of validation requirements. Our devops team installed a copy of CmdStan 2.32.2, and I cannot compile models with it because I only have read permissions.

Reproducible Steps:

With an instance of CmdStan installed by a different user, a simple make ~/bernoulli fails with the output below, where bernoulli.stan comes from the example files in CmdStan.

Current Output:

The full output is too long to include in this thread, but all the relevant output is at the beginning:

hpc /CENSORED_DIRECTORY/apps/cmdstan/cmdstan-2.32.2 make /home/CENSORED_USER/bernoulli
g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS          -c -MT stan/src/stan/model/model_header.hpp.gch -MT stan/src/stan/model/model_header.d -MM -E -MG -MP -MF stan/src/stan/model/model_header.d stan/src/stan/model/model_header.hpp
<built-in>:0:0: fatal error: opening dependency file stan/src/stan/model/model_header.d: Permission denied
compilation terminated.
g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS          -c -MT src/cmdstan/main.o -MM -E -MG -MP -MF src/cmdstan/main.d src/cmdstan/main.cpp
<built-in>:0:0: fatal error: opening dependency file src/cmdstan/main.d: Permission denied
compilation terminated.\
Expected Output:

I expected the model to compile successfully.

Current Version:

v2.32.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the read-only installation case with CmdStan 2.32.2 using the make ~/bernoulli entry point. Read the build rules involved with stan/src/stan/model/model_header.hpp, src/cmdstan/main.cpp, and their .d dependency files. Done means the example model compiles successfully when CmdStan is readable but not writable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.