# Workflow with resource constraints
# Tests jobs with memory and thread requirements

rule all:
    input:
        "output/high_mem.txt",
        "output/multi_thread.txt",
        "output/combined.txt"

rule high_memory_job:
    output:
        "output/high_mem.txt"
    resources:
        mem_mb=1000
    shell:
        """
        echo "High memory job (1000MB)" > {output}
        """

rule multi_thread_job:
    output:
        "output/multi_thread.txt"
    threads: 2
    shell:
        """
        echo "Multi-threaded job (2 threads)" > {output}
        """

rule combined_resources_job:
    output:
        "output/combined.txt"
    threads: 2
    resources:
        mem_mb=500
    shell:
        """
        echo "Combined resources job" > {output}
        """
