Skip to content

Cannot run CWL workflow with DockerRequirement: Not enough available locations: job /0 requires 1 locations on deployment #1091

Description

@kinow

Hi,

I have this workflow that runs OK with cwltool and Toil:

#!/usr/bin/env cwl-runner

# SPDX-License-Identifier: CC-BY-4.0
#
# This file is licensed under CC BY 4.0
# https://creativecommons.org/licenses/by/4.0/
#
# Copyright (c) 2026 Bruno de Paula Kinoshita

cwlVersion: v1.2

# --- Metadata ---

$namespaces:
  s: https://schema.org/
  xsd: http://www.w3.org/2001/XMLSchema#

$schemas:
  - https://schema.org/version/latest/schemaorg-current-http.rdf

s:author:
  class: s:Person
  s:identifier: https://orcid.org/0000-0001-8250-4074
  s:email: mailto:bruno.depaulakinoshita@bsc.es
  s:name: Bruno de Paula Kinoshita

s:dateCreated:
  "@type": "xsd:date"
  "@value": "2026-02-13"

s:license: https://creativecommons.org/licenses/by/4.0/

s:codeRepository: https://github.com/kinow/cwl-mpi

# --- CWL Tool ---

id: mpich-mpicc
class: CommandLineTool
label: mpich-mpicc
baseCommand: mpicc
doc: >
  An example CWL tool that compiles a C program using the `mpicc`
  compiler wrapper.
  
  By default, it compiles the `sr.c` source file using the `mpicc`
  compiler wrapper. The tool can also be used to compile other
  C programs by providing a different value for source.
  
  It uses the MPICH 4.3.2 Docker image as a hint.

hints:
  DockerRequirement:
    dockerPull: mfisherman/mpich:4.3.2

requirements:
  InlineJavascriptRequirement: { }
  NetworkAccess:
    networkAccess: false
  ResourceRequirement:
    coresMin: 1
    ramMin: 512

inputs:
  source:
    type: File
    inputBinding:
      position: 1
    default:
      class: File
      path: sr.c
  output_name:
    type: string
    default: sr
    inputBinding:
      prefix: -o
      position: 2

outputs:
  executable:
    type: File
    outputBinding:
      glob: $(inputs.output_name)

cwltool

When I run it with cwltool with no containers:

(venv) kinow@ranma:~/Development/python/workspace/cwl-mpi/workflows/mpich-sr$ cwltool mpicc.cwl 
INFO /home/kinow/Development/python/workspace/cwltool/venv/bin/cwltool 3.1.20260315121657
INFO Resolved 'mpicc.cwl' to 'file:///home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/mpicc.cwl'
WARNING [job mpich-mpicc] Skipping Docker software container '--memory' limit despite presence of ResourceRequirement with ramMin and/or ramMax setting. Consider running with --strict-memory-limit for increased portability assurance.
WARNING [job mpich-mpicc] Skipping Docker software container '--cpus' limit despite presence of ResourceRequirement with coresMin and/or coresMax setting. Consider running with --strict-cpu-limit for increased portability assurance.
INFO [job mpich-mpicc] /tmp/m4fvyhd4$ docker \
    run \
    -i \
    --mount=type=bind,source=/tmp/m4fvyhd4,target=/RLrgaK \
    --mount=type=bind,source=/tmp/ahmdbpvt,target=/tmp \
    --mount=type=bind,source=/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr.c,target=/var/lib/cwl/stg999c8e16-4552-40b8-a3ef-f8cfcf979da6/sr.c,readonly \
    --workdir=/RLrgaK \
    --read-only=true \
    --net=none \
    --user=1000:1000 \
    --rm \
    --cidfile=/tmp/mi_6gc8w/20260608200458-351234.cid \
    --env=TMPDIR=/tmp \
    --env=HOME=/RLrgaK \
    mfisherman/mpich:4.3.2 \
    mpicc \
    /var/lib/cwl/stg999c8e16-4552-40b8-a3ef-f8cfcf979da6/sr.c \
    -o \
    sr
INFO [job mpich-mpicc] completed success
{
    "executable": {
        "location": "file:///home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr",
        "basename": "sr",
        "class": "File",
        "checksum": "sha1$0ec2227060df40b5ce79cc59c60cdaacaf19bfb6",
        "size": 16512,
        "path": "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr"
    }
}INFO Final process status is success

With containers:

