
local-cores: 16 # front end / head node cores
cores: 2048 # cluster cores
jobs: 1000 # max parallel jobs


keep-going: true 
#rerun-incomplete: true
latency-wait: 120
keep-incomplete: true # Should be true for debugging rules.
rerun-triggers: "mtime" # only schedule jobs to rerun if there has been a change in mtime of input/output files. That is: ignore code changes

# This one could be cool to have working 
show-failed-logs: true
jobname: "ac2_{name}_{jobid}.sh" # Super helpful because it shows the job in qstat

# Apptainer
use-conda: true # This one is necessary to activate the environment inside the apptainer image.
use-singularity: true

singularity-prefix: "~/.asscom2/singularity-prefix" # Directory in which singularity images will be stored. Couldn't find a way of using the $ASSCOM_BASE system variable, so users should manually change this here if they want to use something else.
singularity-args: "--bind $ASSCOM2_BASE,$ASSCOM2_DATABASES" # Must also bind ASSCOM2_BASE so we can access databases and report scripts etc. When this issue is solved I'll add individual arguments to rules and make it more flexible https://github.com/snakemake/snakemake/issues/262



# ---- QUT CMR Lyra specifics ----

cluster-cancel: "qdel"


cluster:
  mkdir -p output_asscom2/logs/old/ && 
  qsub 
    -V 
    -A $USER 
    -q YOURACCOUNTNAMEHERE 
    -e output_asscom2/logs/%j-{rule}.err.log 
    -o output_asscom2/logs/%j-{rule}.out.log
    -l select=1:ncpus={threads}:mem={resources.mem_mb}mb,walltime={resources.runtime} 






default-resources:
  - mem_mb=1024
  - runtime='12h'
  
  

