# Running a single Julia script simultaneously on different workers, each with different input parameters

**URL:** https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902
**Category:** General Usage
**Tags:** question, parallel, scripting
**Created:** [August 5, 2021, 6:01pm UTC](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902 "2021-08-05T18:01:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rachithaiyappa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rachithaiyappa/32/22206_2.png) [@rachithaiyappa](https://discourse.julialang.org/u/rachithaiyappa)
#### Post date: [August 5, 2021, 6:01pm UTC](https://discourse.julialang.org/t/running-a-single-julia-script-simultaneously-on-different-workers-each-with-different-input-parameters/65902/1 "2021-08-05T18:01:30Z")

</div>

I’m trying to run a script `main.jl` simultaneously on multiple workers, each worker having a different input parameter for the script. The skeleton code looks something like this. This results in a `could not open file` error where it treats, for example, `julia --project=. main.jl -p 1` as a file instead of a command to be executed on the specific worker. Any suggestions on how to do this?

`using Distributed`  
`using IterTools`  
`using StatsBase`  
`addprocs(3)`  
`parameters = collect(LinRange(1,3,2))`  
`processes = collect(((round(i[1],digits=2),"main.jl") for i in parameters))`  
`processes = collect("julia --project=. $(process[2]) -p1 $(process[1])" for process in processes)`  
`pmap(include,processes)`

The above script is similar to [this answer](https://stackoverflow.com/a/41470273/11498355)  
I suspect the `pmap(include,processes)` is not the right way to do it in my case?