(venv) kinow@ranma:~/Development/python/workspace/cwl-mpi/workflows/mpich-sr$ cwltool --singularity mpicc.cwl 
INFO /home/kinow/Development/python/workspace/cwltool/venv/bin/cwltool 3.1.20260315121657
INFO Resolved 'mpicc.cwl' to 'file:///home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/mpicc.cwl'
INFO Using local copy of Singularity image mfisherman_mpich:4.3.2.sif found in /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr
INFO [job mpich-mpicc] /tmp/vc9bqkk_$ singularity \
    --quiet \
    run \
    --contain \
    --ipc \
    --cleanenv \
    --no-eval \
    --userns \
    --home \
    /tmp/vc9bqkk_:/uwTdCe \
    --mount=type=bind,source=/tmp/hz7i2lql,target=/tmp \
    --mount=type=bind,source=/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr.c,target=/var/lib/cwl/stg5acb05de-927d-413a-a9b5-fb57cd26ef20/sr.c,readonly \
    --pwd \
    /uwTdCe \
    --net \
    --network \
    none \
    /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/mfisherman_mpich:4.3.2.sif \
    mpicc \
    /var/lib/cwl/stg5acb05de-927d-413a-a9b5-fb57cd26ef20/sr.c \
    -o \
    sr
INFO [job mpich-mpicc] completed success
{
    "executable": {
        "location": "file:///home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr",
        "basename": "sr",
        "class": "File",
        "checksum": "sha1$0ec2227060df40b5ce79cc59c60cdaacaf19bfb6",
        "size": 16512,
        "path": "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr"
    }
}INFO Final process status is success

StreamFlow 0.2.0rc2

It works when I run without Singularity with StreamFlow 0.2.0rc2:

version: v1.0
workflows:
  workflow_name:
    type: cwl
    config:
      file: "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/mpicc.cwl"
$ streamflow run test_nocontainer.yml 
2026-06-08 20:07:22.980 INFO     Processing workflow 161df4b4-3bfd-410b-8cae-e3896ba71d74
2026-06-08 20:07:22.980 INFO     Building workflow execution plan
2026-06-08 20:07:23.638 INFO     COMPLETED building of workflow execution plan
2026-06-08 20:07:23.638 INFO     EXECUTING workflow 161df4b4-3bfd-410b-8cae-e3896ba71d74
2026-06-08 20:07:23.666 INFO     DEPLOYING e4a67d4f-7f76-42e7-aa57-adb568114c25
2026-06-08 20:07:23.894 INFO     COMPLETED deployment of e4a67d4f-7f76-42e7-aa57-adb568114c25
2026-06-08 20:07:23.903 INFO     COPYING from /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr.c on local file-system to /tmp/streamflow/d87b3949-d48a-4ae9-9b6f-ccdedd832329/ccd52065-1c27-4541-8d10-38a497a2094a/sr.c on location e4a67d4f-7f76-42e7-aa57-adb568114c25/3e21bd808c8a5f3fd1f5a2a8e96c97fbd897a666e51d1d89d922bb8be3fd170c
2026-06-08 20:07:23.955 INFO     COMPLETED copy from /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr.c on local file-system to /tmp/streamflow/d87b3949-d48a-4ae9-9b6f-ccdedd832329/ccd52065-1c27-4541-8d10-38a497a2094a/sr.c on location e4a67d4f-7f76-42e7-aa57-adb568114c25/3e21bd808c8a5f3fd1f5a2a8e96c97fbd897a666e51d1d89d922bb8be3fd170c
2026-06-08 20:07:23.959 INFO     EXECUTING step / (job /0) on location e4a67d4f-7f76-42e7-aa57-adb568114c25/3e21bd808c8a5f3fd1f5a2a8e96c97fbd897a666e51d1d89d922bb8be3fd170c into directory /tmp/streamflow/6676b295-8bb7-4bfd-8e81-fb5540da8795:
mpicc \
	/tmp/streamflow/d87b3949-d48a-4ae9-9b6f-ccdedd832329/ccd52065-1c27-4541-8d10-38a497a2094a/sr.c \
	-o \
	sr
2026-06-08 20:07:24.085 INFO     COMPLETED Step /
2026-06-08 20:07:24.085 INFO     COPYING from /tmp/streamflow/6676b295-8bb7-4bfd-8e81-fb5540da8795/sr on location e4a67d4f-7f76-42e7-aa57-adb568114c25/3e21bd808c8a5f3fd1f5a2a8e96c97fbd897a666e51d1d89d922bb8be3fd170c to /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr on local file-system
2026-06-08 20:07:24.143 INFO     COMPLETED copy from /tmp/streamflow/6676b295-8bb7-4bfd-8e81-fb5540da8795/sr on location e4a67d4f-7f76-42e7-aa57-adb568114c25/3e21bd808c8a5f3fd1f5a2a8e96c97fbd897a666e51d1d89d922bb8be3fd170c to /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr on local file-system
2026-06-08 20:07:24.146 INFO     COMPLETED workflow execution
{
    "executable": {
        "basename": "sr",
        "checksum": "sha1$0ec2227060df40b5ce79cc59c60cdaacaf19bfb6",
        "class": "File",
        "dirname": "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr",
        "location": "file:///home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr",
        "nameext": "",
        "nameroot": "sr",
        "path": "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr",
        "size": 16512
    }
}
2026-06-08 20:07:24.146 INFO     UNDEPLOYING e4a67d4f-7f76-42e7-aa57-adb568114c25
2026-06-08 20:07:24.195 INFO     COMPLETED undeployment of e4a67d4f-7f76-42e7-aa57-adb568114c25

