Edit multi_seq.sb to run the tasks, python_script.py and r_script.r :
Request resources
Load the required modules,
sequentially run the two scripts
Submit job to compute node
Answer
1 2 3 4 5 6 7 8 91011121314151617181920
#Make a copy of hello.sb and name it multi_seq.sb
cp hello.sb multi_seq.sb
#Using your favorite editor(nano, vi, emacs, gedit, etc.),
#make the following edits to the multi_seq.sb script to run the tasks, python_script.py and r_script.r simultaneously:
gedit multi_seq.sb
#Request resources: Typically you'll need to request the largest number of nodes needed for each task. Since each task above only uses one node and one core there is no change to the number of nodes or cores.
#Load the required modules
module load R/3.5.0-X11-20180131
module load python
#sequentially run the two scripts
python3 python_script.py
Rscript r_script.R
#Submit job to compute node: Execute the following at the command line
sbatch multi_seq.sb