Cromwell-Sapelo2: Difference between revisions

From Research Computing Center Wiki
Jump to navigation Jump to search
(Creation of page that will serve as the Cromwell instructional wiki)
 
m (Added example config file)
Line 40: Line 40:
* https://cromwell.readthedocs.io/en/stable/tutorials/HPCIntro/
* https://cromwell.readthedocs.io/en/stable/tutorials/HPCIntro/


Reviewing the content at the links above can help to understand the following Cromwell configuration file that has been adapted for Sapelo2 (based on [https://github.com/broadinstitute/cromwell/blob/e914bec7fe65350de1389191d051b845462c1f81/cromwell.example.backends/slurm.conf their SLURM example]):
Reviewing the content at the links above can help to understand the following Cromwell configuration file that has been adapted for Sapelo2 (based on [https://github.com/broadinstitute/cromwell/blob/e914bec7fe65350de1389191d051b845462c1f81/cromwell.example.backends/slurm.conf their SLURM example]).
 
The following file can also be found at <code>/usr/local/training/Cromwell/cromwell-gacrc.conf</code>:<syntaxhighlight lang="json">
backend {
  default = slurm
 
  providers {
    slurm {
      actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
      config {
        runtime-attributes = """
        String partition = "batch"
        Int ntasks = 1
        Int cpus_per_task = 8
        Int memory = 8000
        Int time = 10
        """
        submit = """
            sbatch \
                --job-name=${job_name} \
                --partition=${partition} \
                --ntasks=${ntasks} \
                --cpus-per-task=${cpus_per_task} \
                --mem=${memory} \
                --time=${time} \
                --output=${out} \
                --error=${err} \
                --chdir=${cwd} \
                --wrap "/usr/bin/env bash ${script}"
        """
        kill = "scancel ${job_id}"
        check-alive = "squeue -j ${job_id}"
        job-id-regex = "Submitted batch job (\\d+).*"
      }
    }
  }
}
</syntaxhighlight>

Revision as of 16:55, 26 February 2024

Category

Tools

Program On

Sapelo2

Version

56

Author / Distributor

Broad Institute

Description

"Cromwell is a Workflow Management System geared towards scientific workflows. Cromwell is open sourced under the BSD 3-Clause license." cromwell.readthedocs.io

Running Program

Versions

Please also refer to Running Jobs on Sapelo2.

  • Cromwell 56 is installed for use with Java 11.

Example Configuration File

Cromwell requires a configuration file that includes instructions for how to execute workflows.

The maintainers of Cromwell provide short and intuitive documentation and tutorials to help understand and write a Cromwell configuration file:

Reviewing the content at the links above can help to understand the following Cromwell configuration file that has been adapted for Sapelo2 (based on their SLURM example).

The following file can also be found at /usr/local/training/Cromwell/cromwell-gacrc.conf:

backend {
  default = slurm

  providers {
    slurm {
      actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
      config {
        runtime-attributes = """
        String partition = "batch"
        Int ntasks = 1
        Int cpus_per_task = 8
        Int memory = 8000
        Int time = 10
        """
        submit = """
            sbatch \
                --job-name=${job_name} \
                --partition=${partition} \
                --ntasks=${ntasks} \
                --cpus-per-task=${cpus_per_task} \
                --mem=${memory} \
                --time=${time} \
                --output=${out} \
                --error=${err} \
                --chdir=${cwd} \
                --wrap "/usr/bin/env bash ${script}"
        """
        kill = "scancel ${job_id}"
        check-alive = "squeue -j ${job_id}"
        job-id-regex = "Submitted batch job (\\d+).*"
      }
    }
  }
}