arch
The arch directive defines the CPU architecture used to build the software required by each task.
Usage
For example:
process blast {
spack 'blast-plus@2.13.0'
arch 'linux/x86_64', target: 'cascadelake'
script:
"""
blastp -query input_sequence -num_threads ${task.cpus}
"""
}
This example declares that the generic CPU architecture is linux/x86_64 (X86 64 bit), and more specifically that the microarchitecture is cascadelake (a specific generation of Intel CPUs).
This directive is used by the following Nextflow features:
- The spack directive, to build microarchitecture-optimized applications.
- The Wave service, to build containers for one of the generic families of CPU architectures.
- The
spackstrategy within Wave, to optimize the container builds for specific CPU microarchitectures.
The following values are allowed, grouped by equivalent family (multiple choices are available for compatibility):
- X86 64 bit:
linux/x86_64,x86_64,linux/amd64,amd64 - ARM 64 bit:
linux/aarch64,aarch64,linux/arm64,arm64,linux/arm64/v8 - ARM 64 bit, older generation:
linux/arm64/v7
Examples of values for the architecture target option are cascadelake, icelake, zen2, and zen3. See the Spack documentation for the full list of targets.
Multiple architectures
You can declare more than one CPU architecture as a comma-separated string (e.g., arch 'linux/amd64,linux/arm64'). Each entry can use any of the allowed values listed above, and surrounding whitespace is ignored.
Multiple architectures are used in full only by executors that support multi-architecture builds (e.g., Seqera Platform). Other executors and the spack/Wave build strategies use only the first (primary) architecture in the list. Declare the primary architecture first.