Perl/Batch

From ScientificComputing
Jump to: navigation, search

You can submit a Perl job (my_perl_script.pl) in batch mode with the following command:

sbatch [Slurm options] --wrap="perl my_perl_script.pl"

Here you need to replace [Slurm options] with Slurm parameters for the resource requirements of the job. Please find a documentation about the parameters of sbatch on the wiki page about the batch system.

If you specify the Perl interpreter on the first line of your script, then please use

#!/usr/bin/env perl

instead of

#!/usr/bin/perl

Otherwise the Perl interpreter from the operating system will be called when you directly execute the script with

./my_perl_script.pl

instead of

perl ./my_perl_script.pl

The Perl interpreter from the operating system is older and does not have the additional packages installed.