Running Matlab jobs under Condor

Before trying to run matlab jobs, you should read the introduction to condor that we have online. To run Matlab jobs under condor, you will need to do the following:
 
  • Determine what files your job required

    This is often harder than it appears, many times you will have files scattered all over your home directory or groups project space. By determining exactly files you need, this will enable condor to run your jobs on many more machines than just your lab. Condor is able to transfer files to machines where they are needed, but it needs to be told what to tansfer

    Ideally your project should be contained in one directory without any external requirements. Condor will transfer files from your local machine the same directory that contains your executable, so your project should look for files in the current working directory

  • Create a submission file

    Next, you will need to create a submission file similiar to the one listed below. Unless your matlab script is only one file with no inputs, you will need to specify all required files in the transfer_input_files section of the submission file.

    One way to test your matlab code is to copy all required components to a different directory on your machine and run 'cat inputfile.m | matlab'.


    #
    # Submit a matlab job
    #
    Executable = your-matlab-executable-script
    Universe = vanilla
    Getenv = True
    Log = mat.log
    Output = mat.out
    Error = mat.err
    # main matlab file to execute
    Input = main.m
    # any other data files that will be transfered into working directory
    transfer_input_files = input1.m, input2.m, input3.jpg
    transfer_files = ALWAYS
    Queue 1
    
                          

    Finally, submit your job to condor using condor_submit

    condor_submit test.cmd

    After your program is submitted, you can use condor_q and condor_status to check see how your job is being run.

  • Additional Resources

    Condor project website

    Condor installation at UMIACS: /opt/stow/condor

 

home | projects | facilities | reference | contact us
© Copyright 2003, Institute for Advanced Computer Study, University of Maryland, All rights reserved.