A quick guide to Condor

last modified 17-11-2006 14:10

Using condor - a guide by a nul for other nuls.

I will present, briefly, two simple uses of Condor.

2.  Running a single generic program with different parameter sets  on many different machine.

You need to place your executable file in a place that is visible across all the machines Condor will use.  Don't use /tmp!  Your NICE home directory or somewhere in /data/idXY is generally a safe bet.

Your executable needs to accept command line parameters like so:

mylittletask paramA paramB paramC

Test your program before you send it to Condor - it is difficult to understand what is breaking once Condor has taken it - so make sure you know it works first.

You need a simple Condor command (.cmd) file.  You can find an example here:

This is for the unix calendar program, a trivial example

************* finish****************


3. Running a matlab function with different parameters

First, you need to compile your matlab code so it runs in a self-contained package without needing a license or even the ESRF installation of Matlab (ie you can give it away to external colleagues).

** help, *eval, etc that can't be used\
** must be a function
** must cast all numbers explicitly
** use of isdeployed

On ID19, the easiest way is to start Matlab (2006b, preferably - 'matlab2006b') on the machine of your choice - I would ONLY use the 64 bit machines (corals) as the speed is better, and CS is unlikely to buy any more 32 bit machines.

You can compile a function yourself with
>> mcc -m myfunction.m - the executable archive will be put in your current directory.

On ID19 (or anywhere else, with a trivial change) you can use
>> id19_mcc('myfunction')
which compiles the function, but puts it into /data/id19/archive/matlab/compiled/$ARCH/ so all the executables are kept in the same place.

Check that the compilation was successful by running the executable FROM INSIDE MATLAB with
>> !myfunction

The first time this is run, the archive will be extracted.  You need to do this before trying to get Condor to run it, to avoid many Condor machines all trying to expand the archive themselves.

By running this from inside Matlab, the PATH and LD_LIBRARY_PATH variables are already taken care of.  If this test was successful, then you need to test it OUTSIDE Matlab.  Open a shell:

% myfunction
This should also work if you are a member of id19, because the PATH and LD_LIBRARY_PATH settings are taken care of when you login.  If you are not, you need to do this first:
% source /data/id19/archive/matlab/compiled/setup_mcc
% myfunction

Test your program!  Did you really cast (convert) the arguments to the function into numbers where necessary?  Did you remove, or hide, calls to 'help','eval' and any other forbidden functions?  Use 'isdeployed' - it is quite helpful!


European Synchrotron Radiation Facility