Using earlier versions of Stan

I am still getting the same error. This is really puzzling. I am pretty sure the commit ids for stan and stan_math are the same as what you posted. Here is some info about the state of my check out from git.

[philipm@oban cmdstan]$ git status
HEAD detached at v2.23.0
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   stan (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
[philipm@oban cmdstan]$ git diff
diff --git a/stan b/stan
--- a/stan
+++ b/stan
@@ -1 +1 @@
-Subproject commit d44315be81899824ff32da81a6c74101dba995e1
+Subproject commit d44315be81899824ff32da81a6c74101dba995e1-dirty
[philipm@oban cmdstan]$ cd stan/
[philipm@oban stan]$ git status
HEAD detached at d44315b
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   lib/stan_math (untracked content)

no changes added to commit (use "git add" and/or "git commit -a")
[philipm@oban stan]$ cd lib/stan_math/
[philipm@oban stan_math]$ git status
HEAD detached at d4c32ed
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        lib/boost_1.72.0/tools/build/src/engine/b2
        lib/boost_1.72.0/tools/build/src/engine/bjam

nothing added to commit but untracked files present (use "git add" to track)
[philipm@oban stan_math]$ cd ../../..
[philipm@oban cmdstan]$ cat .gitmodules
[submodule "stan"]
        path = stan
        url = https://github.com/stan-dev/stan
[philipm@oban cmdstan]$ git submodule status --recursive
 d44315be81899824ff32da81a6c74101dba995e1 stan (v2.23.0)
 d4c32ed277a26b86bde275edce81ba1e35b508c5 stan/lib/stan_math (v3.2.0)