Difference between revisions of "Julia"

From UFRC
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 33: Line 33:
 
<!--Run-->
 
<!--Run-->
 
{{#if: {{#var: exe}}|==Additional Information==
 
{{#if: {{#var: exe}}|==Additional Information==
 +
===Package Installation===
 +
After loading the julia environment module you can add packages to your personal Julia environment with Pkg. E.g.
  
If you encounter an SSL certificate issue when installing a Julia package with Pkg you can work around the issue by adding an 'insecure' line to the curl initialization file ~/.curlrc file. Do this if you trust the package source. E.g.
+
  $ module load julia
 
+
  $ julia
  $ echo 'insecure' >> ~/.curlrc
+
  > using Pkg
 
+
  > Pkg.add("CSV")
Julia installs packages to your home directory. This means that all of the packages are manual self installs. Follow the basic Julia installation steps
 
 
 
  using Pkg
 
  Pkg.add("name")
 
|}}
 
 
 
== Using Julia in Jupyter ==
 
 
 
=== Download Julia ===
 
 
 
As of May 2022, there is a bug in the Julia available via conda, so download the binary from https://julialang.org/downloads/ you want the 64-bit (glibc) version of the current stable release.
 
 
 
 
# Log into HiPerGator
 
# Download the latest version of Julia, this command was from May 2022: <code>wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.3-linux-x86_64.tar.gz</code>
 
# Extract the zip file: <code>tar xvf julia-1.7.3-linux-x86_64.tar.gz</code>
 
# Test that Julia works: <code>julia-1.7.3/bin/julia </code>
 
 
 
=== Install IJulia ===
 
 
 
You will need IJulia to use Julia in a Jupyter Notebook.
 
 
 
# Open your Julia application: <code>julia-1.7.3/bin/julia</code>
 
# Using the directions from [https://julialang.github.io/IJulia.jl/stable/manual/installation/ IJulia]:
 
<pre>
 
using Pkg
 
Pkg.add("IJulia")
 
</pre>
 
 
 
Installing IJulia will create a kernel file for you at <code>~/.local/share/jupyter/kernels</code>.
 
 
 
Launch a Jupyter session and you should be set!
 
  
 +
===Jupyter Kernel===
 +
To create a personal Julia Jupyter kernel load the julia environment module and add the 'IJulia' package.
 +
Pkg.add("IJulia")
 +
The kernel should be visible in your new jupyterlab session after a successful installation.
 +
}}
 
<!--PBS scripts-->
 
<!--PBS scripts-->
 
{{#if: {{#var: pbs}}|==PBS Script Examples==
 
{{#if: {{#var: pbs}}|==PBS Script Examples==
Line 102: Line 77:
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__
=Validation=
 
* Validate 4/5/2018
 

Latest revision as of 20:49, 21 October 2022

Description

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. Julia’s Base library, largely written in Julia itself, also integrates mature, best-of-breed open source 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. IJulia, a collaboration between the IPython and Julia communities, provides a powerful browser-based graphical notebook interface to Julia.

Environment Modules

Run module spider julia to find out what environment modules are available for this application.

System Variables

  • HPC_JULIA_DIR - installation directory
  • HPC_JULIA_BIN - executable directory
  • HPC_JULIA_MAN - manual directory

Additional Information

Package Installation

After loading the julia environment module you can add packages to your personal Julia environment with Pkg. E.g.

$ module load julia
$ julia
> using Pkg
> Pkg.add("CSV")

Jupyter Kernel

To create a personal Julia Jupyter kernel load the julia environment module and add the 'IJulia' package.
Pkg.add("IJulia")

The kernel should be visible in your new jupyterlab session after a successful installation.