Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error in cylc play --startcp #6225

Closed
wxtim opened this issue Jul 12, 2024 · 2 comments
Closed

Unhandled error in cylc play --startcp #6225

wxtim opened this issue Jul 12, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@wxtim
Copy link
Member

wxtim commented Jul 12, 2024

Found whilst checking CLI in #6213 :

Description

If a single Cycle workflow has an inital cycle point set either by CLI or config and a --startcp set the by the CLI the workflow shuts down with an unhandled error.

I can't imagine that this is a reasonable set of things to do, and I wouldn't expect it to do anything (R1 being the ICP, not Start CP), but it shouldn't do this:

ERROR - min() arg is an empty sequence
    Traceback (most recent call last):
      File "/net/home/h02/tpilling/metomi/cylc-flow/cylc/flow/scheduler.py", line 741, in start
        await self.configure(params)
      File "/net/home/h02/tpilling/metomi/cylc-flow/cylc/flow/scheduler.py", line 495, in configure
        self._load_pool_from_point()
      File "/net/home/h02/tpilling/metomi/cylc-flow/cylc/flow/scheduler.py", line 782, in _load_pool_from_point
        self.pool.load_from_point()
      File "/net/home/h02/tpilling/metomi/cylc-flow/cylc/flow/task_pool.py", line 193, in load_from_point
        self.compute_runahead()
      File "/net/home/h02/tpilling/metomi/cylc-flow/cylc/flow/task_pool.py", line 321, in compute_runahead
        base_point = min(
    ValueError: min() arg is an empty sequence
CRITICAL - Workflow shutting down - min() arg is an empty sequence

Reproducible Example

#!/bin/bash
# This is not a vip error - this appears to be soemthing which
# happens anyway.

TMP=$(mktemp -d)
echo Files extracted to ${TMP}
mkdir "${TMP}/."

cat > "${TMP}/./flow.cylc" <<__ICI__
[scheduler]
    allow implicit tasks = True
    cycle point format = %Y

[scheduling]
    initial cycle point = 2020
    [[graph]]
        R1 = foo
__ICI__

cylc install "${TMP}" \
    --workflow-name throwaway/ten.marrow

cylc play throwaway/ten.marrow \
    --no-detach \
    --startcp 2022 \
@wxtim wxtim added the bug label Jul 12, 2024
@wxtim wxtim added this to the 8.3.x milestone Jul 12, 2024
@oliver-sanders oliver-sanders self-assigned this Jul 12, 2024
@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 12, 2024

The issue appears to be the lack of cycling sequences.

The example can be reduced to:

[scheduler]    
    allow implicit tasks = True    
                                                                                                                                   
[scheduling]    
    initial cycle point = 2020    
    [[graph]]    
        R1 = foo   

The issue goes away if you change that to:

    [[graph]]    
        P1 = foo   

@oliver-sanders
Copy link
Member

Actually this is an error case anyway, there are no tasks beyond the startcp (because the only task in the workflow is at R1 i.e. the ICP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants