-This is a _very_ early draft, basically a dump of an email exchange I'm currently (May 2011) having with a user (condor-admin 22124). +This is a _very_ early draft. ----- @@ -23,7 +23,7 @@ For executables compiled with the Matlab Compiler, instead of the full Matlab install, you will need the MCR, the Matlab Compiler Runtime, but the general techniques are the same. -If you install Condor locally on each machine, it is recommended to place Matlab in the same location on each machine. That way individual jobs can easily find it. If Condor will be in different locations on each machine, you can set up {link:http://www.cs.wisc.edu/condor/manual/v7.6/3_3Configuration.html#param:SubsysAttrs STARTD_ATTRS} to advertise the correct location, then the job can use a {link:http://www.cs.wisc.edu/condor/manual/v7.6/condor_submit.html#73792 $$} expression to find it. For example, your configuration file might say: +If you install Condor locally on each computer, it is recommended to place Matlab in the same location on each computer. That way individual jobs can easily find it. If Condor will be in different locations on each computer, you can set up {link:http://www.cs.wisc.edu/condor/manual/v7.6/3_3Configuration.html#param:SubsysAttrs STARTD_ATTRS} to advertise the correct location, then the job can use a {link:http://www.cs.wisc.edu/condor/manual/v7.6/condor_submit.html#73792 $$} expression to find it. For example, your configuration file might say: {code} MATLAB_PATH = /opt/matlab/bin @@ -50,10 +50,20 @@ Installing on a shared filesystem is identical to installing it on each local computer, but may be less complicated for administration. -To bring Matlab along yourself, you would need to package it up, bring it along (transfer_input_files), then have a script unpack Matlab and start it. Matlab is a large piece of software, and this could be slow. It will also temporarily use a bunch of disk space with a copy of Matlab. If multiple Matlab jobs run on the same machine simultaneously, multiple copies of Matlab will be installed at once. Generally speaking this is not recommended, although it is more practical for the MCR. +To bring Matlab along yourself, you would need to package it up, bring it along (transfer_input_files), then have a script unpack Matlab and start it. Matlab is a large piece of software, and this could be slow. It will also temporarily use a bunch of disk space with a copy of Matlab. If multiple Matlab jobs run on the same computer simultaneously, multiple copies of Matlab will be installed at once. Generally speaking this is not recommended, although it is more practical for the MCR. {section: Invoking} +Matlab may try to create a graphical environment. Condor does not support graphical environments; it doesn't make sense to open up a user interface for a job that won't have a user directly looking at it. You may need some combination of -nosplash, -nodisplay, and possibly -nojvm to stop Matlab from creating a graphical environment. This should not be necessary for Matlab Compiler compiled jobs. + +{section: Parallelism} + +In the most common configuration, Condor does not directly support "parallel" jobs, jobs that might use a system like MPI or multiple threads to take advantage of multiple CPUs at once. Condor can launch jobs that use multiple processes or threads, but by default Condor will offer them a single CPU core to run on. (They may get lucky and be able to use more than one CPU core on a computer, but that should not be relied on.) + +A local installation may provide additional options for parallel, usually in the form of offering a job two or more CPUs on a single computer. Local administrators should be able to describe available functionality. + +Given the default configuration, it is usually better to break your work down into multiple independent jobs. For example, if you are processing 10,000 images, instead of a single Matlab job that processes them, perhaps you could have 10,000 jobs that each process 1 image. Condor is then able to schedule your jobs across multiple computers or at least multiple cores on a single computer, giving you the speed benefits of parallelism. + {section: Additional Resources} Many other sites are using Matlab under Condor. Here are links to the documentation from just a few.