nf-core/configs: Alliance Canada Configuration

Configuration for running nextflow on the clusters of the Digital Research Alliance of Canada. Invoke by specifying -profile alliance_canada.

You also need to supply the name of the group under which you are working or whose resource allocation you want to use by running export SLURM_ACCOUNT=<def-user> before you run any nf-core pipeline. If you run nf-core frequently and always use the same resource allocation, you may find it more convenient to add the SLURM_ACCOUNT environment variable to your ~/.bashrc file.

For detailed information on running nf-core pipelines on Alliance clusters, please visit the documentation: https://docs.alliancecan.ca/wiki/Nextflow

If you run into issues, please contact Alliance Support: https://docs.alliancecan.ca/wiki/Technical_support

Config file

See config file on GitHub

conf/alliance_canada
params {
    config_profile_description  = 'Alliance Canada HPC config'
    config_profile_contact      = 'Jerry Li (@jerryakii)'
    config_profile_url          = 'https://docs.alliancecan.ca/wiki/Nextflow'
 
    max_time                    = 168.h
    max_cpus                    = 64
    max_memory                  = 240.GB
}
 
cleanup = true
 
singularity {
    enabled     = true
    autoMounts  = true
}
 
apptainer {
    autoMounts = true }
 
// Group name for resource allocation must be supplied as environment variable
process {
    executor        = 'slurm'
    clusterOptions  = "--account=${System.getenv('SLURM_ACCOUNT')}"
    maxRetries      = 1
    errorStrategy   = { task.exitStatus in [125,139] ? 'retry' : 'finish' }
    cpu             = 1
    time            = '3h'
    resourceLimits = [
            memory: 240.GB,
            cpus: 64,
            time: 168.h
        ]
}
 
executor {
    pollInterval    = '60 sec'
    submitRateLimit = '60/1min'
    queueSize       = 100
}
 
// Cluster name is available as environment variable
// If not found, default to narval as it has the lowest limits
hostname = "narval"
try {
    hostname = "${System.getenv('HOSTNAME')}"
} catch (java.io.IOException e) {
    System.err.println("WARNING: Could not determine current cluster, defaulting to narval")
}
 
// Cluster Narval
if (hostname.startsWith("narval")) {
    params.config_profile_description = 'Alliance Canada (Narval) cluster profile provided by nf-core/configs.'
    params.max_memory = 249.GB
    params.max_cpus   = 64
    process {
        resourceLimits = [
            memory: 249.GB,
            cpus: 64,
            time: 168.h
        ]
    }
}
 
// Cluster Rorqual
if (hostname.startsWith("rorqual")) {
    params.config_profile_description = 'Alliance Canada (Rorqual) cluster profile provided by nf-core/configs.'
    params.max_memory = 750.GB
    params.max_cpus   = 192
    process {
        resourceLimits = [
            memory: 750.GB,
            cpus: 192,
            time: 168.h
        ]
    }
}
 
// Cluster Trillium
if (hostname.startsWith("tri")) {
    params.config_profile_description = 'Alliance Canada (Trillium) cluster profile provided by nf-core/configs.'
    params.max_memory = null
    params.max_cpus   = null
    process {
        clusterOptions = "--account=${System.getenv('SLURM_ACCOUNT')} --nodes=1"
        resourceLimits = [
            time: 168.h
        ]
    }
    executor {
        queueSize = 500
    }
}
 
// Cluster Nibi
if (hostname.contains("nibi")) {
    params.config_profile_description = 'Alliance Canada (Nibi) cluster profile provided by nf-core/configs.'
    params.max_memory = 750.GB
    params.max_cpus   = 192
    process {
        resourceLimits = [
            memory: 750.GB,
            cpus: 192,
            time: 168.h
        ]
    }
}
 
// Cluster Fir
// not sure what the hostname is so set it as a profile
profiles {
    fir {
        params.config_profile_description = 'Alliance Canada (Fir) cluster profile provided by nf-core/configs.'
        params.max_memory = 750.GB
        params.max_cpus   = 192
        process {
            resourceLimits = [
                memory: 750.GB,
                cpus: 192,
                time: 168.h
            ]
        }
    }
}