@@ -10,51 +10,5 @@ export JULIA_NUM_THREADS=<number of threads>
1010For enabling multi-threading on other shells/systems please see the julia parallel-computing
1111docs here: https://docs.julialang.org/en/v1/manual/parallel-computing/ .
1212
13- ## Distributed Processing
14- Distributed parallel processing is available for the calculation of annual energy production (AEP).
15-
16- You may have to add ` using Distributed ` to your julia script and use the ` @everywhere ` macro
17- in front of any functions you define that all processors will need access to. For an example,
18- see ` example_opt_6_38turb_round_distributed.jl ` .
19-
20- ### Using Distributed Processing without an HPC Cluster Manager (e.g. on your local system)
21-
22- Distributed parallel processing can be enabled as follows when launching a julia session:
23-
24- ```
25- julia -p <number of processors>
26- ```
27-
28- ### Using Distributed Processing with an HPC Cluster Manager (e.g. SLURM)
29-
30- The ` -p ` option to the julia call is unnecessary when running with a cluster manager.
31- To work with cluster managers, add the following to your julia script (this example is for
32- SLURM, but other managers are available as well):
33-
34- ```
35- using Distributed
36- using ClusterManagers
37-
38- addprocs(SlurmManager(parse(Int, ENV["SLURM_NTASKS"])-1))
39- @everywhere import FLOWFarm; const ff = FLOWFarm
40- ```
41-
42- Also include the ` @everywhere ` macro in front of any function definitions or include statements
43- in your julia script that all processors will need access to.
44-
45- Your SLURM job script should look something like this:
46-
47- ```
48- #!/bin/bash -l
49- #SBATCH --ntasks=100
50- #SBATCH --mem-per-cpu=1024M # memory per CPU core
51- #SBATCH --time=01:00:00 # time=HH:MM:SS
52- #SBATCH -J "Your job name here" # job name
53-
54- module load julia
55-
56- julia julia_script.jl
57- ```
58-
5913** References**
6014For more information on using julia in a distributed environment, please see https://docs.julialang.org/en/v1/manual/parallel-computing/ .
0 commit comments