.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.15) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DM 3" .TH DM 3 "2013-03-08" "perl v5.10.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DM \- Distributed Make: A perl module for running pipelines .SH "VERSION" .IX Header "VERSION" 0.2.3 .SH "SYNOPSIS" .IX Header "SYNOPSIS" use \s-1DM\s0 0.002001; .PP # create a \s-1DM\s0 object .PP my \f(CW$dm\fR = \s-1DM\-\s0>new( dryRun => 0, numJobs => 5 ) .PP # add rule with target, prerequisite, and command to use to update the target .PP \&\f(CW$dm\fR\->addRule( 'targetFile', 'prerequisiteFile', 'touch targetFile' ); .PP # add more rules ... .PP # executed the pipeline .PP \&\f(CW$dm\fR\->\fIexecute()\fR; .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1DM\s0 is a perl module for running pipelines. \s-1DM\s0 is based on \s-1GNU\s0 make. Currently, \s-1DM\s0 supports running on a single computer or an \s-1SGE\s0 managed cluster. .SH "GOOD PRACTICE" .IX Header "GOOD PRACTICE" .IP "\(bu" 4 Never make a directory a dependency. \s-1DM\s0 creates directories as it needs them. .IP "\(bu" 4 Never create rules that delete files. Delete files by hand instead. Chances are, You will be sorry otherwise. .IP "\(bu" 4 make runs in dryRun mode by default (this is for your own safety!). Pass in 'dryRun => 0' to \fInew()\fR to run. .SH "OPTIONS" .IX Header "OPTIONS" Any of the following options can be passed in to a call to \fInew()\fR in order to change the defaults on how make is run by \s-1DM\s0. The default value is listed behind the option name. .SS "\s-1GNU\s0 make specific options" .IX Subsection "GNU make specific options" .IP "dryRun 1" 4 .IX Item "dryRun 1" show what will be run, but don't actually run anything. Corresponds to \-n option in \s-1GNU\s0 make. .IP "numJobs 1" 4 .IX Item "numJobs 1" maximum number of jobs to run, or "" for maximum concurrency permitted by dependencies. Applicable to queue and non-queue situations. Corresponds to \-j option in \s-1GNU\s0 make. .IP "keepGoing 0" 4 .IX Item "keepGoing 0" if any job returns a non-zero exit status, the default behaviour is not to submit any further jobs and wait for the others to finish. If this option is true, then any jobs that do not depend on the failed job(s) will still be submitted. Corresponds to \-k option in \s-1GNU\s0 make. .IP "alwaysMake 0" 4 .IX Item "alwaysMake 0" Unconditionally make all targets. Corresponds to \-B option in \s-1GNU\s0 make. .IP "touch 0" 4 .IX Item "touch 0" If true, touch all targets such that make will think that all files have been made successfully. This is only partially supported, as touch will not create any prerequisite directories. Corresponds to \-t option in \s-1GNU\s0 make. .IP "ignoreErrors 0" 4 .IX Item "ignoreErrors 0" Corresponds to \-i option in \s-1GNU\s0 make. .SS "\s-1SGE\s0 specific options" .IX Subsection "SGE specific options" These options are passed to qsub for submitting jobs on an \s-1SGE\s0 cluster .IP "cluster undef" 4 .IX Item "cluster undef" Type of cluster (localhost, \s-1SGE\s0, \s-1PBS\s0, \s-1LSF\s0). Is detected automagically by \s-1DM\s0. .IP "queue undef" 4 .IX Item "queue undef" Corresponds to \-q. .IP "projectName undef" 4 .IX Item "projectName undef" Corresponds to \-P. .IP "\s-1PE\s0 { name => undef, range => undef }" 4 .IX Item "PE { name => undef, range => undef }" Anonymous hash reference. Corresponds to \-pe option .IP "name" 4 .IX Item "name" Corresponds to \-N option. .SS "other options" .IX Subsection "other options" .IP "globalTmpDir undef" 4 .IX Item "globalTmpDir undef" Directory for storing temporary files that can be accessed by every node on the cluster (usually not /tmp) .IP "tmpdir /tmp" 4 .IX Item "tmpdir /tmp" Directory for storing temporary files. .SH "GENERAL FUNCTIONS" .IX Header "GENERAL FUNCTIONS" .SS "\fInew()\fP" .IX Subsection "new()" Returns a \s-1DM\s0 object. Options (see the Options section) can be passed to \fInew()\fR as key value pairs. .IP "Required Arguments" 4 .IX Item "Required Arguments" none .IP "Returns" 4 .IX Item "Returns" \&\s-1DM\s0 object .SS "\fIaddRule()\fP" .IX Subsection "addRule()" This function creates a basic dependency between a prerequisite, target and command. The prerequisite is a file that is required to exist in order to create the target file. The command is used to create the target file from the prerequisite. .IP "Required Arguments" 4 .IX Item "Required Arguments" \- target file .Sp \- prerequisite file(s) .Sp \- command .IP "Returns" 4 .IX Item "Returns" none .SS "\fIexecute()\fP" .IX Subsection "execute()" This method is called after all rules have been defined in order to write the make file and execute it. No mandatory options. Takes only overrides. .IP "Required Arguments" 4 .IX Item "Required Arguments" none .IP "Returns" 4 .IX Item "Returns" none .SH "JOB ARRAY FUNCTIONS" .IX Header "JOB ARRAY FUNCTIONS" .SS "Workflow" .IX Subsection "Workflow" First, initialize a job array with \fIstartJobArray()\fR. Add rules to the job array with \fIaddJobArrayRule()\fR. Last, call \fIendJobArray()\fR to signal that no more rules will be added to this particular job array. Multiple job arrays can be defined after each other in this manner. \fIexecute()\fR can only be called if the most recently started job array has been completed with endJobArray. .PP On \s-1SGE\s0, the job array will only be started once the prerequisites of all job array rules have been updated. On other platforms, each job will start once its prerequisite has been updated. However, on all platforms, the job array target will only be updated once all rules of that job array have completed successfully. .PP Only the target specified in \fIstartJobArray()\fR should be used as a prerequisite for other rules. The targets specified through \fIaddJobArrayRule()\fR should never be used as prerequisites for other rules. .SS "\fIstartJobArray()\fP" .IX Subsection "startJobArray()" daes nothing unless 'cluster' eq '\s-1SGE\s0'. Requires 'target' and 'globalTmpDir' to be specified as key value pairs: startJobArray(target=>$mytarget, globalTmpDir=>$mytmpdir) .SS "\fIaddJobArrayRule()\fP" .IX Subsection "addJobArrayRule()" This structure is designed to work with \s-1SGE\s0's job array functionality. Any rules added to a jobArray structure will be treated as simple add rules when running on localhost, \s-1LSF\s0 or \s-1PBS\s0, but will be executed as a jobArray on \s-1SGE\s0. .PP \fIRequired Arguments\fR .IX Subsection "Required Arguments" .PP takes three inputs: target, prereqs, command as key value pairs: .PP addJobArrayRule( target => \f(CW$mytarget\fR, prereqs => \e@myprereqs, command => \f(CW$mycommand\fR ); .PP prereqs may also be a scalar (string). .PP The target is only for internal updating by the job array. The target may not be used as a prerequisite for another rule. Use the job array target instead. .PP \fIReturns\fR .IX Subsection "Returns" .PP none .SS "\fIendJobArray()\fP" .IX Subsection "endJobArray()" Adds the rule that kicks off the job array. See Workflow for further description. .PP \fIRequried Arguments\fR .IX Subsection "Requried Arguments" .PP none .PP \fIReturns\fR .IX Subsection "Returns" .PP The target of the job array .SH "INTERNAL FUNCTIONS" .IX Header "INTERNAL FUNCTIONS" .SS "\fI_check_arg_consistency()\fP" .IX Subsection "_check_arg_consistency()" This function is used for checking the consistency of arguments passed to a \s-1DM\s0 object. .SH "AUTHORS" .IX Header "AUTHORS" Kiran V Garimella and Warren W. Kretzschmar .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \f(CW\*(C`bug\-dm at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc DM .Ve .PP You can also look for information at: .IP "\(bu" 4 \&\s-1RT:\s0 \s-1CPAN\s0's request tracker (report bugs here) .Sp .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2012 Kiran V Garimella. .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the \s-1GNU\s0 General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information.