# Pointer error

**URL:** <https://discourse.julialang.org/t/pointer-error/36341>\
**Category:** Julia at Scale\
**Tags:** parallel\
**Created:** [March 22, 2020, 11:31am UTC](https://discourse.julialang.org/t/pointer-error/36341 "2020-03-22T11:31:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Pbellive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbellive/32/3604_2.png) [@Pbellive](https://discourse.julialang.org/u/Pbellive)\
**Post date:** [March 25, 2020, 11:57pm UTC](https://discourse.julialang.org/t/pointer-error/36341/2 "2020-03-25T23:57:24Z")

</div>

Hi @marouane1994. You haven’t included enough information to be able to tell why you’re getting that particular error. You might want to have a look at the following post for some tips that will help you update your post in a way that will help us narrow down the source of your problem:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

Having said that, here are a few thoughts that might be helpful. First, I could be wrong but it seems like you’re trying your first experiments with threading in julia on a complex example. It would be a good idea to try out threading on some self-contained very simple toy examples so you understand the basics of how threading works before trying to apply it to your existing mcmc code. The examples in the following blog post on threading in julia are a good place to start:

> **[Announcing composable multi-threaded parallelism in Julia](https://julialang.org/blog/2019/07/multithreading/)**
>
> Announcing composable multi-threaded parallelism in Julia | Software performance depends more and more on exploiting multiple processor cores....

Along with the [parallel computing section](https://docs.julialang.org/en/v1/manual/parallel-computing/) of the julia manual. Reading through the whole parallel computing manual section is probably a good idea.

Secondly, are you trying to combine distributed memory parallelism and threading? The @everywhere call is used for distributed memory computing. The call

```julia
julia> @everywhere include("parallel_mcmc.jl")

```

will run `julia> include("parallel_mcmc.jl")` on all of the julia worker processes attached to your current julia instance. Worker processes are separate julia processes with their own memory address spaces that communicate with the master julia process by passing messages. They are completely separate from threading. So unless you’re mixing distributed memory parallel computing and threading, you’ll want to get rid of the `@everywhere statement`

---

_[View the full topic](https://discourse.julialang.org/t/pointer-error/36341)._
