Julia: Difference between revisions

Jump to navigation Jump to search
21 bytes removed ,  4 years ago
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


<!--T:15-->
{{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
<pre>
<!--T:15-->
srun hostname -s > hostfile
srun hostname -s > hostfile
</pre>
 
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
<pre>
 
julia --machine-file ./hostfile ./pi_p.jl 1000000000000000
<!--T:16-->
</pre>
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.
<!--T:16-->


= Videos =
= Videos =
cc_staff
9

edits

Navigation menu