You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplifying from a user post on 2024-10-22, this causes model building to fail because of AD. Note that in testing we have a latent dcat with a dependent dnorm and that is fine. So something about the two dcats may be the issue.
code <- nimbleCode({
y ~ dcat(p[z,1:2])
for(i in 1:2) {
p[i,1]~dunif(0,1)
p[i,2]<-1-p[i,1]
}
z ~ dcat(p[1,1:2])
})
m <- nimbleModel(code,buildDerivs=TRUE)
cm <- compileNimble(m)
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
In file included from P_1_code_MID_1.h:6,
from P_1_code_MID_1.cpp:7:
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h: In instantiation of ‘NimArr<nDim, T>& VecNimArr<ndim, T>::operator[](unsigned int) [with int ndim = 1; T = double]’:
P_1_code_MID_1.cpp:28:10: required from here
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h:1862:35: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<NimArr<1, double>, std::allocator<NimArr<1, double> > >::size_type’ {aka ‘long unsigned int’} [-Wformat=]
1862 | "values.size() is only %i\n",
| ~^
| |
| int
| %li
1863 | i, values.size());
| ~~~~~~~~~~~~~
| |
| std::vector<NimArr<1, double>, std::allocator<NimArr<1, double> > >::size_type {aka long unsigned int}
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h: In instantiation of ‘NimArr<nDim, T>& VecNimArr<ndim, T>::operator[](unsigned int) [with int ndim = 2; T = double]’:
P_1_code_MID_1.cpp:29:10: required from here
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h:1862:35: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<NimArr<2, double>, std::allocator<NimArr<2, double> > >::size_type’ {aka ‘long unsigned int’} [-Wformat=]
1862 | "values.size() is only %i\n",
| ~^
| |
| int
| %li
1863 | i, values.size());
| ~~~~~~~~~~~~~
| |
| std::vector<NimArr<2, double>, std::allocator<NimArr<2, double> > >::size_type {aka long unsigned int}
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h: In instantiation of ‘NimArr<nDim, T>& VecNimArr<ndim, T>::operator[](unsigned int) [with int ndim = 1; T = CppAD::AD<double>]’:
P_1_code_MID_1.cpp:113:10: required from here
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h:1862:35: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<NimArr<1, CppAD::AD<double> >, std::allocator<NimArr<1, CppAD::AD<double> > > >::size_type’ {aka ‘long unsigned int’} [-Wformat=]
1862 | "values.size() is only %i\n",
| ~^
| |
| int
| %li
1863 | i, values.size());
| ~~~~~~~~~~~~~
| |
| std::vector<NimArr<1, CppAD::AD<double> >, std::allocator<NimArr<1, CppAD::AD<double> > > >::size_type {aka long unsigned int}
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h: In instantiation of ‘NimArr<nDim, T>& VecNimArr<ndim, T>::operator[](unsigned int) [with int ndim = 2; T = CppAD::AD<double>]’:
P_1_code_MID_1.cpp:114:10: required from here
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-22.04/4.4/nimble/include/nimble/NimArr.h:1862:35: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<NimArr<2, CppAD::AD<double> >, std::allocator<NimArr<2, CppAD::AD<double> > > >::size_type’ {aka ‘long unsigned int’} [-Wformat=]
1862 | "values.size() is only %i\n",
| ~^
| |
| int
| %li
1863 | i, values.size());
| ~~~~~~~~~~~~~
| |
| std::vector<NimArr<2, CppAD::AD<double> >, std::allocator<NimArr<2, CppAD::AD<double> > > >::size_type {aka long unsigned int}
P_1_code_MID_1_nfCode.cpp: In member function ‘virtual CppAD::AD<double> y_L1_UID_4::calculate_ADproxyModel(const indexedNodeInfo&) const’:
P_1_code_MID_1_nfCode.cpp:120:37: error: invalid ‘static_cast’ from type ‘CppAD::AD<double>’ to type ‘int’
120 | Interm_8.setMap((**ADproxyModel_p), static_cast<int>(((**ADproxyModel_z)[0] - 1) * (**ADproxyModel_p).strides()[0]), (**ADproxyModel_p).strides()[1], 2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
Simplifying from a user post on 2024-10-22, this causes model building to fail because of AD. Note that in testing we have a latent
dcat
with a dependentdnorm
and that is fine. So something about the twodcat
s may be the issue.The text was updated successfully, but these errors were encountered: