Failure to link with MKL_RT under Windows

I have conda and mamba under Windows 10 and have used both to install pymc using both the “simple” and “fancy” installation instructions. No matter what I do, I get the following:

library mkl_rt is not found.

I’ve look around and there is all sorts of information, but it’s hard to know what is right. Is there a simple solution to this problem?

Opher

Hi @opherdonchin!

In order to gather the info in order to help you, could you please post your entire terminal session so that we can see exactly what’s going on.

You can create an expandable code block here in the Discourse comment editor with the following code:

[details="Summary"]
```
long terminal output goes here
```
[/details]

The result looks like:

Summary
long terminal output goes here
asdf
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...

I would suggest creating a fresh environment with a command like:

mamba create --name pymc-issue-test --channel conda-forge pymc

activating that, and providing the results of mamba list, mamba info, and running PyMC.

Thanks!

2 Likes

Hi. This is a Jupyter notebook. I ran it in a clean environment just like you indicated before evenstarting to post. I put it on GitHub.

If you want me to try to simplify I can, but it seems pretty bare bones given the model. I can at least get id of the text.

Here is the definition of the model:

def latent_variable_model(y,groups,P):
  gp_idx, group_list = pd.factorize(groups, sort=True)
  s_idx, subject_list = pd.factorize(y.index)
  m_idx, measure_list = pd.factorize(y.columns)

  sigma_p_shape, sigma_p_rate = gamma_mv2sr(sigma_p_mode, sigma_p_s*sigma_p_s)
  sigma_y_shape, sigma_y_rate = gamma_mv2sr(sigma_y_mode, sigma_y_s*sigma_y_s)

  coords = {'subject': subject_list, 'measure': measure_list, 'group':group_list, 'process': range(P)}
  with pm.Model(coords=coords) as model:
    # Priors
    sigma_p = pm.Gamma("sigma_p", alpha=sigma_p_shape, beta=sigma_p_rate)
    sigma_y = pm.Gamma("sigma_y", alpha=sigma_y_shape, beta=sigma_p_rate)
    beta_0 = pm.Normal('beta_0', mu=beta_0_mu, sigma=beta_0_s, dims='measure')
    beta = pm.Normal('beta', mu=beta_mu, sigma=beta_s, dims=['process', 'measure'])
    mu_g = pm.Normal('mu_g', mu=mu_g_mu, sigma=mu_g_s, dims=['group', 'process'])
    # Latent variables
    x = pm.Normal('x', mu=mu_g[gp_idx,:], sigma=sigma_p, dims=['subject', 'process'])
    mu_y = pm.Deterministic('mu_y', beta_0 + pm.math.dot(x,beta), dims=['subject', 'measure'])

    # Likelihood 
    obs_y = pm.Normal('obs_y', mu=mu_y, sigma=sigma_y, observed=y, dims=['subject', 'measure'])
  return model

model = latent_variable_model(y.drop('group',axis=1), y['group'], 2)

And this is what y looks like:

lr	la	af	pr	gn	fb	group
0	0.351113	0.778803	0.992649	0.279831	0.850085	0.992649	LowPT
1	0.351113	0.778803	0.992649	0.279831	0.850085	0.992649	LowPT
2	0.351113	0.778803	0.992649	0.279831	0.850085	0.992649	LowPT
3	0.351113	0.778803	0.992649	0.279831	0.850085	0.992649	LowPT
4	0.351113	0.778803	0.992649	0.279831	0.850085	0.992649	LowPT
...	...	...	...	...	...	...	...
415	0.497362	0.550242	0.576682	0.488549	0.559055	0.576682	NoBoth75
416	0.497362	0.550242	0.576682	0.488549	0.559055	0.576682	NoBoth75
417	0.497362	0.550242	0.576682	0.488549	0.559055	0.576682	NoBoth75
418	0.497362	0.550242	0.576682	0.488549	0.559055	0.576682	NoBoth75
419	0.497362	0.550242	0.576682	0.488549	0.559055	0.576682	NoBoth75

This is the full output of the sample:

Summary
You can find the C code in this temporary file: C:\Users\OPHERL~1\AppData\Local\Temp\aesara_compilation_error_yczza5av
library mkl_rt is not found.
---------------------------------------------------------------------------
CompileError                              Traceback (most recent call last)
File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\vm.py:1246, in VMLinker.make_all(self, profiler, input_storage, output_storage, storage_map)
   1242 # no-recycling is done at each VM.__call__ So there is
   1243 # no need to cause duplicate c code by passing
   1244 # no_recycling here.
   1245 thunks.append(
-> 1246     node.op.make_thunk(node, storage_map, compute_map, [], impl=impl)
   1247 )
   1248 linker_make_thunk_time[node] = time.time() - thunk_start

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\op.py:131, in COp.make_thunk(self, node, storage_map, compute_map, no_recycling, impl)
    130 try:
--> 131     return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
    132 except (NotImplementedError, MethodNotDefined):
    133     # We requested the c code, so don't catch the error.

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\op.py:96, in COp.make_c_thunk(self, node, storage_map, compute_map, no_recycling)
     95         raise NotImplementedError("float16")
---> 96 outputs = cl.make_thunk(
     97     input_storage=node_input_storage, output_storage=node_output_storage
     98 )
     99 thunk, node_input_filters, node_output_filters = outputs

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1202, in CLinker.make_thunk(self, input_storage, output_storage, storage_map, cache, **kwargs)
   1201 init_tasks, tasks = self.get_init_tasks()
-> 1202 cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
   1203     input_storage, output_storage, storage_map, cache
   1204 )
   1206 res = _CThunk(cthunk, init_tasks, tasks, error_storage, module)

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1122, in CLinker.__compile__(self, input_storage, output_storage, storage_map, cache)
   1121 output_storage = tuple(output_storage)
-> 1122 thunk, module = self.cthunk_factory(
   1123     error_storage,
   1124     input_storage,
   1125     output_storage,
   1126     storage_map,
   1127     cache,
   1128 )
   1129 return (
   1130     thunk,
   1131     module,
   (...)
   1140     error_storage,
   1141 )

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1647, in CLinker.cthunk_factory(self, error_storage, in_storage, out_storage, storage_map, cache)
   1646         cache = get_module_cache()
-> 1647     module = cache.module_from_key(key=key, lnk=self)
   1649 vars = self.inputs + self.outputs + self.orphans

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\cmodule.py:1229, in ModuleCache.module_from_key(self, key, lnk)
   1228 location = dlimport_workdir(self.dirname)
-> 1229 module = lnk.compile_cmodule(location)
   1230 name = module.__file__

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1546, in CLinker.compile_cmodule(self, location)
   1545     _logger.debug(f"LOCATION {location}")
-> 1546     module = c_compiler.compile_str(
   1547         module_name=mod.code_hash,
   1548         src_code=src_code,
   1549         location=location,
   1550         include_dirs=self.header_dirs(),
   1551         lib_dirs=self.lib_dirs(),
   1552         libs=libs,
   1553         preargs=preargs,
   1554     )
   1555 except Exception as e:

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\cmodule.py:2640, in GCC_compiler.compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
   2636     # We replace '\n' by '. ' in the error message because when Python
   2637     # prints the exception, having '\n' in the text makes it more
   2638     # difficult to read.
   2639     # compile_stderr = compile_stderr.replace("\n", ". ")
-> 2640     raise CompileError(
   2641         f"Compilation failed (return status={status}):\n{' '.join(cmd)}\n{compile_stderr}"
   2642     )
   2643 elif config.cmodule__compilation_warning and compile_stderr:
   2644     # Print errors just below the command line.

CompileError: Compilation failed (return status=1):
"C:\miniconda3\envs\pymc_env\Library\mingw-w64\bin\g++.exe" -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -march=broadwell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"c:\miniconda3\envs\pymc_env\lib\site-packages\numpy\core\include" -I"c:\miniconda3\envs\pymc_env\include" -I"c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\c_code" -L"c:\miniconda3\envs\pymc_env\libs" -L"c:\miniconda3\envs\pymc_env" -o "C:\Users\Opher local\AppData\Local\Aesara\compiledir_Windows-10-10.0.19043-SP0-Intel64_Family_6_Model_142_Stepping_12_GenuineIntel-3.10.4-64\tmpwrt192ya\mebd8dae10522ca0870e1a82f1ea908002d7232440c31ecf6eadb09903ee4931b.pyd" "C:\Users\Opher local\AppData\Local\Aesara\compiledir_Windows-10-10.0.19043-SP0-Intel64_Family_6_Model_142_Stepping_12_GenuineIntel-3.10.4-64\tmpwrt192ya\mod.cpp" -lmkl_rt "c:\miniconda3\envs\pymc_env\python310.dll"
C:/miniconda3/envs/pymc_env/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmkl_rt
collect2.exe: error: ld returned 1 exit status


During handling of the above exception, another exception occurred:

CompileError                              Traceback (most recent call last)
c:\Opher\GitHub\bsf_donchin_jordan_2022\identify_processes.ipynb Cell 28 in <cell line: 3>()
      1 # import aesara
      2 # aesara.config.blas__ldflags=''
      3 with model:
----> 4   fit = pm.sample()
      5 az.to_netcdf(fit, 'model_samples.ncdf')

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\sampling.py:530, in sample(draws, step, init, n_init, initvals, trace, chain_idx, chains, cores, tune, progressbar, model, random_seed, discard_tuned_samples, compute_convergence_checks, callback, jitter_max_retries, return_inferencedata, idata_kwargs, mp_ctx, **kwargs)
    527         auto_nuts_init = False
    529 initial_points = None
