Julia
If you are a windows user – please ensure you create your jobscript ON THE CSF directly using gedit. This will prevent your job going into error (Eqw). Text files created on windows have hidden characters that linux cannot read. For further information please see the guide to using the system from windows, in particular the section about text & batch submission script files. |
Overview
Set up procedure
Julia can be accessed by loading ONE of the module files as follows:
module load julia/1.4.2-linux-x86_64
Running the application
Please do not run Julia on the login nodes. Jobs should instead be submitted to the compute nodes via the batch system, SLURM. Some example jobs are given below.
Interactive job
To use Julia interactively, first load a module and then run an interactive session as follows
[username@login01 [CSF4] ~]$ module load julia/1.4.2-linux-x86_64 [username@login01 [CSF4] ~]$ srun --pty julia
You will then be presented with an interactive julia prompt:
julia> julia> sin(pi/2) 1.0
You can switch to shell mode by pressing the ;
key, where you can run standard shell commands:
shell> pwd /mnt/iusers01/mygroup/me
Once you have run the shell command, or simply pressed Return/Enter
, you are immediately returned to the julia prompt.
Serial batch job submission
An example jobscript for a serial job is shown below:
#!/bin/bash --login #SBATCH -p serial # Run a serial job #SBATCH -n 1 # Number of cores # Load the version you require module load julia/1.4.2-linux-x86_64 julia myscript.jl
Submit the jobscript using:
sbatch jobscript
where jobscrip
is the name of your jobscript file.
Single node parallel batch job submission (2-40 cores)
An example jobscript for a single node SMP job is given below:
#!/bin/bash --login #SBATCH -p multicore # Run a multicore job #SBATCH -n 8 # Number of cores (can be 2--40) module load julia/1.4.2-linux-x86_64 julia -p $SLURM_NTASKS myscript.jl
Submit the jobscript using:
sbatch scriptname
where jobscrip
is the name of your jobscript file.
Further info
Updates
None.