pwTutorial_Using_the_Parallel_Computing_Toolbox


 pwTutorial_Using_the_Parallel_Computing_Toolbox

 This tutorial exemplifies steps required to run a fit sequence
 on a Linux cluster using the Matlab Parallel Computing toolbox
 and the Load Sharing Faciltiy LSF.

 

Basic LSF commands

bsubSubmit a batch job to the LSF system
bkillKill a running job
bjobsSee the status of jobs in the LSF queue
bpeekAccess the output and error files of a job
bhistHistory of one or more LSF jobs
bqueuesInformation about LSF batch queues

Starting PottersWheel including installation

 Copy the PottersWheel toolbox into your home folder at the cluster
 using a Unix terminal, Cygwin or WinSCP
  scp PottersWheel.zip username@server:

 Start an X terminal (Cygwin: startx).

 Log in:
  ssh username@server -XC

 Unzip the PottersWheel toolbox:
  unzip PottersWheel.2.0.46.zip

 Get a list of possible queues for your user account:
  bqueues -u username

 Start an interactive queue:
  bsub -Is -q queueName bash

 If no job is dispatched within a few minutes,
 you can check for the reason using
  bjobs -l

 See a list of available Matlab licenses:
  lmstat -f MATLAB_Distrib_Comp_Engine

 Start Matlab:
  matlab -nosplash -nodesktop

 In Matlab, go into the toolbox folder and install PW:
  cd PottersWheelToolbox
  pwInstall

 During installation, a warning might appear that the path definition
 can not be changed. Then, the file pathdef.m will open in the Matlab
 editor. Please save it into your home folder, if you start Matlab from there.

 Go into a working directory, start PottersWheel,
 load your model and data, and apply a fit
  cd Modeling/Project01/WorkingFolder
  pw
  pwAddModel('M1.m');
  pwAddData('Dataset1.txt');
  pwCombine;
  pwFit;

 Alternatively, just use a model from the library
 and simulate some data
  pwAddModelFromLibrary('M1.m');
  pwSim;
  pwCombine;

 

Fit sequence

 A fit sequence will be distributed to 20 nodes of the cluster.

 Create a job using the distributed computing toolbox
  jm = findResource('scheduler', 'type', 'lsf');
  set(jm, 'ClusterMatlabRoot', '/opt/matlab');
  job = createJob(jm);
  set(jm, 'SubmitArguments', '-q queueName'); % Harvard:sysbio_15m,2h,12h,1d,7d,unlimite

 Use the job within pwF2:
  Syntax: pwF2(nFits, strength, backupMinutes, dataMode, tMax, job, nNodes)
 Using e.g. nNodes = 20 and nFits = 100, 5 fits will be run on each node.
  pwF2(100, [], [], [], [], job, 20);