--> 530 step = assign_step_methods(model, step, methods=pm.STEP_METHODS, step_kwargs=kwargs)
    532 if isinstance(step, list):
    533     step = CompoundStep(step)

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\sampling.py:228, in assign_step_methods(model, step, methods, step_kwargs)
    220         selected = max(
    221             methods,
    222             key=lambda method, var=rv_var, has_gradient=has_gradient: method._competence(
    223                 var, has_gradient
    224             ),
    225         )
    226         selected_steps[selected].append(var)
--> 228 return instantiate_steppers(model, steps, selected_steps, step_kwargs)

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\sampling.py:146, in instantiate_steppers(model, steps, selected_steps, step_kwargs)
    144         args = step_kwargs.get(step_class.name, {})
    145         used_keys.add(step_class.name)
--> 146         step = step_class(vars=vars, model=model, **args)
    147         steps.append(step)
    149 unused_args = set(step_kwargs).difference(used_keys)

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\step_methods\hmc\nuts.py:178, in NUTS.__init__(self, vars, max_treedepth, early_max_treedepth, **kwargs)
    120 def __init__(self, vars=None, max_treedepth=10, early_max_treedepth=8, **kwargs):
    121     r"""Set up the No-U-Turn sampler.
    122 
    123     Parameters
   (...)
    176     `pm.sample` to the desired number of tuning steps.
    177     """
--> 178     super().__init__(vars, **kwargs)
    180     self.max_treedepth = max_treedepth
    181     self.early_max_treedepth = early_max_treedepth

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\step_methods\hmc\base_hmc.py:95, in BaseHMC.__init__(self, vars, scaling, step_scale, is_cov, model, blocked, potential, dtype, Emax, target_accept, gamma, k, t0, adapt_step_size, step_rand, **aesara_kwargs)
     92 else:
     93     vars = [self._model.rvs_to_values.get(var, var) for var in vars]
---> 95 super().__init__(vars, blocked=blocked, model=self._model, dtype=dtype, **aesara_kwargs)
     97 self.adapt_step_size = adapt_step_size
     98 self.Emax = Emax

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\step_methods\arraystep.py:276, in GradientSharedStep.__init__(self, vars, model, blocked, dtype, logp_dlogp_func, **aesara_kwargs)
    273 model = modelcontext(model)
    275 if logp_dlogp_func is None:
--> 276     func = model.logp_dlogp_function(vars, dtype=dtype, **aesara_kwargs)
    277 else:
    278     func = logp_dlogp_func

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\model.py:642, in Model.logp_dlogp_function(self, grad_vars, tempered, **kwargs)
    638 ip = self.initial_point(0)
    639 extra_vars_and_values = {
    640     var: ip[var.name] for var in extra_vars if var in input_vars and var not in grad_vars
    641 }
--> 642 return ValueGradFunction(costs, grad_vars, extra_vars_and_values, **kwargs)

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\model.py:382, in ValueGradFunction.__init__(self, costs, grad_vars, extra_vars_and_values, dtype, casting, compute_grads, **kwargs)
    378     outputs = [cost]
    380 inputs = grad_vars
--> 382 self._aesara_function = compile_pymc(inputs, outputs, givens=givens, **kwargs)

File c:\miniconda3\envs\pymc_env\lib\site-packages\pymc\aesaraf.py:965, in compile_pymc(inputs, outputs, random_seed, mode, **kwargs)
    963 opt_qry = mode.provided_optimizer.including("random_make_inplace", check_parameter_opt)
    964 mode = Mode(linker=mode.linker, optimizer=opt_qry)
--> 965 aesara_function = aesara.function(
    966     inputs,
    967     outputs,
    968     updates={**rng_updates, **kwargs.pop("updates", {})},
    969     mode=mode,
    970     **kwargs,
    971 )
    972 return aesara_function

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\compile\function\__init__.py:317, in function(inputs, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input)
    311     fn = orig_function(
    312         inputs, outputs, mode=mode, accept_inplace=accept_inplace, name=name
    313     )
    314 else:
    315     # note: pfunc will also call orig_function -- orig_function is
    316     #      a choke point that all compilation must pass through
--> 317     fn = pfunc(
    318         params=inputs,
    319         outputs=outputs,
    320         mode=mode,
    321         updates=updates,
    322         givens=givens,
    323         no_default_updates=no_default_updates,
    324         accept_inplace=accept_inplace,
    325         name=name,
    326         rebuild_strict=rebuild_strict,
    327         allow_input_downcast=allow_input_downcast,
    328         on_unused_input=on_unused_input,
    329         profile=profile,
    330         output_keys=output_keys,
    331     )
    332 return fn

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\compile\function\pfunc.py:374, in pfunc(params, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input, output_keys, fgraph)
    360     profile = ProfileStats(message=profile)
    362 inputs, cloned_outputs = construct_pfunc_ins_and_outs(
    363     params,
    364     outputs,
   (...)
    371     fgraph=fgraph,
    372 )
--> 374 return orig_function(
    375     inputs,
    376     cloned_outputs,
    377     mode,
    378     accept_inplace=accept_inplace,
    379     name=name,
    380     profile=profile,
    381     on_unused_input=on_unused_input,
    382     output_keys=output_keys,
    383     fgraph=fgraph,
    384 )

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\compile\function\types.py:1759, in orig_function(inputs, outputs, mode, accept_inplace, name, profile, on_unused_input, output_keys, fgraph)
   1747     m = Maker(
   1748         inputs,
   1749         outputs,
   (...)
   1756         fgraph=fgraph,
   1757     )
   1758     with config.change_flags(compute_test_value="off"):
-> 1759         fn = m.create(defaults)
   1760 finally:
   1761     t2 = time.time()

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\compile\function\types.py:1652, in FunctionMaker.create(self, input_storage, trustme, storage_map)
   1649 start_import_time = aesara.link.c.cmodule.import_time
   1651 with config.change_flags(traceback__limit=config.traceback__compile_limit):
-> 1652     _fn, _i, _o = self.linker.make_thunk(
   1653         input_storage=input_storage_lists, storage_map=storage_map
   1654     )
   1656 end_linker = time.time()
   1658 linker_time = end_linker - start_linker

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\basic.py:254, in LocalLinker.make_thunk(self, input_storage, output_storage, storage_map, **kwargs)
    247 def make_thunk(
    248     self,
    249     input_storage: Optional["InputStorageType"] = None,
   (...)
    252     **kwargs,
    253 ) -> Tuple["BasicThunkType", "InputStorageType", "OutputStorageType"]:
--> 254     return self.make_all(
    255         input_storage=input_storage,
    256         output_storage=output_storage,
    257         storage_map=storage_map,
    258     )[:3]

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\vm.py:1255, in VMLinker.make_all(self, profiler, input_storage, output_storage, storage_map)
   1253             thunks[-1].lazy = False
   1254     except Exception:
-> 1255         raise_with_op(fgraph, node)
   1257 t1 = time.time()
   1259 if self.profile:

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\utils.py:534, in raise_with_op(fgraph, node, thunk, exc_info, storage_map)
    529     warnings.warn(
    530         f"{exc_type} error does not allow us to add an extra error message"
    531     )
    532     # Some exception need extra parameter in inputs. So forget the
    533     # extra long error message in that case.
--> 534 raise exc_value.with_traceback(exc_trace)

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\vm.py:1246, in VMLinker.make_all(self, profiler, input_storage, output_storage, storage_map)
   1241 thunk_start = time.time()
   1242 # no-recycling is done at each VM.__call__ So there is
   1243 # no need to cause duplicate c code by passing
   1244 # no_recycling here.
   1245 thunks.append(
-> 1246     node.op.make_thunk(node, storage_map, compute_map, [], impl=impl)
   1247 )
   1248 linker_make_thunk_time[node] = time.time() - thunk_start
   1249 if not hasattr(thunks[-1], "lazy"):
   1250     # We don't want all ops maker to think about lazy Ops.
   1251     # So if they didn't specify that its lazy or not, it isn't.
   1252     # If this member isn't present, it will crash later.

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\op.py:131, in COp.make_thunk(self, node, storage_map, compute_map, no_recycling, impl)
    127 self.prepare_node(
    128     node, storage_map=storage_map, compute_map=compute_map, impl="c"
    129 )
    130 try:
--> 131     return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
    132 except (NotImplementedError, MethodNotDefined):
    133     # We requested the c code, so don't catch the error.
    134     if impl == "c":

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\op.py:96, in COp.make_c_thunk(self, node, storage_map, compute_map, no_recycling)
     94         print(f"Disabling C code for {self} due to unsupported float16")
     95         raise NotImplementedError("float16")
---> 96 outputs = cl.make_thunk(
     97     input_storage=node_input_storage, output_storage=node_output_storage
     98 )
     99 thunk, node_input_filters, node_output_filters = outputs
    101 @is_cthunk_wrapper_type
    102 def rval():

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1202, in CLinker.make_thunk(self, input_storage, output_storage, storage_map, cache, **kwargs)
   1167 """Compile this linker's `self.fgraph` and return a function that performs the computations.
   1168 
   1169 The return values can be used as follows:
   (...)
   1199 
   1200 """
   1201 init_tasks, tasks = self.get_init_tasks()
-> 1202 cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
   1203     input_storage, output_storage, storage_map, cache
   1204 )
   1206 res = _CThunk(cthunk, init_tasks, tasks, error_storage, module)
   1207 res.nodes = self.node_order

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1122, in CLinker.__compile__(self, input_storage, output_storage, storage_map, cache)
   1120 input_storage = tuple(input_storage)
   1121 output_storage = tuple(output_storage)
