Hi @kyo219 - we have had reports in the past of the show_progress function acting strangely in notebooks. It’s all been re-written in 1.0 which should be out soon (or if you want to do a pip install from github).
That said, if it’s working on the CPU I suspect it is another issue.
@mitzimorris - I know you’ve used cmdstanpy in Google collab. Is the issue that cmdstan itself would need to be rebuilt with these flags, or could it be an issue with external dependencies? Not sure what opencl requires
I dont have any familiartiy with Google Colab so not sure I can help a ton but can try. The OpenCL dependencies that are required are listed here: 14 Parallelization | CmdStan User’s Guide
Preparing to unpack .../48-nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
dpkg: error processing archive /tmp/apt-dpkg-install-1gv7Ba/48-nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (--unpack): trying to overwrite '/usr/include/cublas.h', which is
also in package libcublas-dev 10.2.1.243-1dpkg-deb: error: paste subprocess was killed by signal(Broken pipe)
Running MCMC with 4 parallel chains...
Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
Chain 1 Exception: stan_code_model_namespace::log_prob: o_Tau is not symmetric. o_Tau[1,2] = inf, but o_Tau[2,1] = inf (in '/tmp/RtmpEBdlH8/model-4d182d8a1c.stan', line 43, column 8 to column 40)
Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
.....
INFO:cmdstanpy:compiling stan program, exe file: /content/drive/MyDrive/eiv_gpu/m4_non
INFO:cmdstanpy:compiler options: stanc_options=None, cpp_options={'STAN_THREADS': True, 'STAN_OPENCL': 'TRUE', 'OPENCL_PLATFORM_ID': 0, 'OPENCL_DEVICE_ID': 0}
ERROR:cmdstanpy:file /content/drive/MyDrive/eiv_gpu/m4_non.stan, exception ERROR
In file included from stan/lib/stan_math/stan/math/opencl/prim.hpp:200:0,
from stan/lib/stan_math/stan/math/prim.hpp:7,
from stan/src/stan/io/dump.hpp:7,
from src/cmdstan/command.hpp:30,
from src/cmdstan/main.cpp:1:
stan/lib/stan_math/stan/math/opencl/prim/normal_lcdf.hpp: In function ‘stan::return_type_t<T_y_cl, T_loc_cl, T_scale_cl> stan::math::normal_lcdf(const T_y_cl&, const T_loc_cl&, const T_scale_cl&)’:
stan/lib/stan_math/stan/math/opencl/prim/normal_lcdf.hpp:215:39: error: the value of ‘stan::math::internal::opencl_normal_lcdf_impl’ is not usable in a constant expression
auto lcdf_n = opencl_code<internal::opencl_normal_lcdf_impl>(
^~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/normal_lcdf.hpp:16:12: note: ‘stan::math::internal::opencl_normal_lcdf_impl’ was not declared ‘constexpr’
const char opencl_normal_lcdf_impl[] = STRINGIFY(
^~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/normal_lcdf.hpp:221:31: error: the value of ‘stan::math::internal::opencl_normal_lcdf_ldncdf_impl’ is not usable in a constant expression
= opencl_code<internal::opencl_normal_lcdf_ldncdf_impl>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/normal_lcdf.hpp:59:12: note: ‘stan::math::internal::opencl_normal_lcdf_ldncdf_impl’ was not declared ‘constexpr’
const char opencl_normal_lcdf_ldncdf_impl[] = STRINGIFY(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from stan/lib/stan_math/stan/math/opencl/prim.hpp:249:0,
from stan/lib/stan_math/stan/math/prim.hpp:7,
from stan/src/stan/io/dump.hpp:7,
from src/cmdstan/command.hpp:30,
from src/cmdstan/main.cpp:1:
stan/lib/stan_math/stan/math/opencl/prim/std_normal_lcdf.hpp: In function ‘stan::return_type_t<T> stan::math::std_normal_lcdf(const T_y_cl&)’:
stan/lib/stan_math/stan/math/opencl/prim/std_normal_lcdf.hpp:201:29: error: the value of ‘stan::math::internal::opencl_std_normal_lcdf_impl’ is not usable in a constant expression
opencl_code<internal::opencl_std_normal_lcdf_impl>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/std_normal_lcdf.hpp:16:12: note: ‘stan::math::internal::opencl_std_normal_lcdf_impl’ was not declared ‘constexpr’
const char opencl_std_normal_lcdf_impl[] = STRINGIFY(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/std_normal_lcdf.hpp:205:39: error: the value of ‘stan::math::internal::opencl_std_normal_lcdf_dnlcdf’ is not usable in a constant expression
auto dnlcdf = opencl_code<internal::opencl_std_normal_lcdf_dnlcdf>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/opencl/prim/std_normal_lcdf.hpp:52:12: note: ‘stan::math::internal::opencl_std_normal_lcdf_dnlcdf’ was not declared ‘constexpr’
const char opencl_std_normal_lcdf_dnlcdf[] = STRINGIFY(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from stan/lib/stan_math/stan/math/opencl/kernel_generator.hpp:136:0,
from stan/lib/stan_math/stan/math/opencl/rev/vari.hpp:7,
from stan/lib/stan_math/stan/math/rev/core/var.hpp:5,
from stan/lib/stan_math/stan/math/rev/core/profiling.hpp:6,
from src/cmdstan/write_profiling.hpp:4,
from src/cmdstan/command.hpp:21,
from src/cmdstan/main.cpp:1:
stan/lib/stan_math/stan/math/opencl/kernel_generator/multi_result_kernel.hpp: In instantiation of ‘stan::math::results_cl<T_results>::operator=(const stan::math::expressions_cl<T_expressions ...>&)::<lambda(auto:20 ...)> [with auto:20 = {std::integral_constant<long unsigned int, 0ul>}; T_expressions = {const stan::math::constant_<double>&}; <template-parameter-2-2> = void; T_results = {stan::math::matrix_cl<double>&}]’:
.....
make: *** [src/cmdstan/main_threads_opencl.o] Error 1
ERROR:cmdstanpy:model compilation failed