<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ClusterFunctions Constructor — makeClusterFunctions • batchtools</title>


<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>

<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>

<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />

<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>

<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>

<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>




<meta property="og:title" content="ClusterFunctions Constructor — makeClusterFunctions" />
<meta property="og:description" content="This is the constructor used to create custom cluster functions.
Note that some standard implementations for TORQUE, Slurm, LSF, SGE, etc. ship
with the package." />




<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->



  </head>

  <body data-spy="scroll" data-target="#toc">
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">batchtools</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.14</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../index.html">
    <span class="fas fa fas fa-home fa-lg"></span>
     
  </a>
</li>
<li>
  <a href="../articles/batchtools.html">Get started</a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li>
  <a href="../news/index.html">Changelog</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="https://github.com/mllg/batchtools/">
    <span class="fab fa fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>ClusterFunctions Constructor</h1>
    <small class="dont-index">Source: <a href='https://github.com/mllg/batchtools/blob/master/R/clusterFunctions.R'><code>R/clusterFunctions.R</code></a></small>
    <div class="hidden name"><code>makeClusterFunctions.Rd</code></div>
    </div>

    <div class="ref-description">
    <p>This is the constructor used to create <em>custom</em> cluster functions.
Note that some standard implementations for TORQUE, Slurm, LSF, SGE, etc. ship
with the package.</p>
    </div>

    <pre class="usage"><span class='fu'>makeClusterFunctions</span><span class='op'>(</span>
  <span class='va'>name</span>,
  <span class='va'>submitJob</span>,
  killJob <span class='op'>=</span> <span class='cn'>NULL</span>,
  listJobsQueued <span class='op'>=</span> <span class='cn'>NULL</span>,
  listJobsRunning <span class='op'>=</span> <span class='cn'>NULL</span>,
  array.var <span class='op'>=</span> <span class='cn'>NA_character_</span>,
  store.job.collection <span class='op'>=</span> <span class='cn'>FALSE</span>,
  store.job.files <span class='op'>=</span> <span class='cn'>FALSE</span>,
  scheduler.latency <span class='op'>=</span> <span class='fl'>0</span>,
  fs.latency <span class='op'>=</span> <span class='fl'>0</span>,
  hooks <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='op'>)</span>
<span class='op'>)</span></pre>

    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>name</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code>]<br />
Name of cluster functions.</p></td>
    </tr>
    <tr>
      <th>submitJob</th>
      <td><p>[<code>function(reg, jc, ...)</code>]<br />
Function to submit new jobs. Must return a <code><a href='makeSubmitJobResult.html'>SubmitJobResult</a></code> object.
The arguments are <code>reg</code> (<code><a href='makeRegistry.html'>Registry</a></code>) and <code>jobs</code> (<code><a href='makeJobCollection.html'>JobCollection</a></code>).</p></td>
    </tr>
    <tr>
      <th>killJob</th>
      <td><p>[<code>function(reg, batch.id)</code>]<br />
Function to kill a job on the batch system. Make sure that you definitely kill the job! Return
value is currently ignored. Must have the arguments <code>reg</code> (<code><a href='makeRegistry.html'>Registry</a></code>) and
<code>batch.id</code> (<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code> as returned by <code>submitJob</code>).
Note that there is a helper function <code><a href='cfKillJob.html'>cfKillJob</a></code> to repeatedly try to kill jobs.
Set <code>killJob</code> to <code>NULL</code> if killing jobs cannot be supported.</p></td>
    </tr>
    <tr>
      <th>listJobsQueued</th>
      <td><p>[<code>function(reg)</code>]<br />
List all queued jobs on the batch system for the current user.
Must return an character vector of batch ids, same format as they
are returned by <code>submitJob</code>.
Set <code>listJobsQueued</code> to <code>NULL</code> if listing of queued jobs is not supported.</p></td>
    </tr>
    <tr>
      <th>listJobsRunning</th>
      <td><p>[<code>function(reg)</code>]<br />
List all running jobs on the batch system for the current user.
Must return an character vector of batch ids, same format as they
are returned by <code>submitJob</code>. It does not matter if you return a few job ids too many (e.g.
all for the current user instead of all for the current registry), but you have to include all
relevant ones. Must have the argument are <code>reg</code> (<code><a href='makeRegistry.html'>Registry</a></code>).
Set <code>listJobsRunning</code> to <code>NULL</code> if listing of running jobs is not supported.</p></td>
    </tr>
    <tr>
      <th>array.var</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code>]<br />