-> 1122 thunk, module = self.cthunk_factory(
   1123     error_storage,
   1124     input_storage,
   1125     output_storage,
   1126     storage_map,
   1127     cache,
   1128 )
   1129 return (
   1130     thunk,
   1131     module,
   (...)
   1140     error_storage,
   1141 )

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1647, in CLinker.cthunk_factory(self, error_storage, in_storage, out_storage, storage_map, cache)
   1645     if cache is None:
   1646         cache = get_module_cache()
-> 1647     module = cache.module_from_key(key=key, lnk=self)
   1649 vars = self.inputs + self.outputs + self.orphans
   1650 # List of indices that should be ignored when passing the arguments
   1651 # (basically, everything that the previous call to uniq eliminated)

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\cmodule.py:1229, in ModuleCache.module_from_key(self, key, lnk)
   1227 try:
   1228     location = dlimport_workdir(self.dirname)
-> 1229     module = lnk.compile_cmodule(location)
   1230     name = module.__file__
   1231     assert name.startswith(location)

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\basic.py:1546, in CLinker.compile_cmodule(self, location)
   1544 try:
   1545     _logger.debug(f"LOCATION {location}")
-> 1546     module = c_compiler.compile_str(
   1547         module_name=mod.code_hash,
   1548         src_code=src_code,
   1549         location=location,
   1550         include_dirs=self.header_dirs(),
   1551         lib_dirs=self.lib_dirs(),
   1552         libs=libs,
   1553         preargs=preargs,
   1554     )
   1555 except Exception as e:
   1556     e.args += (str(self.fgraph),)

File c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\cmodule.py:2640, in GCC_compiler.compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
   2632                 print(
   2633                     "Check if package python-dev or python-devel is installed."
   2634                 )
   2636     # We replace '\n' by '. ' in the error message because when Python
   2637     # prints the exception, having '\n' in the text makes it more
   2638     # difficult to read.
   2639     # compile_stderr = compile_stderr.replace("\n", ". ")
-> 2640     raise CompileError(
   2641         f"Compilation failed (return status={status}):\n{' '.join(cmd)}\n{compile_stderr}"
   2642     )
   2643 elif config.cmodule__compilation_warning and compile_stderr:
   2644     # Print errors just below the command line.
   2645     print(compile_stderr)

CompileError: Compilation failed (return status=1):
"C:\miniconda3\envs\pymc_env\Library\mingw-w64\bin\g++.exe" -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -march=broadwell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"c:\miniconda3\envs\pymc_env\lib\site-packages\numpy\core\include" -I"c:\miniconda3\envs\pymc_env\include" -I"c:\miniconda3\envs\pymc_env\lib\site-packages\aesara\link\c\c_code" -L"c:\miniconda3\envs\pymc_env\libs" -L"c:\miniconda3\envs\pymc_env" -o "C:\Users\Opher local\AppData\Local\Aesara\compiledir_Windows-10-10.0.19043-SP0-Intel64_Family_6_Model_142_Stepping_12_GenuineIntel-3.10.4-64\tmpwrt192ya\mebd8dae10522ca0870e1a82f1ea908002d7232440c31ecf6eadb09903ee4931b.pyd" "C:\Users\Opher local\AppData\Local\Aesara\compiledir_Windows-10-10.0.19043-SP0-Intel64_Family_6_Model_142_Stepping_12_GenuineIntel-3.10.4-64\tmpwrt192ya\mod.cpp" -lmkl_rt "c:\miniconda3\envs\pymc_env\python310.dll"
C:/miniconda3/envs/pymc_env/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmkl_rt
collect2.exe: error: ld returned 1 exit status

Apply node that caused the error: Gemm{no_inplace}(obs_y{[[0.351112..57668185]]}, TensorConstant{-1.0}, x, beta, (d__logp/dsigma_y_log___logprob){1.0})
Toposort index: 7
Inputs types: [TensorType(float64, (420, 6)), TensorType(float64, ()), TensorType(float64, (None, None)), TensorType(float64, (None, None)), TensorType(float64, ())]

HINT: Use a linker other than the C linker to print the inputs' shapes and strides.
HINT: Re-running with most Aesara optimizations disabled could provide a back-trace showing when this node was created. This can be done by setting the Aesara flag 'optimizer=fast_compile'. If that does not work, Aesara optimizations can be disabled with 'optimizer=None'.
HINT: Use the Aesara flag `exception_verbosity=high` for a debug print-out and storage map footprint of this Apply node.

More follows (ran out of space)

Here is mamba list:

Summary
(pymc_env) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> mamba list
# packages in environment at C:\miniconda3\envs\pymc_env:
#
# Name                    Version                   Build  Channel
aeppl                     0.0.35             pyhd8ed1ab_0    conda-forge
aeppl-base                0.0.35             pyhd8ed1ab_0    conda-forge
aesara                    2.8.2           py310hfa0c5ed_0    conda-forge
aesara-base               2.8.2           py310h5588dad_0    conda-forge
arviz                     0.12.1             pyhd8ed1ab_1    conda-forge
asttokens                 2.0.5              pyhd3eb1b0_0
backcall                  0.2.0              pyhd3eb1b0_0
blas                      1.0                         mkl
bottleneck                1.3.5           py310h9128911_0
brotli                    1.0.9                h2bbff1b_7
brotli-bin                1.0.9                h2bbff1b_7
bzip2                     1.0.8                he774522_0
ca-certificates           2022.07.19           haa95532_0
cachetools                4.2.2              pyhd3eb1b0_0
cairo                     1.16.0               he04af86_2
certifi                   2022.9.14       py310haa95532_0
cftime                    1.5.1.1         py310h9128911_0
cloudpickle               2.0.0              pyhd3eb1b0_0
colorama                  0.4.5           py310haa95532_0
cons                      0.4.5              pyhd8ed1ab_0    conda-forge
console_shortcut          0.1.1                         4
curl                      7.84.0               h2bbff1b_0
cycler                    0.11.0             pyhd3eb1b0_0
debugpy                   1.5.1           py310hd77b12b_0
decorator                 5.1.1              pyhd3eb1b0_0
entrypoints               0.4             py310haa95532_0
etuples                   0.3.8              pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd3eb1b0_0
expat                     2.4.9                h6c2663c_0
fastprogress              1.0.0              pyhb85f177_0
fftw                      3.3.9                h2bbff1b_1
filelock                  3.6.0              pyhd3eb1b0_0
fonttools                 4.25.0             pyhd3eb1b0_0
freetype                  2.10.4               hd328e21_0
fribidi                   1.0.10               h62dcd97_0
getopt-win32              0.1                  h2bbff1b_0
glib                      2.69.1               h5dc1a3c_1
graphite2                 1.3.14               hd77b12b_1
graphviz                  2.50.0               hdb8b0d4_0
gst-plugins-base          1.18.5               h9e645db_0
gstreamer                 1.18.5               hd78058f_0
gts                       0.7.6                h63ab5a1_3
harfbuzz                  4.3.0                hda2c7e1_0
hdf4                      4.2.13               h712560f_2
hdf5                      1.10.6               h1756f20_1
icc_rt                    2022.1.0             h6049295_1
icu                       58.2                 ha925a31_3
intel-openmp              2021.4.0          haa95532_3556
ipykernel                 6.15.2          py310haa95532_0
ipython                   8.4.0           py310haa95532_0
jedi                      0.18.1          py310haa95532_1
jpeg                      9e                   h2bbff1b_0
jupyter_client            7.3.5           py310haa95532_0
jupyter_core              4.10.0          py310haa95532_0
kiwisolver                1.4.2           py310hd77b12b_0
lerc                      3.0                  hd77b12b_0
libbrotlicommon           1.0.9                h2bbff1b_7
libbrotlidec              1.0.9                h2bbff1b_7
libbrotlienc              1.0.9                h2bbff1b_7
libclang                  12.0.0          default_h627e005_2
libcurl                   7.84.0               h86230a5_0
libdeflate                1.8                  h2bbff1b_5
libffi                    3.4.2                hd77b12b_4
libgd                     2.3.3                ha43c60c_1
libiconv                  1.16                 h2bbff1b_2
libnetcdf                 4.6.1                hf59b723_4
libogg                    1.3.5                h2bbff1b_1
libpng                    1.6.37               h2a8f88b_0
libpython                 2.2             py310h5588dad_1    conda-forge
libsodium                 1.0.18               h62dcd97_0
libssh2                   1.10.0               hcd4344a_0
libtiff                   4.4.0                h8a3f274_0
libvorbis                 1.3.7                he774522_0
libwebp                   1.2.2                h2bbff1b_0
libxml2                   2.9.14               h0ad7f3c_0
libxslt                   1.1.35               h2bbff1b_0
logical-unification       0.4.5              pyhd8ed1ab_0    conda-forge
lz4-c                     1.9.3                h2bbff1b_1
m2w64-binutils            2.25.1                        5    conda-forge
m2w64-bzip2               1.0.6                         6    conda-forge
m2w64-crt-git             5.0.0.4636.2595836               2    conda-forge
m2w64-gcc                 5.3.0                         6    conda-forge
m2w64-gcc-ada             5.3.0                         6    conda-forge
m2w64-gcc-fortran         5.3.0                         6    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gcc-objc            5.3.0                         6    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-headers-git         5.0.0.4636.c0ad18a               2    conda-forge
m2w64-isl                 0.16.1                        2    conda-forge
m2w64-libiconv            1.14                          6    conda-forge
m2w64-libmangle-git       5.0.0.4509.2e5a9a2               2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
m2w64-make                4.1.2351.a80a8b8               2    conda-forge
m2w64-mpc                 1.0.3                         3    conda-forge
m2w64-mpfr                3.1.4                         4    conda-forge
m2w64-pkg-config          0.29.1                        2    conda-forge
m2w64-toolchain           5.3.0                         7    conda-forge
m2w64-toolchain_win-64    2.4.0                         0
m2w64-tools-git           5.0.0.4592.90b8472               2    conda-forge
m2w64-windows-default-manifest 6.4                           3    conda-forge
m2w64-winpthreads-git     5.0.0.4634.697f757               2    conda-forge
m2w64-zlib                1.2.8                        10    conda-forge
matplotlib                3.5.2           py310haa95532_0
matplotlib-base           3.5.2           py310hd77b12b_0
matplotlib-inline         0.1.6           py310haa95532_0
minikanren                1.0.3              pyhd8ed1ab_0    conda-forge
mkl                       2021.4.0           haa95532_640
mkl-service               2.4.0           py310h2bbff1b_0
mkl_fft                   1.3.1           py310ha0764ea_0
mkl_random                1.2.2           py310h4ed8f06_0
msys2-conda-epoch         20160418                      1    conda-forge
multipledispatch          0.6.0           py310haa95532_0
munkres                   1.1.4                      py_0
nest-asyncio              1.5.5           py310haa95532_0
netcdf4                   1.5.7           py310h2805cc6_0
numexpr                   2.8.3           py310hb57aa6b_0
numpy                     1.21.5          py310h6d2d95c_3
numpy-base                1.21.5          py310h206c741_3
openssl                   1.1.1q               h2bbff1b_0
packaging                 21.3               pyhd3eb1b0_0
pandas                    1.4.4           py310hd77b12b_0
pango                     1.50.7               h78c2152_0
parso                     0.8.3              pyhd3eb1b0_0
pcre                      8.45                 hd77b12b_0
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    9.2.0           py310hdc2b20a_1
pip                       22.1.2          py310haa95532_0
pixman                    0.40.0               h2bbff1b_1
ply                       3.11            py310haa95532_0
powershell_shortcut       0.0.1                         3
prompt-toolkit            3.0.20             pyhd3eb1b0_0
psutil                    5.9.0           py310h2bbff1b_0
pure_eval                 0.2.2              pyhd3eb1b0_0
pygments                  2.11.2             pyhd3eb1b0_0
pymc                      4.2.0                hd8ed1ab_0    conda-forge
pymc-base                 4.2.0              pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9           py310haa95532_0
pyqt                      5.15.7          py310hd77b12b_0
pyqt5-sip                 12.11.0         py310hd77b12b_0
python                    3.10.4               hbb2ffb3_0
python-dateutil           2.8.2              pyhd3eb1b0_0
python-graphviz           0.20.1          py310haa95532_0
python_abi                3.10                    2_cp310    conda-forge
pytz                      2022.1          py310haa95532_0
pywin32                   302             py310h2bbff1b_2
pyzmq                     23.2.0          py310hd77b12b_0
qt-main                   5.15.2               he8e5bd7_7
qt-webengine              5.15.9               hb9a9bb5_4
qtwebkit                  5.212                h3ad3cdb_4
scipy                     1.7.3           py310h6d2d95c_2
seaborn                   0.11.2             pyhd3eb1b0_0
setuptools                63.4.1          py310haa95532_0
sip                       6.6.2           py310hd77b12b_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.39.3               h2bbff1b_0
stack_data                0.2.0              pyhd3eb1b0_0
tk                        8.6.12               h2bbff1b_0
toml                      0.10.2             pyhd3eb1b0_0
toolz                     0.11.2             pyhd3eb1b0_0
tornado                   6.2             py310h2bbff1b_0
traitlets                 5.1.1              pyhd3eb1b0_0
typing-extensions         4.3.0           py310haa95532_0
typing_extensions         4.3.0           py310haa95532_0
tzdata                    2022c                h04d1e81_0
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wcwidth                   0.2.5              pyhd3eb1b0_0
wheel                     0.37.1             pyhd3eb1b0_0
wincertstore              0.2             py310haa95532_2
xarray                    0.20.1             pyhd3eb1b0_1
xarray-einstats           0.3.0              pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8cc25b3_0
zeromq                    4.3.4                hd77b12b_0
zlib                      1.2.12               h8cc25b3_3
zstd                      1.5.2                h19a0ad4_0

