Submitting many jobs
In this example, we will focus on how to get input files into our jobs, and how to collect output.
Again, we need a file to describe our job, and an actual job payload.
Save the following into a file of your choosing or use the file
CentOS7_lotto.jdl
from the repository.
Save the following into a file of your choosing or use the file
check_lotto.sh
from the repository.
Please check that the shell script is executable - if not, run
chmod +x check_lotto.sh
.
As you may have guessed, we are going to play a small lottery game here. This simulates a weekly lottery, and 52 draws are done, a single one per job. Please create the directory
lotto_sheets
and prepare your lucky numbers in it. You should create at least one file with exactly 6 numbers (one per line) in it. The numbers should range between 1 and 49. Name the file with the extension.txt
. You can also create multiple files if you have more than one set of lucky numbers.
Submit the job as follows and check what happens:
What is happening? Where do you expect to find files on your submit machine?
Check out your results
Ignoring any special rules, you basically win something if at least 3 numbers were guessed correctly. Did you win something?
Check out your result files:
What exactly does this command show? If in doubt, please ask!