Name of the environment variable set by the scheduler to identify IDs of job arrays.
Default is <code>NA</code> for no array support.</p></td>
    </tr>
    <tr>
      <th>store.job.collection</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/logical.html'>logical(1)</a></code>]<br />
Flag to indicate that the cluster function implementation of <code>submitJob</code> can not directly handle <code><a href='makeJobCollection.html'>JobCollection</a></code> objects.
If set to <code>FALSE</code>, the <code><a href='makeJobCollection.html'>JobCollection</a></code> is serialized to the file system before submitting the job.</p></td>
    </tr>
    <tr>
      <th>store.job.files</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/logical.html'>logical(1)</a></code>]<br />
Flag to indicate that job files need to be stored in the file directory.
If set to <code>FALSE</code> (default), the job file is created in a temporary directory, otherwise (or if the debug mode is enabled) in
the subdirectory <code>jobs</code> of the <code>file.dir</code>.</p></td>
    </tr>
    <tr>
      <th>scheduler.latency</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/numeric.html'>numeric(1)</a></code>]<br />
Time to sleep after important interactions with the scheduler to ensure a sane state.
Currently only triggered after calling <code><a href='submitJobs.html'>submitJobs</a></code>.</p></td>
    </tr>
    <tr>
      <th>fs.latency</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/numeric.html'>numeric(1)</a></code>]<br />
Expected maximum latency of the file system, in seconds.
Set to a positive number for network file systems like NFS which enables more robust (but also more expensive) mechanisms to
access files and directories.
Usually safe to set to <code>0</code> to disable the heuristic, e.g. if you are working on a local file system.</p></td>
    </tr>
    <tr>
      <th>hooks</th>
      <td><p>[<code>list</code>]<br />
Named list of functions which will we called on certain events like &#8220;pre.submit&#8221; or &#8220;post.sync&#8221;.
See <a href='runHook.html'>Hooks</a>.</p></td>
    </tr>
    </table>

    <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>

    <div class='dont-index'><p>Other ClusterFunctions: 
<code><a href='makeClusterFunctionsDocker.html'>makeClusterFunctionsDocker</a>()</code>,
<code><a href='makeClusterFunctionsInteractive.html'>makeClusterFunctionsInteractive</a>()</code>,
<code><a href='makeClusterFunctionsLSF.html'>makeClusterFunctionsLSF</a>()</code>,
<code><a href='makeClusterFunctionsMulticore.html'>makeClusterFunctionsMulticore</a>()</code>,
<code><a href='makeClusterFunctionsOpenLava.html'>makeClusterFunctionsOpenLava</a>()</code>,
<code><a href='makeClusterFunctionsSGE.html'>makeClusterFunctionsSGE</a>()</code>,
<code><a href='makeClusterFunctionsSSH.html'>makeClusterFunctionsSSH</a>()</code>,
<code><a href='makeClusterFunctionsSlurm.html'>makeClusterFunctionsSlurm</a>()</code>,
<code><a href='makeClusterFunctionsSocket.html'>makeClusterFunctionsSocket</a>()</code>,
<code><a href='makeClusterFunctionsTORQUE.html'>makeClusterFunctionsTORQUE</a>()</code></p>
<p>Other ClusterFunctionsHelper: 
<code><a href='cfBrewTemplate.html'>cfBrewTemplate</a>()</code>,
<code><a href='cfHandleUnknownSubmitError.html'>cfHandleUnknownSubmitError</a>()</code>,
<code><a href='cfKillJob.html'>cfKillJob</a>()</code>,
<code><a href='cfReadBrewTemplate.html'>cfReadBrewTemplate</a>()</code>,
<code><a href='makeSubmitJobResult.html'>makeSubmitJobResult</a>()</code>,
<code><a href='runOSCommand.html'>runOSCommand</a>()</code></p></div>

  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <nav id="toc" data-toggle="toc" class="sticky-top">
      <h2 data-toc-skip>Contents</h2>
    </nav>
  </div>
</div>


      <footer>
      <div class="copyright">
  <p>Developed by Michel Lang, Bernd Bischl.</p>
</div>

<div class="pkgdown">
  <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>

      </footer>
   </div>

  


  </body>
</html>


