title: Slurm: Why use srun inside sbatch?
body: <p>In a sbatch script, you can directly launch programs or scripts (for example an executable file <code>myapp</code>) but in many tutorials people use <code>srun myapp</code> instead.</p>
  
  <p>Despite reading some documentation on the topic, <strong>I do not understand the difference and when to use each of those syntaxes</strong>.</p>
  
  <p>I hope this question is precise enough (1st question on SO), thanks in advance for your answers.</p>