# Problems in calling multiprocess functions on github actions

**URL:** <https://discourse.julialang.org/t/problems-in-calling-multiprocess-functions-on-github-actions/75905>\
**Category:** General Usage\
**Tags:** distributed, github-actions\
**Created:** [February 6, 2022, 5:30pm UTC](https://discourse.julialang.org/t/problems-in-calling-multiprocess-functions-on-github-actions/75905 "2022-02-06T17:30:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [February 6, 2022, 5:30pm UTC](https://discourse.julialang.org/t/problems-in-calling-multiprocess-functions-on-github-actions/75905/1 "2022-02-06T17:30:13Z")

</div>

I am writing a Julia course, where the script is compiled to MD and then to HTML using Literate.jl and Documenter.jl on GitHub actions.

The problem is in this snippet:

```julia
using Distributed, BenchmarkTools
a = rand(1:35,100)
addprocs(3) 
rmprocs(workers()[2])
@everywhere function fib(n)
    if n == 0 return 0 end
    if n == 1 return 1 end
    return fib(n-1) + fib(n-2)
end
result = pmap(fib,a) 

```

[complete script](https://github.com/sylvaticus/IntroSPMLJuliaCourse/blob/main/lessonsSources/01_-_JULIA1_-_Basic_Julia_programming/0106-further_topics.jl)

With GitHub action complaining `LoadError: UndefVarError: fib not defined`.  
Where is the problem? On my PC it works correctly, as I “send” the Fibonacci function to every process with `@everywhere`…

EDIT  
It seems to be more general, GitHub actions raise errors on any call on multiprocess functions, also when I use the `@distributed` macro :-/
