Difference between revisions of "Julia"

(Created page with "== Description == ''From the Julia website'': '''Julia''' is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar...")
 
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
''From the Julia website'': '''Julia''' is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing. In addition, the Julia developer community is contributing a number of external packages through Julia’s built-in package manager at a rapid pace.
''From the Julia website'': '''Julia''' is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing. In addition, the Julia developer community is contributing a number of external packages through Julia’s built-in package manager at a rapid pace.


{{AppStandardHeader|0.3.7-pre1|julia}}
{{AppStandardHeader|0.5.2|julia}}


== Using Julia on CIRCE ==
== Using Julia on CIRCE/SC ==


Once you add the module above, you can either invoke the Julia interpreter interactively by typing:
Once you add the module above, you can either invoke the Julia interpreter interactively by typing:


<pre style="white-space:pre-wrap; width:20%; border:1px solid lightgrey; background:#000000; color:white;">
<pre style="white-space:pre-wrap; width:20%; border:1px solid lightgrey; background:#000000; color:white;">
[user@login0 ~]$ julia
[user@itn0 ~]$ julia
</pre>&nbsp;<br>
</pre>&nbsp;<br>


or, you can specify a julia source code file, with any applicable arguments:
or, you can specify a Julia source code file, with any applicable arguments:


<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">
<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">
[user@login0 ~]$ julia helloworld.jl arg1 arg2…
[user@itn0 ~]$ julia helloworld.jl arg1 arg2…
</pre>
</pre>
==== Jobs Longer than 30 Minutes in Length ====
To run Julia jobs on CIRCE/SC, users will need to submit their jobs to the scheduling environment if their jobs take more than 30 minutes to run on a standard PC.
If, for example, you have a Julia script file named julia-test.jl with all your functions defined in it, you would set up a submit script to use like this:
*The script below (for testing, name it “julia-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue.
<pre style="white-space:pre-wrap; width:55%; border:1px solid lightgrey; background:#E0E0E0; color:black;">
#!/bin/bash
#SBATCH --job-name=julia-test
#SBATCH --time=01:00:00
#SBATCH --nodes=2
#SBATCH --ntasks=4
#SBATCH --mem-per-cpu=2048
#SBATCH --output=julia-test.%j.txt
module purge
module initadd apps/julia/0.5.2
export SLURM_NODEFILE='generate_pbs_nodefile'
cp $SLURM_NODEFILE ./nodefile
mpirun julia --machinefile ./nodefile julia-test.jl
module initrm apps/julia/0.5.2
</pre>
&nbsp; <br>
Next, verify that you are in your job’s directory, and run the sbatch command to submit the job:
<pre style="white-space:pre-wrap; width:45%; border:1px solid lightgrey; background:#000000; color:white;">
[user@itn0 ~]$ cd my/jobdir
[user@itn0 jobdir]$ sbatch ./julia-test.sh</pre>
&nbsp; <br>
This will submit a 2 node, 8 total cpu core job with 2 GB of memory per core and a 1 hour job time.


{{Documentation}}
{{Documentation}}

Latest revision as of 15:27, 13 March 2023

Description

From the Julia website: Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing. In addition, the Julia developer community is contributing a number of external packages through Julia’s built-in package manager at a rapid pace.

Version

  • 0.5.2

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster

Modules

Julia requires the following module file to run:

  • apps/julia/0.5.2

Using Julia on CIRCE/SC

Once you add the module above, you can either invoke the Julia interpreter interactively by typing:

[user@itn0 ~]$ julia

 

or, you can specify a Julia source code file, with any applicable arguments:

[user@itn0 ~]$ julia helloworld.jl arg1 arg2…

Jobs Longer than 30 Minutes in Length

To run Julia jobs on CIRCE/SC, users will need to submit their jobs to the scheduling environment if their jobs take more than 30 minutes to run on a standard PC.

If, for example, you have a Julia script file named julia-test.jl with all your functions defined in it, you would set up a submit script to use like this:

  • The script below (for testing, name it “julia-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue.
#!/bin/bash 
#SBATCH --job-name=julia-test 
#SBATCH --time=01:00:00 
#SBATCH --nodes=2 
#SBATCH --ntasks=4 
#SBATCH --mem-per-cpu=2048 
#SBATCH --output=julia-test.%j.txt 


module purge 
module initadd apps/julia/0.5.2 

export SLURM_NODEFILE='generate_pbs_nodefile' 
cp $SLURM_NODEFILE ./nodefile 

mpirun julia --machinefile ./nodefile julia-test.jl 

module initrm apps/julia/0.5.2 

 
Next, verify that you are in your job’s directory, and run the sbatch command to submit the job:

[user@itn0 ~]$ cd my/jobdir
[user@itn0 jobdir]$ sbatch ./julia-test.sh

 
This will submit a 2 node, 8 total cpu core job with 2 GB of memory per core and a 1 hour job time.

Documentation

Home Page, User Guides, and Manuals

Reporting Bugs

Report bugs with Julia to the IT Help Desk: rc-help@usf.edu