Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
habrok:advanced_job_management:interactive_jobs [2020/12/22 10:12] – external edit 127.0.0.1 | habrok:advanced_job_management:interactive_jobs [2025/01/08 10:18] (current) – Fix broken link (thanks Jelte!) pedro | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Interactive jobs ====== | ====== Interactive jobs ====== | ||
- | As described in [[peregrine: | + | As described in [[habrok: |
This is a very simple example that demonstrates how it works, it will just run the command hostname on the allocated compute node: | This is a very simple example that demonstrates how it works, it will just run the command hostname on the allocated compute node: | ||
< | < | ||
- | p123456@pg-login:~ srun --ntasks=1 --time=00: | + | p123456@login1:~ srun --ntasks=1 --time=00: |
srun: job 56789 queued and waiting for resources | srun: job 56789 queued and waiting for resources | ||
srun: job 56789 has been allocated resources | srun: job 56789 has been allocated resources | ||
- | pg-node004 | + | node4 |
</ | </ | ||
As the output shows, the command was being executed on a compute node (pg-node004) and you can now actually see what happens: the output of the command is printed directly to your screen instead of being saved to a file. | As the output shows, the command was being executed on a compute node (pg-node004) and you can now actually see what happens: the output of the command is printed directly to your screen instead of being saved to a file. | ||
Line 16: | Line 16: | ||
< | < | ||
- | p123456@pg-login:~ srun --ntasks=1 --time=01: | + | p123456@login1:~ srun --ntasks=1 --time=01: |
srun: job 45678 queued and waiting for resources | srun: job 45678 queued and waiting for resources | ||
srun: job 45678 has been allocated resources | srun: job 45678 has been allocated resources | ||
- | p123456@pg-node010:~ | + | p123456@node4:~ |
</ | </ | ||
As the last line of this output shows, you are now running a shell on a compute node and you can start working. Do note that the more time you request for your job, the longer you might have to wait before your job will start. And since you do not know when exactly your job will start, this may not be very convenient. | As the last line of this output shows, you are now running a shell on a compute node and you can start working. Do note that the more time you request for your job, the longer you might have to wait before your job will start. And since you do not know when exactly your job will start, this may not be very convenient. | ||
+ | **N.B.: interactive jobs currently don't (always) use the software stack built for the allocated nodes, you can work around this by first running '' |