Skip to content

Commit

Permalink
a new section on how to run julia interactive jobs on lumi
Browse files Browse the repository at this point in the history
  • Loading branch information
code4yonglei committed Dec 9, 2024
1 parent 36f032a commit 7855528
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions content/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,37 @@ An example of the ``script.jl`` code is provided below.
println("----EOF----")
Running Julia interactive jobs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Interactive jobs allow a user to interact with applications on compute nodes. With an interactive job, you request time and resources to work on a compute node directly, which is different to a batch job where you submit your job to a queue for later execution.

Using ``salloc``

Using ``salloc``, you allocate resources and spawn a shell used to execute parallel tasks

.. code-block:: console
$ salloc -A project_465001310 -N 1 -t 1:00:00 -p standard-g
Once the allocation is made, this command will start a shell on the login node. You can start parallel execution on the allocated nodes with srun.

.. code-block:: console
$ srun --ntasks-per-core=1 julia script.jl
Using ``srun``

For simple interactive session, you can use srun with no prior allocation. In this scenario, srun will first create a resource allocation in which to run the job. For example, to allocate 1 node for 10 minutes and spawn a shell

.. code-block:: console
$ module use /appl/local/csc/modulefiles
$ module load julia
$ srun --account=project_465001310 --partition=standard-g --nodes=1 --cpus-per-task=1 --ntasks-per-node=1 --time=0:10:00 --pty julia script.jl

0 comments on commit 7855528

Please sign in to comment.