Here is mamba info:

Summary

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.24.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


     active environment : pymc_env
    active env location : C:\miniconda3\envs\pymc_env
            shell level : 2
       user config file : C:\Users\Opher local\.condarc
 populated config files : C:\Users\Opher local\.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\miniconda3  (writable)
      conda av data dir : C:\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\miniconda3\pkgs
                          C:\Users\Opher local\.conda\pkgs
                          C:\Users\Opher local\AppData\Local\conda\conda\pkgs
       envs directories : C:\miniconda3\envs
                          C:\Users\Opher local\.conda\envs
                          C:\Users\Opher local\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.12 Windows/10 Windows/10.0.19043
          administrator : False
             netrc file : None
           offline mode : False

Let me know if there is anything I can do that would be helpful.

Thanks @opherdonchin for all the info!

I think I see what’s going wrong. Most of the packages are being installed from the defaults channel instead of conda-forge. You can see this in the Channel column of the mamba list output. You want to have conda-forge in every row. (Mixing packages from different channels can lead to these sorts of problems.)

Could you please test if creating a fresh environment and adding the --strict-channel-priority flag resolves the issue for you? For example,

mamba create --name pymc-issue-test --channel conda-forge --strict-channel-priority pymc

I think we should update our installation instructions, but I don’t have a Windows computer to test with, so knowing the result would be extremely helpful for us.

Also, the --strict-channel-priority flag can be set as default by running the following commands:

conda config --add channels conda-forge
conda config --set channel_priority strict

The first command adds conda-forge as the highest priority channel. The second command enables the future default of “strict channel priority”.

I appreciate your feedback, thanks!

This looks oddly similar to this aesara issue. For some reason, your link flags follow gcc convention instead of the windows linking that I had implemented. Try out what @maresb suggested and if that doesn’t fix the issue, let us know. There might have been other places that we linking flags that I had missed.

I tried getting a clean conda environment without success. Here is the mamba command:

 mamba create --name pymc_env_stricter --channel conda-forge --strict-channel-priority pymc jupyter ipykernel

I then activated the environment and ran jupyter notebook from within the environment. I did this instead of ‘vscode’ in order to make things “cleaner” but it was the same in both jupyter implementations.

I then ran jupyter notebook from within the environment instead of using vscode in hope of making everything as clean as possible. I’ll post that part in the next reply since I’m out of characters.

(base) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> conda activate pymc_env_stricter
(pymc_env_stricter) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> mamba env list
(pymc_env_stricter) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> jupyter notebook

But this led to exactly the same problem finding mkl_rt.

You can find the C code in this temporary file: C:\Users\OPHERL~1\AppData\Local\Temp\aesara_compilation_error_5vmrimo2
library mkl_rt is not found.

I’ll attach the mamba output and the jupyter console output in subsequent replies.

mamba output:

Summary
Looking for: ['pymc', 'jupyter', 'ipykernel']

conda-forge/win-64                                          Using cache
conda-forge/noarch                                          Using cache
pkgs/msys2/win-64                                   39.8kB @  92.6kB/s  0.4s
pkgs/msys2/noarch                                  111.0 B @ 209.0 B/s  0.1s
pkgs/r/win-64                                      742.8kB @ 996.2kB/s  0.8s
pkgs/r/noarch                                        1.3MB @   1.6MB/s  0.9s
pkgs/main/noarch                                   816.3kB @ 914.6kB/s  0.9s
pkgs/main/win-64                                     4.3MB @   2.5MB/s  2.5s
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\msys2-conda-epoch-20160418-1' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\msys2-conda-epoch-20160418-1' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\winpty-0.4.3-4' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\winpty-0.4.3-4' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gmp-6.1.0-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gmp-6.1.0-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-windows-default-manifest-6.4-3' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-windows-default-manifest-6.4-3' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-isl-0.16.1-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-isl-0.16.1-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libiconv-1.14-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libiconv-1.14-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-make-4.1.2351.a80a8b8-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-make-4.1.2351.a80a8b8-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libwinpthread-git-5.0.0.4634.697f757-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libwinpthread-git-5.0.0.4634.697f757-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libmangle-git-5.0.0.4509.2e5a9a2-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-libmangle-git-5.0.0.4509.2e5a9a2-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-headers-git-5.0.0.4636.c0ad18a-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-headers-git-5.0.0.4636.c0ad18a-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-mpfr-3.1.4-4' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-mpfr-3.1.4-4' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libs-core-5.3.0-7' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libs-core-5.3.0-7' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-pkg-config-0.29.1-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-pkg-config-0.29.1-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-crt-git-5.0.0.4636.2595836-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-crt-git-5.0.0.4636.2595836-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-mpc-1.0.3-3' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-mpc-1.0.3-3' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libgfortran-5.3.0-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libgfortran-5.3.0-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-winpthreads-git-5.0.0.4634.697f757-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-winpthreads-git-5.0.0.4634.697f757-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libs-5.3.0-7' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-libs-5.3.0-7' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-bzip2-1.0.6-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-bzip2-1.0.6-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-tools-git-5.0.0.4592.90b8472-2' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-tools-git-5.0.0.4592.90b8472-2' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-zlib-1.2.8-10' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-zlib-1.2.8-10' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-binutils-2.25.1-5' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-binutils-2.25.1-5' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-5.3.0-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-5.3.0-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-objc-5.3.0-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-objc-5.3.0-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-fortran-5.3.0-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-fortran-5.3.0-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-ada-5.3.0-6' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-gcc-ada-5.3.0-6' has invalid SHA-256 checksum
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-toolchain-5.3.0-7' has invalid size
warning  libmamba Extracted package cache 'C:\miniconda3\pkgs\m2w64-toolchain-5.3.0-7' has invalid SHA-256 checksum
Transaction

  Prefix: C:\miniconda3\envs\pymc_env_stricter

  Updating specs:

   - pymc
   - jupyter
   - ipykernel


  Package                                      Version  Build                    Channel                  Size
