PBS to Slurm Conversion

How do I convert this PBS command to Slurm:
qsub –v VARIABLEX,VARIABLEY,VARIABLEZ qsub_sample.s

First, you would replace the PBS command “qsub” with the Slurm command “sbatch”, which is the Slurm command used to submit a job. Please see “Basic PBS to Slurm Translations” for a list of most commonly used commands in PBS and their Slurm equivalents.

Next, the PBS flag “-v” is used to name environment variables that will be made available to the job. In Slurm, this flag is “–export=”. So, in Slurm, this would be: --export=VARIABLEX,VARIABLEY,VARIABLEZ

The last piece of your code is the file name: “qsub_sample.s”. Ideally, you would rename the file to reflect the fact that you’re now using Slurm. If you want to stay with the same format: “sbatch_sample.s”. Remember, you would have to rename the actual file, not just use a new name in the job submission.

If you were to rename the file, this is what the new job submission would look like:
sbatch --export=VARIABLEX,VARIABLEY,VARIABLEZ sbatch_sample.s