How to Create multiple Condor jobs

by raulzito234

If you want to know how to create a single condor job, please follow this post.

My code runs matlab code. To run many jobs I created a script that creates a script per job the name of the script of each single job is  The following script creates such a script:


prefix="matlab -nodisplay -nodesktop -nosplash -nojvm -r \"SimilarityMeasureWithInput('"
for f in $FILES
 echo $bashstring$'\n'$prefix$f$sufix >>
 chmod u+x
 condor_submit mat.submit

The above code checks all files under the directory ./Fragments/Training and loops through them, it then prints the content of the concatenated string $bashstring$’\n’$prefix$f$sufix to the file For example a script file will look like this:


matlab -nodisplay -nodesktop -nosplash -nojvm -r "SimilarityMeasureWithInput('./Fragments/Training/14_2_1.jpg')"

It makes the script file runnable by the user with the command chmod and then submits the job. The submit file is named mat.submit in this case, but it can be named anything. Don’t forget to create the submit file.