----------------------------------------------------------------------------------------------------------------
  Install:
----------------------------------------------------------------------------------------------------------------

  + aeppl                                       0.0.35  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + aeppl-base                                  0.0.35  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + aesara                                       2.8.2  py310hfa0c5ed_0          conda-forge/win-64     Cached
  + aesara-base                                  2.8.2  py310h5588dad_0          conda-forge/win-64     Cached
  + argon2-cffi                                 21.3.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + argon2-cffi-bindings                        21.2.0  py310he2412df_2          conda-forge/win-64     Cached
  + arviz                                       0.12.1  pyhd8ed1ab_1             conda-forge/noarch     Cached
  + asttokens                                    2.0.8  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + attrs                                       22.1.0  pyh71513ae_1             conda-forge/noarch     Cached
  + backcall                                     0.2.0  pyh9f0ad1d_0             conda-forge/noarch     Cached
  + backports                                      1.0  py_2                     conda-forge/noarch     Cached
  + backports.functools_lru_cache                1.6.4  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + beautifulsoup4                              4.11.1  pyha770c72_0             conda-forge/noarch     Cached
  + blas                                         2.116  mkl                      conda-forge/win-64     Cached
  + blas-devel                                   3.9.0  16_win64_mkl             conda-forge/win-64     Cached
  + bleach                                       5.0.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + brotli                                       1.0.9  h8ffe710_7               conda-forge/win-64     Cached
  + brotli-bin                                   1.0.9  h8ffe710_7               conda-forge/win-64     Cached
  + bzip2                                        1.0.8  h8ffe710_4               conda-forge/win-64     Cached
  + ca-certificates                          2022.9.24  h5b45459_0               conda-forge/win-64     Cached
  + cachetools                                   5.2.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + certifi                                  2022.9.24  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + cffi                                        1.15.1  py310hcbf9ad4_0          conda-forge/win-64     Cached
  + cftime                                       1.6.2  py310h9b08ddd_0          conda-forge/win-64     Cached
  + cloudpickle                                  2.2.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + colorama                                     0.4.5  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + cons                                         0.4.5  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + contourpy                                    1.0.5  py310h232114e_0          conda-forge/win-64     Cached
  + curl                                        7.83.1  h789b8ee_0               conda-forge/win-64     Cached
  + cycler                                      0.11.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + debugpy                                      1.6.3  py310h8a704f9_0          conda-forge/win-64     Cached
  + decorator                                    5.1.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + defusedxml                                   0.7.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + entrypoints                                    0.4  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + etuples                                      0.3.8  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + executing                                    1.1.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + fastprogress                                 1.0.3  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + filelock                                     3.8.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + flit-core                                    3.7.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + fonttools                                   4.37.4  py310h8d17308_0          conda-forge/win-64     Cached
  + freetype                                    2.12.1  h546665d_0               conda-forge/win-64     Cached
  + gettext                                   0.19.8.1  h5728263_1009            conda-forge/win-64     Cached
  + glib                                        2.74.0  h12be248_0               conda-forge/win-64     Cached
  + glib-tools                                  2.74.0  h12be248_0               conda-forge/win-64     Cached
  + gst-plugins-base                            1.20.3  h001b923_2               conda-forge/win-64     Cached
  + gstreamer                                   1.20.3  h6b5321d_2               conda-forge/win-64     Cached
  + hdf4                                        4.2.15  h0e5069d_4               conda-forge/win-64     Cached
  + hdf5                                        1.12.2  nompi_h2a0e4a3_100       conda-forge/win-64     Cached
  + icu                                           70.1  h0e60522_0               conda-forge/win-64     Cached
  + importlib-metadata                          4.11.4  py310h5588dad_0          conda-forge/win-64     Cached
  + importlib_resources                          5.9.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + intel-openmp                              2022.1.0  h57928b3_3787            conda-forge/win-64     Cached
  + ipykernel                                   6.16.0  pyh025b116_0             conda-forge/noarch     Cached
  + ipython                                      8.5.0  pyh08f2357_1             conda-forge/noarch     Cached
  + ipython_genutils                             0.2.0  py_1                     conda-forge/noarch     Cached
  + ipywidgets                                   8.0.2  pyhd8ed1ab_1             conda-forge/noarch      112kB
  + jedi                                        0.18.1  pyhd8ed1ab_2             conda-forge/noarch     Cached
  + jinja2                                       3.1.2  pyhd8ed1ab_1             conda-forge/noarch     Cached
  + jpeg                                            9e  h8ffe710_2               conda-forge/win-64     Cached
  + jsonschema                                  4.16.0  pyhd8ed1ab_0             conda-forge/noarch       66kB
  + jupyter                                      1.0.0  py310h5588dad_7          conda-forge/win-64     Cached
  + jupyter_client                               7.3.5  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + jupyter_console                              6.4.4  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + jupyter_core                                4.11.1  py310h5588dad_0          conda-forge/win-64     Cached
  + jupyterlab_pygments                          0.2.2  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + jupyterlab_widgets                           3.0.3  pyhd8ed1ab_0             conda-forge/noarch      228kB
  + kiwisolver                                   1.4.4  py310h476a331_0          conda-forge/win-64     Cached
  + krb5                                        1.19.3  h1176d77_0               conda-forge/win-64     Cached
  + lcms2                                         2.12  h2a16943_0               conda-forge/win-64     Cached
  + lerc                                         4.0.0  h63175ca_0               conda-forge/win-64     Cached
  + libblas                                      3.9.0  16_win64_mkl             conda-forge/win-64     Cached
  + libbrotlicommon                              1.0.9  h8ffe710_7               conda-forge/win-64     Cached
  + libbrotlidec                                 1.0.9  h8ffe710_7               conda-forge/win-64     Cached
  + libbrotlienc                                 1.0.9  h8ffe710_7               conda-forge/win-64     Cached
  + libcblas                                     3.9.0  16_win64_mkl             conda-forge/win-64     Cached
  + libclang                                    14.0.6  default_h77d9078_0       conda-forge/win-64     Cached
  + libclang13                                  14.0.6  default_h77d9078_0       conda-forge/win-64     Cached
  + libcurl                                     7.83.1  h789b8ee_0               conda-forge/win-64     Cached
  + libdeflate                                    1.14  hcfcfb64_0               conda-forge/win-64     Cached
  + libffi                                       3.4.2  h8ffe710_5               conda-forge/win-64     Cached
  + libglib                                     2.74.0  h79619a9_0               conda-forge/win-64     Cached
  + libiconv                                      1.17  h8ffe710_0               conda-forge/win-64     Cached
  + liblapack                                    3.9.0  16_win64_mkl             conda-forge/win-64     Cached
  + liblapacke                                   3.9.0  16_win64_mkl             conda-forge/win-64     Cached
  + libnetcdf                                    4.8.1  nompi_h85765be_104       conda-forge/win-64     Cached
  + libogg                                       1.3.4  h8ffe710_1               conda-forge/win-64     Cached
  + libpng                                      1.6.38  h19919ed_0               conda-forge/win-64     Cached
  + libpython                                      2.2  py310h5588dad_1          conda-forge/win-64     Cached
  + libsodium                                   1.0.18  h8d14728_1               conda-forge/win-64     Cached
  + libsqlite                                   3.39.3  hcfcfb64_0               conda-forge/win-64     Cached
  + libssh2                                     1.10.0  h680486a_3               conda-forge/win-64     Cached
  + libtiff                                      4.4.0  h8e97e67_4               conda-forge/win-64     Cached
  + libvorbis                                    1.3.7  h0e60522_0               conda-forge/win-64     Cached
  + libwebp-base                                 1.2.4  h8ffe710_0               conda-forge/win-64     Cached
  + libxcb                                        1.13  hcd874cb_1004            conda-forge/win-64     Cached
  + libxml2                                     2.10.2  h99b13fb_1               conda-forge/win-64        4MB
  + libxslt                                     1.1.35  h34f844d_0               conda-forge/win-64     Cached
  + libzip                                       1.9.2  hfed4ece_1               conda-forge/win-64     Cached
  + libzlib                                     1.2.12  hcfcfb64_3               conda-forge/win-64     Cached
  + logical-unification                          0.4.5  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + lxml                                         4.9.1  py310he2412df_0          conda-forge/win-64     Cached
  + m2w64-binutils                              2.25.1  5                        conda-forge/win-64     Cached
  + m2w64-bzip2                                  1.0.6  6                        conda-forge/win-64     Cached
  + m2w64-crt-git                   5.0.0.4636.2595836  2                        conda-forge/win-64     Cached
  + m2w64-gcc                                    5.3.0  6                        conda-forge/win-64     Cached
  + m2w64-gcc-ada                                5.3.0  6                        conda-forge/win-64     Cached
  + m2w64-gcc-fortran                            5.3.0  6                        conda-forge/win-64     Cached
  + m2w64-gcc-libgfortran                        5.3.0  6                        conda-forge/win-64     Cached
  + m2w64-gcc-libs                               5.3.0  7                        conda-forge/win-64     Cached
  + m2w64-gcc-libs-core                          5.3.0  7                        conda-forge/win-64     Cached
  + m2w64-gcc-objc                               5.3.0  6                        conda-forge/win-64     Cached
  + m2w64-gmp                                    6.1.0  2                        conda-forge/win-64     Cached
  + m2w64-headers-git               5.0.0.4636.c0ad18a  2                        conda-forge/win-64     Cached
  + m2w64-isl                                   0.16.1  2                        conda-forge/win-64     Cached
  + m2w64-libiconv                                1.14  6                        conda-forge/win-64     Cached
  + m2w64-libmangle-git             5.0.0.4509.2e5a9a2  2                        conda-forge/win-64     Cached
  + m2w64-libwinpthread-git         5.0.0.4634.697f757  2                        conda-forge/win-64     Cached
  + m2w64-make                        4.1.2351.a80a8b8  2                        conda-forge/win-64     Cached
  + m2w64-mpc                                    1.0.3  3                        conda-forge/win-64     Cached
  + m2w64-mpfr                                   3.1.4  4                        conda-forge/win-64     Cached
  + m2w64-pkg-config                            0.29.1  2                        conda-forge/win-64     Cached
  + m2w64-toolchain                              5.3.0  7                        conda-forge/win-64     Cached
  + m2w64-toolchain_win-64                       2.4.0  0                        conda-forge/win-64     Cached
  + m2w64-tools-git                 5.0.0.4592.90b8472  2                        conda-forge/win-64     Cached
  + m2w64-windows-default-manifest                 6.4  3                        conda-forge/win-64     Cached
  + m2w64-winpthreads-git           5.0.0.4634.697f757  2                        conda-forge/win-64     Cached
  + m2w64-zlib                                   1.2.8  10                       conda-forge/win-64     Cached
  + markupsafe                                   2.1.1  py310he2412df_1          conda-forge/win-64     Cached
  + matplotlib-base                              3.6.0  py310h51140c5_0          conda-forge/win-64     Cached
  + matplotlib-inline                            0.1.6  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + minikanren                                   1.0.3  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + mistune                                      2.0.4  pyhd8ed1ab_0             conda-forge/noarch       69kB
  + mkl                                       2022.1.0  h6a75c08_874             conda-forge/win-64     Cached
  + mkl-devel                                 2022.1.0  h57928b3_875             conda-forge/win-64     Cached
  + mkl-include                               2022.1.0  h6a75c08_874             conda-forge/win-64     Cached
  + mkl-service                                  2.4.0  py310h3d5ec83_0          conda-forge/win-64     Cached
  + msys2-conda-epoch                         20160418  1                        conda-forge/win-64     Cached
  + multipledispatch                             0.6.0  py_0                     conda-forge/noarch     Cached
  + munkres                                      1.1.4  pyh9f0ad1d_0             conda-forge/noarch     Cached
  + nbclient                                     0.6.8  pyhd8ed1ab_0             conda-forge/noarch       67kB
  + nbconvert                                    7.0.0  pyhd8ed1ab_0             conda-forge/noarch        6kB
  + nbconvert-core                               7.0.0  pyhd8ed1ab_0             conda-forge/noarch      194kB
  + nbconvert-pandoc                             7.0.0  pyhd8ed1ab_0             conda-forge/noarch        5kB
  + nbformat                                     5.6.1  pyhd8ed1ab_0             conda-forge/noarch      109kB
  + nest-asyncio                                 1.5.5  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + netcdf4                                      1.6.1  nompi_py310h459bb5f_100  conda-forge/win-64     Cached
  + notebook                                    6.4.12  pyha770c72_0             conda-forge/noarch     Cached
  + numpy                                       1.23.3  py310h4a8f9c9_0          conda-forge/win-64     Cached
  + openjpeg                                     2.5.0  hc9384bd_1               conda-forge/win-64     Cached
  + openssl                                     1.1.1q  h8ffe710_0               conda-forge/win-64     Cached
  + packaging                                     21.3  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pandas                                       1.5.0  py310h1c4a608_0          conda-forge/win-64     Cached
  + pandoc                                      2.19.2  h57928b3_0               conda-forge/win-64       20MB
  + pandocfilters                                1.5.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + parso                                        0.8.3  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pcre2                                        10.37  hdfff0fc_1               conda-forge/win-64     Cached
  + pickleshare                                  0.7.5  py_1003                  conda-forge/noarch     Cached
  + pillow                                       9.2.0  py310h52929f7_2          conda-forge/win-64     Cached
  + pip                                         22.2.2  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pkgutil-resolve-name                        1.3.10  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + ply                                           3.11  py_1                     conda-forge/noarch     Cached
  + prometheus_client                           0.14.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + prompt-toolkit                              3.0.31  pyha770c72_0             conda-forge/noarch     Cached
  + prompt_toolkit                              3.0.31  hd8ed1ab_0               conda-forge/noarch        5kB
  + psutil                                       5.9.2  py310h8d17308_0          conda-forge/win-64     Cached
  + pthread-stubs                                  0.4  hcd874cb_1001            conda-forge/win-64     Cached
  + pure_eval                                    0.2.2  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pycparser                                     2.21  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pygments                                    2.13.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pymc                                         4.2.0  hd8ed1ab_0               conda-forge/noarch     Cached
  + pymc-base                                    4.2.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pyparsing                                    3.0.9  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pyqt                                        5.15.7  py310hbabf5d4_0          conda-forge/win-64     Cached
  + pyqt5-sip                                  12.11.0  py310h8a704f9_0          conda-forge/win-64     Cached
  + pyrsistent                                  0.18.1  py310he2412df_1          conda-forge/win-64     Cached
  + python                                      3.10.6  h9a09f29_0_cpython       conda-forge/win-64     Cached
  + python-dateutil                              2.8.2  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + python-fastjsonschema                       2.16.2  pyhd8ed1ab_0             conda-forge/noarch      247kB
  + python_abi                                    3.10  2_cp310                  conda-forge/win-64     Cached
  + pytz                                      2022.2.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + pywin32                                        303  py310he2412df_0          conda-forge/win-64     Cached
  + pywinpty                                     2.0.8  py310h00ffb61_0          conda-forge/win-64      235kB
  + pyzmq                                       24.0.1  py310hcd737a0_0          conda-forge/win-64     Cached
  + qt-main                                     5.15.6  hf0cf448_0               conda-forge/win-64     Cached
  + qtconsole                                    5.3.2  pyhd8ed1ab_0             conda-forge/noarch        6kB
  + qtconsole-base                               5.3.2  pyha770c72_0             conda-forge/noarch       93kB
  + qtpy                                         2.2.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + scipy                                        1.9.1  py310h578b7cb_0          conda-forge/win-64     Cached
  + send2trash                                   1.8.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + setuptools                                  65.4.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + sip                                          6.6.2  py310h8a704f9_0          conda-forge/win-64     Cached
  + six                                         1.16.0  pyh6c4a22f_0             conda-forge/noarch     Cached
  + soupsieve                              2.3.2.post1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + stack_data                                   0.5.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + tbb                                       2021.6.0  h91493d7_0               conda-forge/win-64     Cached
  + terminado                                   0.16.0  pyh08f2357_0             conda-forge/noarch       19kB
  + tinycss2                                     1.1.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + tk                                          8.6.12  h8ffe710_0               conda-forge/win-64     Cached
  + toml                                        0.10.2  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + toolz                                       0.12.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + tornado                                        6.2  py310he2412df_0          conda-forge/win-64     Cached
  + traitlets                                    5.4.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + typing-extensions                            4.3.0  hd8ed1ab_0               conda-forge/noarch     Cached
  + typing_extensions                            4.3.0  pyha770c72_0             conda-forge/noarch     Cached
  + tzdata                                       2022d  h191b570_0               conda-forge/noarch     Cached
  + ucrt                                  10.0.20348.0  h57928b3_0               conda-forge/win-64     Cached
  + unicodedata2                                14.0.0  py310he2412df_1          conda-forge/win-64     Cached
  + vc                                            14.2  hb210afc_7               conda-forge/win-64     Cached
  + vs2015_runtime                         14.29.30139  h890b9b1_7               conda-forge/win-64     Cached
  + wcwidth                                      0.2.5  pyh9f0ad1d_2             conda-forge/noarch     Cached
  + webencodings                                 0.5.1  py_1                     conda-forge/noarch     Cached
  + wheel                                       0.37.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + widgetsnbextension                           4.0.3  pyhd8ed1ab_0             conda-forge/noarch        2MB
  + winpty                                       0.4.3  4                        conda-forge/win-64     Cached
  + xarray                                    2022.9.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + xarray-einstats                              0.3.0  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + xorg-libxau                                  1.0.9  hcd874cb_0               conda-forge/win-64     Cached
  + xorg-libxdmcp                                1.1.3  hcd874cb_0               conda-forge/win-64     Cached
  + xz                                           5.2.6  h8d14728_0               conda-forge/win-64     Cached
  + zeromq                                       4.3.4  h0e60522_1               conda-forge/win-64     Cached
  + zipp                                         3.8.1  pyhd8ed1ab_0             conda-forge/noarch     Cached
  + zstd                                         1.5.2  h7755175_4               conda-forge/win-64     Cached

  Summary:

  Install: 222 packages

