cc_staff
9
edits
Line 66: | Line 66: | ||
The following is an example of running a parallel Julia code computing pi using 1000 cores across nodes on a cluster | The following is an example of running a parallel Julia code computing pi using 1000 cores across nodes on a cluster | ||
{{File | {{File | ||
|name=run_julia_pi.sh | |name=run_julia_pi.sh | ||
Line 86: | Line 85: | ||
In this example, the command | In this example, the command | ||
< | <!--T:15--> | ||
srun hostname -s > hostfile | srun hostname -s > hostfile | ||
generates a list of names of the nodes allocated and writes it to the text file hostfile. Then the command | generates a list of names of the nodes allocated and writes it to the text file hostfile. Then the command | ||
< | |||
julia --machine-file ./hostfile ./pi_p.jl 1000000000000000 | <!--T:16--> | ||
julia --machine-file ./hostfile ./pi_p.jl 1000000000000000 | |||
starts 1+1000 julia processes on the nodes specified in the hostfile and runs the parallel Julia code pi_p.jl in parallel. | starts 1+1000 julia processes on the nodes specified in the hostfile and runs the parallel Julia code pi_p.jl in parallel. | ||
= Videos = | = Videos = |