The RCC Condor Cluster can execute your MATLAB scripts. Unlike a workstation with MATLAB, the Condor cluster will execute Matlab scripts in batch mode. Condor will automatically copy your script onto a server, execute the program, and return the results to you.
How to run a MATLAB job on Condor
Your Matlab job will consist of three files:
YOUR_SCRIPT.m- Your MATLAB script. You should upload this to your Lustre home directory.
matRun.sh- A simple BASH script that will execute your MATLAB script correctly on Condor
YOUR_SCRIPT.submit- A Condor job Submit file that instructs Condor how to execute your script.
None of the names matter, but it is good practice that the BASH script ends with
.sh and the submit file ends with
.submit to keep consistent with general convention.
matRun.sh BASH script:
#!/bin/bash /opt/matlab/current/bin/matlab -nosplash -nodesktop -nojvm -r "run('./YOUR_SCRIPT.m'); quit"
universe = Vanilla Executable = matRun.sh Arguments = input = requirements = (OpSys =="LINUX" && Arch =="X86_64" && Matlab == "true") Rank = memory should_transfer_files = YES transfer_input_files = YOUR_SCRIPT.m when_to_transfer_output = ON_EXIT notification = Complete notify_user = YOUR_EMAIL@fsu.edu Output = $(Process).out Log = $(Process).log Queue 1
See our documentation for submit files for details about what these directives mean. The salient pieces for Matlab are:
Executable = matRun.sh- This runs the BASH file you created in Step 1.
Matlab == "true"- This instructs Condor to execute your job only on servers that have MATLAB installed.
transfer_input_files = YOUR_SCRIPT.m- Required; copy your Matlab script when the Condor job runs.
Ensure all of your files are in your Lustre home directory, and then run
The output from successful execution of your script will appear when the Condor job completes. See Condor Job Management to keep tabs on your script while it is queued and executing.