--- title: 'Interactive Processing' --- [toc] ## Commands for Interactive execution{#command} Interactive execution is performed using Slurm's interactive batch function. The _**tssrun**_ command is provided as a tool for simple execution. You can execute jobs by specifying program and arguments to be executed after the command. Please refer to [here](/run/tips#env_val) for environment variables that are automatically set when a job is executed. Command | Description | Examples | Notes :-----------------------------------------------:|:--------------------:|:----------------:|------------------------------------------------------------ tssrun | Execute the program on the computing node | tssrun ./a.out | ### Command Option{#option} Option | Description | Examples :-----------------------------:|:-------------------------------------------------------------:|:---------------------: -p _QUEUENAME_ | Specify the queue for batch processing | tssrun -p gr19999b ./a.out -t _HOURS_:_MINUTES_:_SECONDS_ | Specify the upper limit of elapsed time (unit: hours:minutes:seconds) | tssrun -p gr19999b -t 1:0:0 ./a.out --rsc p=_PROCS_:t=_THREADS_:c=_CORES_:m=_MEMORY_ <br> or <br> --rsc g=_GPU_ | Specify the amount of job-allocated resources. For more details, [click here](/run/resource#resouce) | tssrun -p gr19999b --rsc p=4:t=8:c=8:m=2G ./a.out <br> or <br> tssrun -p gr19999b --rsc g=1 ./a.out --x11 | Execute GUI program on computing nodes | tssrun -p gr19999b --x11 xeyes * The part *gr19999b* in the example must be changed to your own queue name. * Wen you enter the command, several messages are displayed, then the program begins execution and the results are displayed. * If the computing nodes for interactive execution are congested, execution may not start immediately after the message is displayed. * Interactive execution with queue for personal and group courses is also available. ## Job Submission **Example 1:** For MPI program in System B ```nohighlight $ tssrun -p gr19999b --rsc p=4 ./a.out salloc: Granted job allocation 102362 salloc: Waiting for resource configuration salloc: Nodes cnode3 are ready for job My name is cnode3. My rank is 1. My name is cnode3. My rank is 2. My name is cnode3. My rank is 3. My name is cnode3. My rank is 0. salloc: Relinquishing job allocation 102362 exit code: 0 ``` **Example 2:** When executing GUI programs ```nohighlight $ tssrun -p gr10001b --x11 xeyes salloc: Granted job allocation 102366 salloc: Waiting for resource configuration salloc: Nodes <Computing Node name> are ready for job (X application starts) ``` <!-- ## Limitations on Interactive Execution{#limit} **The following restrictions are applied to **Interactive Executions that do not use personal course queues or group course queues. If you have applied for a service course other than an entry course, you can avoid the following restrictions by specifying a queue with reference to [-p option](#option). #### Node Sharing Nodes for interactive execution are prepared for each system (each system A, B, and C is associated with a queue called ta, tb, and tc), and all users share each node. Program execution occupies CPU cores for exclusive execution, so it may take some time before execution starts during busy times. #### Number of simultaneous job executions **One user can only RUN** one job at a time. The second and subsequent jobs will be PEND. #### Available resource limit The number of CPU cores and amount of memory that one use can use at the same time is limited. You can increase the number of CPU cores and the amount of memory up to the limit by specifying [--rsc option](#option). System | A | B | C | G | cloud :------------:|:-----:|:-----:|:------:|:----:|:------: Standard number of CPU cores | 1 | 1 | 1 | 1 | 1 Upper limit of CPU cores | 112 | 112 | 112 | 36 | 36 Standard amount of memory | 1024M |4096MB |18432MB |7168MB|13312MB Upper limit of memory | 120G |500G |2030G |500G |500G #### Program elapsed time limit When the program is executed in interactive mode, if the elapsed time exceeds the standard limit, the program is forced to terminate. You can increase the time limit to the maximum by specifying [-t option](#option). System | A | B | C | G | Cloud :------------------------: |:-----:|:-----:|:-----:|:-----:|:-----: Standard elapsed time (hour:minute) | 1:00 | 1:00 | 1:00 | 1:00 | 1:00 Upper limit of elapsed time (hour:minute) | 24:00 | 24:00 | 24:00 | 24:00 | 24:00 --> ## Confirmation of job information{#report} You can confirm the job information with an interactive execution by tssrun command. Command | Option | Description | Example :------:|:-----:|:----------------------:|:------------------: sacct | -j _JOBID_ | Display job information for interactive execution | sacct -j 102362 You must specify the job ID followed by the command and options. The job ID is the XXXXXXX part of `salloc: Granted job allocation XXXXXXXX` that is displayed when the tssrun command is executed. If more than 24 hours elapsed after the interactive execution ends, it can not be displayed. #### Message when interactive execution terminates abnormally If an interactive execution terminates abnormally, the reason for the termination is displayed in the job information. * Termination due to memory limitation (due to pressure on overall node memory) ```nohighlight Can't malloc: Cannot allocate memory ``` * Termination due to elapsed time limit ```nohighlight slurmstepd: error: *** STEP 102368.0 ON <computing node name> CANCELLED AT 2022-11-04T15:34:36 DUE TO TIME LIMIT *** ```