‘jupyter’ console:

Summary
(pymc_env_stricter) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> jupyter notebook
[I 09:13:21.728 NotebookApp] Serving notebooks from local directory: C:\Opher\GitHub\bsf_donchin_jordan_2022
[I 09:13:21.729 NotebookApp] Jupyter Notebook 6.4.12 is running at:
[I 09:13:21.731 NotebookApp] http://localhost:8888/?token=f1c28d585e18b20639ee64116f2b1c1e8516beeef1e209e3
[I 09:13:21.732 NotebookApp]  or http://127.0.0.1:8888/?token=f1c28d585e18b20639ee64116f2b1c1e8516beeef1e209e3
[I 09:13:21.733 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 09:13:22.145 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/Opher%20local/AppData/Roaming/jupyter/runtime/nbserver-13504-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=f1c28d585e18b20639ee64116f2b1c1e8516beeef1e209e3
     or http://127.0.0.1:8888/?token=f1c28d585e18b20639ee64116f2b1c1e8516beeef1e209e3
[W 09:13:38.811 NotebookApp] Notebook identify_processes.ipynb is not trusted
[I 09:13:40.706 NotebookApp] Kernel started: f863db88-6541-483e-8ed7-038e660b8d12, name: python3
[W 09:13:43.890 NotebookApp] 404 GET /static/components/MathJax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf (::1) 80.000000ms referer=http://localhost:8888/notebooks/identify_processes.ipynb
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: 390bbe98-6564-4ce5-9d21-3fe472b3869a
[I 09:15:40.547 NotebookApp] Saving file at /identify_processes.ipynb

Thanks for this. I think it might work, but I’m missing a key step.

I tried running this cell before the sampling:

import sys
import os

flags = [
    os.path.join(sys.prefix, "Library", "bin", "mkl_core.1.dll"),
    os.path.join(sys.prefix, "Library", "bin", "mkl_intel_thread.1.dll"),
    os.path.join(sys.prefix, "Library", "bin", "mkl_rt.1.dll"),
]

But, of course, when I then ran the sampler as before, nothing changed.

with model:
  fit = pm.sample()

That’s expected since all I did was set some variable. I need to somehow pass those flags on to aesara, right?

Thanks,
Opher

Just to make sure try to run it in a python console. It has happened that a user is not using the environment they think they are when using jupyter.

This also made no difference (I copied only the first part of the output. I didn’t check it, but I assume it’s identical’).

The .py file is just the .ipynb exported. I’ll copy it in as a summary.

(pymc_env_stricter) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> python mkl_rt_test.py

You can find the C code in this temporary file: C:\Users\OPHERL~1\AppData\Local\Temp\aesara_compilation_error_t2nj7zi5
library mkl_rt is not found.
Traceback (most recent call last):

mkl_rt_test.py

Summary
# %%
import numpy as np
import math
import random
import pandas as pd
import pymc as pm
import arviz as az

# %% [markdown]
# # The identification engine (part 1)

# %% [markdown]
# We will first test the identification engine on data built directly from the indentification model rather than using it on data simulated from a learning experiment.

# %% [markdown]
# ## The model

# %% [markdown]
# This is supposed to be the identification engine that will take measures of adaptation and skill and attempt to assess how many processes are actually involved. 
# 
# The governing equation from the grant is 
# 
# $$
# y_{s,m} = \beta_{0,m} + \sum_{p=1}^{P}{x_{s,p}\beta_{p,m}} + \varepsilon_{s,m}
# $$
# 
# Where the symbols mean:
# - $s$ : subject index
# - $m$ : measure index
# - $p$ : hidden process index
# - $y_{s,m}$ : actual data for subject $s$ in measure $m$
# - $\beta_{0,m}$ : mean of measure $m$ across subjects
# - $x_{s,p}$ : state of process $p$ for subject $s$
# - $\beta_{p,m}$ : influence of proccess $p$ on measure $m$
# - $\varepsilon_{s,m}$ : noise for individual subject $s$ in measure $m$
# 
# Of course, for starters we will assume that the noise in measurements is normal (although a $t$ distribution would probably work better), although perhaps some subjects are noisier than others. I'll also assume for now that the measures are normalized from 0 to 1 so that we don't have different variances for each:
# 
# $$
# \varepsilon_{s,m} \sim \mathcal{N}(0, \sigma_s)
# $$
# 
# In addition, each subject belongs to an experimental group $g(s)$ and we assume that the subjects in that group have similar engagements in each of the different processes:
# 
# $$
# x_{s,p} \sim \mathcal{N}(\mu_{g(s), p}, \sigma_p)
# $$
# 
# The full model inclues a modulation of the effects of a process ($\beta_{p,m}$) by reward, but we'll leave that out for now.
# 

# %%
# Let's just assume all of our subjects have the same noise for now
sigma_s = 0.1
# Similarly, the processes are normalized so that they have the same noise
sigma_p = 0.2


# %% [markdown]
# ## Simulating data from the model

# %% [markdown]
# ### Measures and processes

# %% [markdown]
# In this initial simulation there will be 2 processes: 
# 
# - $sr$ : strategic re-aiming
# - $rc$ : recalibration
# 
# And there will be 6 measures, three adaptation measures and three measures of skill:
# 
# - Measures of adaptation
#   - $lr$ : learning rate
#   - $la$ : learning asymptote
#   - $af$ : aftereffect
# - Measures of skill
#   - $pr$ : preparation time required
#   - $gn$ : generalization width
#   - $fb$ : extent of feedback response

# %%
num_processes = 2
sr = 0
rc = 1
num_measures = 6
lr = 0
la = 1
af = 2
pr = 3
gn = 4
fb = 5

measure_names = ['lr', 'la', 'af', 'pr', 'gn', 'fb']

# %%
#              beta_0   sr     rc
beta_vals = [ (0.5,     0.9,   0.1) , # Learning rate
              (0.5,     0.3,   0.7) , # Learning asymptote
              (0.5,     0.0,   1.0) , # Aftereffect
              (0.5,     1.0,   0.0) , # Preparation time improvement
              (0.5,     0.2,   0.8) , # Generalization widening
              (0.5,     0.0,   1.0) , # Feedback response improving
              ]
# Create DataFrame object from a list of tuples
beta = pd.DataFrame(beta_vals, columns = ['0', 'sr', 'rc'], index=measure_names)
beta

# %% [markdown]
# ### Groups

# %% [markdown]
# The grant describes 10 groups:
# - Experiment 1 ($N=60$ pre group)
#   - Low-PT : low preparation time, reduced $sr$
#   - High-PT : no special effect
# - Experiment 2 ($N = 60$ per group)
#   - Immediate : immediate feedback after movement, no special effect
#   - Delay : Delay in feedback, reduced $rc$
# - Experiment 3 ($N=30$ per group)
#   - NoStrat25, NoStrat75 : Same as Low-PT group of experiment 1
#   - NoRecal25, NoRecal75 : Same as Delay group of experiment 1
#   - NoBoth25, NoBoth75 : reduction in both $sr$ and $rc$
# 

# %%
# mu is the average engagement of each group in each process
#              sr     rc
group_names = ['LowPT', 'HighPT', 'Imm', 'Delay', 'NoStrat25', 'NoStrat75', 'NoRecal25', 'NoRecal75', 'NoBoth25', 'NoBoth75']
mu_vals =   [ (0.05,  0.5)  , # Low-PT
              (0.5,   0.5)  , # High-PT
              (0.5,   0.5)  , # Immediate
              (0.5,   0.05) , # Delay
              (0.05,  0.5)  , # NoStrat25
              (0.05,  0.5)  , # NoStrat75
              (0.5,   0.05) , # NoRecal25
              (0.5,   0.05) , # NoRecal75
              (0.05,  0.05) , # NoBoth25
              (0.05,  0.05) , # NoBoth75             
             ]
mu = pd.DataFrame(mu_vals, columns = ['sr', 'rc'], index=group_names)
mu

# %%
group_N_vals =   [ (60)  , # Low-PT
              (60)  , # High-PT
              (60)  , # Immediate
              (60) , # Delay
              (30)  , # NoStrat25
              (30)  , # NoStrat75
              (30) , # NoRecal25
              (30) , # NoRecal75
              (30) , # NoBoth25
              (30) , # NoBoth75             
             ]
group_N = pd.DataFrame(group_N_vals, columns = ['N'], index=group_names, dtype="int")
group_N

# %% [markdown]
# ## Generate subjects

# %%
groups = pd.concat((mu, group_N), axis=1)
groups

# %%
y_columns = ['group'].append(measure_names)
y = pd.DataFrame(columns=y_columns)
for gp in groups.itertuples():
  sr = random.normalvariate(gp.sr, sigma_p)
  rc = random.normalvariate(gp.rc, sigma_p)

  this_x =pd.DataFrame({"0": [1]*gp.N, "sr": sr, "rc": rc})
  these_measures = random.normalvariate(this_x.dot( beta.T ), sigma_s)
  these_measures['group'] = gp.Index
  y = pd.concat([y,these_measures], ignore_index=True)
y

# %% [markdown]
# ## Build PyMC model

# %% [markdown]
# ### Reparameterization of gamma distribution

# %% [markdown]
# I never remember the formula for parameter transformation for the Gamma distribution. To match the PyMC documentation, we use $\alpha$ for the shape parameter and $\beta$ for the rate parameter.
# 
# If $\alpha \ge 1$:
# $$
# m = \frac{\alpha - 1}{\beta} \\
# v = \frac{\alpha}{\beta^2}
# $$
# So:
# $$
# \alpha = v \beta^2 \\
# m = \frac{v \beta^2 - 1}{\beta} \\
# m \beta = v\beta^2 - 1 \\
# 0 = v \beta^2 - m \beta -1 \\
# \beta = \frac{m + \sqrt{m^2 + 4 v}}{2v}
# $$
# And
# $$
# \alpha = 1+m\beta
# $$
# Note that this means there is a Gamma distribution regardless of your choice of mode and variance (as long as both are positive or 0).
# 

# %%
def gamma_mv2sr(m, v):
  r = (m + np.sqrt(m*m + 4*v)) / (2*v)
  s = 1 + m*r
  return (s, r)

def gamma_sr2mv(s,r):
  if s>1:
    m = (s-1) / r
  else:
    m = 0
  v = s / r^2
  return (m,v)


# %% [markdown]
# ### Prior parameters

# %%
sigma_p_mode = 0.5
sigma_p_s = 0.5
sigma_y_mode = 0.5
sigma_y_s = 0.5
beta_0_mu = 0.5
beta_0_s = 1
beta_mu = 0
beta_s = 1.5
mu_g_mu = 0.5
mu_g_s = 1.0

# %% [markdown]
# ### Define model

# %%
def latent_variable_model(y,groups,P):
  gp_idx, group_list = pd.factorize(groups, sort=True)
  s_idx, subject_list = pd.factorize(y.index)
  m_idx, measure_list = pd.factorize(y.columns)

  sigma_p_shape, sigma_p_rate = gamma_mv2sr(sigma_p_mode, sigma_p_s*sigma_p_s)
  sigma_y_shape, sigma_y_rate = gamma_mv2sr(sigma_y_mode, sigma_y_s*sigma_y_s)

  coords = {'subject': subject_list, 'measure': measure_list, 'group':group_list, 'process': range(P)}
  with pm.Model(coords=coords) as model:
    # Priors
    sigma_p = pm.Gamma("sigma_p", alpha=sigma_p_shape, beta=sigma_p_rate)
    sigma_y = pm.Gamma("sigma_y", alpha=sigma_y_shape, beta=sigma_p_rate)
    beta_0 = pm.Normal('beta_0', mu=beta_0_mu, sigma=beta_0_s, dims='measure')
    beta = pm.Normal('beta', mu=beta_mu, sigma=beta_s, dims=['process', 'measure'])
    mu_g = pm.Normal('mu_g', mu=mu_g_mu, sigma=mu_g_s, dims=['group', 'process'])
    # Latent variables
    x = pm.Normal('x', mu=mu_g[gp_idx,:], sigma=sigma_p, dims=['subject', 'process'])
    mu_y = pm.Deterministic('mu_y', beta_0 + pm.math.dot(x,beta), dims=['subject', 'measure'])

    # Likelihood 
    obs_y = pm.Normal('obs_y', mu=mu_y, sigma=sigma_y, observed=y, dims=['subject', 'measure'])
  return model

model = latent_variable_model(y.drop('group',axis=1), y['group'], 2)

with model:
  fit = pm.sample()
az.to_netcdf(fit, 'model_samples.ncdf')

@lucianopaz ::

I took some initiative and looked in os.path.join(sys.prefix, "Library", "bin"). There were not files there named

  • mkl_core.1.dll
  • mkl_intel_thread.1.dll
  • mkl_rt.1.dll

Instead, there were files:

  • mkl_core.2.dll
  • mkl_intel_thread.2.dll
  • mkl_rt.2.dll

I tried re-running with this command:

ae.config.blas__ldflags = '-l' + os.path.join(sys.prefix, "Library", "bin", "mkl_core.2.dll")
with model:
  fit = pm.sample()

with each of the three files in place of mkl_core.2.dll. Sadly, I consistently got:

You can find the C code in this temporary file: C:\Users\OPHERL~1\AppData\Local\Temp\aesara_compilation_error_xloxd2_8
library c:\miniconda3\envs\pymc_env_strict\Library\bin\mkl_core.2.dll is not found.

Again with each of the three file names in place of mkl_core.2.dll.

Here is the directory listing demonstrating the files are there:

Summary
(pymc_env_stricter) PS C:\Opher\GitHub\bsf_donchin_jordan_2022> dir c:\miniconda3\envs\pymc_env_strict\Library\bin\mkl_*.*


    Directory: C:\miniconda3\envs\pymc_env_strict\Library\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         3/11/2022   5:07 PM       45636624 mkl_avx.2.dll
-a----         3/11/2022   5:07 PM       43434512 mkl_avx2.2.dll
-a----         3/11/2022   5:07 PM       58471440 mkl_avx512.2.dll
-a----         3/11/2022   5:07 PM         561168 mkl_blacs_ilp64.2.dll
-a----         3/11/2022   5:07 PM         134160 mkl_blacs_intelmpi_ilp64.2.dll
-a----         3/11/2022   5:07 PM         134160 mkl_blacs_intelmpi_lp64.2.dll
-a----         3/11/2022   5:07 PM         314384 mkl_blacs_lp64.2.dll
-a----         3/11/2022   5:07 PM         134160 mkl_blacs_msmpi_ilp64.2.dll
-a----         3/11/2022   5:07 PM         134160 mkl_blacs_msmpi_lp64.2.dll
-a----         3/11/2022   5:07 PM         394768 mkl_cdft_core.2.dll
-a----         3/11/2022   5:07 PM       78395408 mkl_core.2.dll
-a----         3/11/2022   5:07 PM       39064080 mkl_def.2.dll
-a----         3/11/2022   5:07 PM       54769168 mkl_intel_thread.2.dll
-a----         3/11/2022   5:07 PM       42948624 mkl_mc.2.dll
-a----         3/11/2022   5:07 PM       44279312 mkl_mc3.2.dll
-a----         3/11/2022   5:07 PM         192528 mkl_msg.dll
-a----         3/11/2022   5:07 PM       53516304 mkl_pgi_thread.2.dll
-a----         3/11/2022   5:07 PM       25820688 mkl_rt.2.dll
-a----         3/11/2022   5:07 PM        7735312 mkl_scalapack_ilp64.2.dll
-a----         3/11/2022   5:07 PM        7720976 mkl_scalapack_lp64.2.dll
-a----         3/11/2022   5:07 PM       25607184 mkl_sequential.2.dll
-a----         3/11/2022   5:07 PM       31452688 mkl_tbb_thread.2.dll
-a----         3/11/2022   5:07 PM       16558608 mkl_vml_avx.2.dll
-a----         3/11/2022   5:07 PM       15564304 mkl_vml_avx2.2.dll
-a----         3/11/2022   5:07 PM       14673936 mkl_vml_avx512.2.dll
-a----         3/11/2022   5:07 PM        8022032 mkl_vml_cmpt.2.dll
-a----         3/11/2022   5:07 PM        8955408 mkl_vml_def.2.dll
-a----         3/11/2022   5:07 PM       15656464 mkl_vml_mc.2.dll
-a----         3/11/2022   5:07 PM       15373840 mkl_vml_mc2.2.dll
-a----         3/11/2022   5:07 PM       15396368 mkl_vml_mc3.2.dll
1 Like

@opherdonchin , if it’s anything like the issue that I mentioned, you won’t be able to fix it using ldflags. Those will get a -l prepend and won’t link properly. The PR where I had fixed the old issue did some things to link to the full path of the dynamic link library, but it had to do so in aesara itself. I think that you’ll have to open an issue in aesara to get this fixed. I can help out with this after Monday

1 Like

Thanks @lucianopaz for the insight! To keep this moving, I have opened an issue in Aesara.

@opherdonchin, if it executes, could you please provide the output of the command python -c "import aesara; print(aesara.config)" either here or in the issue on GitHub?

1 Like

Thanks @maresb and @lucianopaz! I posted the aesara.config output over there. I’ll follow the issue furhter in the aesara issue on Github.

Once that’s sorted, though, I’d be motivated to figure out how to propogate the solution up to the pymc level in the sense of either providing informative error messages and/or providing wrappers so that the user isn’t required to interact directly with aesara.

I want to use pymc in my teaching and that really motivates me to imagine something where the underside is well wrapped.

Opher

1 Like

Thanks @opherdonchin, any contributions to PyMC would be very much appreciated, especially those that fix rough edges in the interface with Aesara and improve the user experience!

1 Like

Will look forward to doing this as soon as we know what the answer is!

In the meantime, @brandonwillard over at the aesara Github issue seems to want a pymc-free version of the problem. I have no idea how to go about generating this. Does someone here know how?

I posted over there my minimal pymc version of the problem, but I don’t know what the next step would be.

Opher

I’ll help you out @opherdonchin. Could you tell me what your sys.prefix is? I’ll be able to try your model out on a windows machine tomorrow.

@opherdonchin, I just replied over at the github issue that I couldn’t reproduce your problem. I think that this indicates that some blas flags are not being set properly, or are being read from somewhere that you are unaware of (an .aesararc file or an environment variable?).

Anyway, I wanted to take the chance to post here a patch that should make your model sample correctly. After looking at the code I wrote for the aesara PR regarding the ldflags, it looks like you should be able to specify the full blas__ldflags to make the compiler link the correct libraries. Try to do:

aesara.config.blas__ldflags = f'"-L{os.path.join(sys.prefix, "Library", "bin")}" -lmkl_core -lmkl_intel_thread -lmkl_rt'

Sorry that I didn’t realize earlier that you could patch up your flags like this to include the library directories.