However, using the example at the bottom of the CWL Docker Requirement from StreamFlow 0.2 docs, https://streamflow.di.unito.it/documentation/0.2/cwl/docker-requirement.html:

version: v1.0
workflows:
  workflow_name:
    type: cwl
    config:
      file: "/home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/mpicc.cwl"
      docker:
        - step: /
          deployment:
            type: singularity
            config: {}

It hangs running with the container, and complains about the lack of locations? I searched a bit the code and docs, but I couldn't understand how to solve it.

(venv) kinow@ranma:~/Development/python/workspace/cwl-mpi/workflows/mpich-sr$ streamflow run --debug test.yml 
2026-06-08 20:09:07.831 INFO     Processing workflow 9e3a72c4-fdae-4e21-b7f8-44fe7ab2b4f1
2026-06-08 20:09:07.831 INFO     Building workflow execution plan
2026-06-08 20:09:08.239 DEBUG    Translating CommandLineTool /
2026-06-08 20:09:08.492 INFO     COMPLETED building of workflow execution plan
2026-06-08 20:09:08.493 INFO     EXECUTING workflow 9e3a72c4-fdae-4e21-b7f8-44fe7ab2b4f1
2026-06-08 20:09:08.517 DEBUG    Step /source-cmd-default-transformer-injector received inputs ['0']
2026-06-08 20:09:08.517 DEBUG    Step /source-cmd-default-transformer received inputs ['0']
2026-06-08 20:09:08.518 DEBUG    Step /output_name-cmd-default-transformer-injector received inputs ['0']
2026-06-08 20:09:08.518 DEBUG    Step /output_name-cmd-default-transformer received inputs ['0']
2026-06-08 20:09:08.518 DEBUG    Retrieving available locations for job /source-cmd-default-transformer-injector/0 on __LOCAL__.
2026-06-08 20:09:08.518 DEBUG    Available locations for job /source-cmd-default-transformer-injector/0 on __LOCAL__ are ['__LOCAL__'].
2026-06-08 20:09:08.518 DEBUG    Job /source-cmd-default-transformer-injector/0 allocated locally
2026-06-08 20:09:08.518 DEBUG    Retrieving available locations for job /output_name-cmd-default-transformer-injector/0 on __LOCAL__.
2026-06-08 20:09:08.519 DEBUG    Available locations for job /output_name-cmd-default-transformer-injector/0 on __LOCAL__ are ['__LOCAL__'].
2026-06-08 20:09:08.519 DEBUG    Job /output_name-cmd-default-transformer-injector/0 allocated locally
2026-06-08 20:09:08.519 DEBUG    COMPLETED Step __deploy__/644c4bd9-33c8-4ccd-9d82-a8726d781d98
2026-06-08 20:09:08.519 DEBUG    COMPLETED Step __deploy__/__LOCAL__
2026-06-08 20:09:08.519 DEBUG    Job /source-cmd-default-transformer-injector/0 changed status to RUNNING
2026-06-08 20:09:08.520 DEBUG    Job /output_name-cmd-default-transformer-injector/0 changed status to RUNNING
2026-06-08 20:09:08.520 DEBUG    COMPLETED Step /source-cmd-default-transformer-injector/__schedule__
2026-06-08 20:09:08.521 DEBUG    COMPLETED Step /output_name-cmd-default-transformer-injector/__schedule__
2026-06-08 20:09:08.521 DEBUG    Job /output_name-cmd-default-transformer-injector/0 changed status to COMPLETED
2026-06-08 20:09:08.521 DEBUG    Step /output_name-cmd-default-transformer received inputs ['0']
2026-06-08 20:09:08.521 DEBUG    Step /output_name-cmd-default-transformer-injector received termination token with Status COMPLETED
2026-06-08 20:09:08.521 DEBUG    Job /source-cmd-default-transformer-injector/0 changed status to COMPLETED
2026-06-08 20:09:08.521 DEBUG    Step /source-cmd-default-transformer received inputs ['0']
2026-06-08 20:09:08.521 DEBUG    Step /source-cmd-default-transformer-injector received termination token with Status COMPLETED
2026-06-08 20:09:08.521 DEBUG    Step /output_name-cmd-default-transformer received termination token with Status COMPLETED
2026-06-08 20:09:08.521 DEBUG    COMPLETED Step /output_name-cmd-default-transformer-injector
2026-06-08 20:09:08.521 DEBUG    Step /source-token-transformer received inputs ['0', '0']
2026-06-08 20:09:08.521 DEBUG    Processing /home/kinow/Development/python/workspace/cwl-mpi/workflows/mpich-sr/sr.c on location __LOCAL__/__LOCAL__.
2026-06-08 20:09:08.521 DEBUG    Step /output_name-token-transformer received inputs ['0', '0']
2026-06-08 20:09:08.521 DEBUG    Step /source-cmd-default-transformer received termination token with Status COMPLETED
2026-06-08 20:09:08.522 DEBUG    COMPLETED Step /output_name-cmd-default-transformer
2026-06-08 20:09:08.522 DEBUG    COMPLETED Step /source-cmd-default-transformer-injector
2026-06-08 20:09:08.522 DEBUG    COMPLETED Step /source-cmd-default-transformer
2026-06-08 20:09:08.522 DEBUG    Step /__transfer__/output_name received inputs ['0']
2026-06-08 20:09:08.522 DEBUG    Step /output_name-token-transformer received termination token with Status COMPLETED
2026-06-08 20:09:08.522 DEBUG    Step /__transfer__/source received inputs ['0']
2026-06-08 20:09:08.522 DEBUG    Step /__schedule__ received inputs ['0', '0']
2026-06-08 20:09:08.522 DEBUG    Step /source-token-transformer received termination token with Status COMPLETED
2026-06-08 20:09:08.522 DEBUG    Retrieving available locations for job /0 on 644c4bd9-33c8-4ccd-9d82-a8726d781d98/mfisherman/mpich:4.3.2.
2026-06-08 20:09:08.522 INFO     DEPLOYING 644c4bd9-33c8-4ccd-9d82-a8726d781d98
2026-06-08 20:09:08.522 DEBUG    EXECUTING command singularity --version 2>&1 on __LOCAL__/__LOCAL__ 
2026-06-08 20:09:08.523 DEBUG    COMPLETED Step /output_name-token-transformer
2026-06-08 20:09:08.523 DEBUG    COMPLETED Step /source-token-transformer
2026-06-08 20:09:08.535 DEBUG    Using apptainer version 1.4.5.
2026-06-08 20:09:08.535 DEBUG    EXECUTING command singularity instance start    --bind  "/tmp/streamflow:/tmp/streamflow"     --cleanenv    --contain                       --net   --network  "none"                         docker://mfisherman/mpich:4.3.2 6c8d7a7e-64de-40b2-b970-374475f59147  2>&1 on __LOCAL__/__LOCAL__ 
2026-06-08 20:09:10.089 DEBUG    EXECUTING command singularity instance list --json 2>&1 on __LOCAL__/__LOCAL__ 
2026-06-08 20:09:10.107 DEBUG    EXECUTING command nproc 2>&1 on SubprocessShell with command `singularity exec instance://6c8d7a7e-64de-40b2-b970-374475f59147 sh`
2026-06-08 20:09:10.163 DEBUG    EXECUTING command cat /proc/meminfo | grep MemTotal | awk '{print $2}' 2>&1 on SubprocessShell with command `singularity exec instance://6c8d7a7e-64de-40b2-b970-374475f59147 sh`
2026-06-08 20:09:10.171 DEBUG    EXECUTING command cat /proc/1/mountinfo 2>&1 on SubprocessShell with command `singularity exec instance://6c8d7a7e-64de-40b2-b970-374475f59147 sh`
2026-06-08 20:09:10.172 DEBUG    Container binds: {'/tmp/streamflow': '/tmp/streamflow', '/etc/localtime': '/usr/share/zoneinfo/Europe/Madrid', '/sys/firmware/efi/efivars': '/sys/firmware/efi/efivars/'}
2026-06-08 20:09:10.172 DEBUG    EXECUTING command df -aT | tail -n +2 | awk 'NF == 1 {device = $1; getline; $0 = device $0} {print $7, $2, $5}' 2>&1 on SubprocessShell with command `singularity exec instance://6c8d7a7e-64de-40b2-b970-374475f59147 sh`
2026-06-08 20:09:10.182 INFO     COMPLETED deployment of 644c4bd9-33c8-4ccd-9d82-a8726d781d98
2026-06-08 20:09:10.182 DEBUG    EXECUTING command test -e /tmp/streamflow && readlink -f /tmp/streamflow 2>&1 on SubprocessShell with command `singularity exec instance://6c8d7a7e-64de-40b2-b970-374475f59147 sh`
2026-06-08 20:09:10.184 DEBUG    Not enough available locations: job /0 requires 1 locations on deployment 644c4bd9-33c8-4ccd-9d82-a8726d781d98/mfisherman/mpich:4.3.2, but only 0 are available.

Any clue what I'm doing wrong?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions