0
$\begingroup$

I have a cluster that is set up with slurm and I seek to use Cromwell to dispatch jobs to the slurm scheduler. I followed the description explained on Cromwells Documentation Website. And created a configuration file called cromwellconfig.conf, however when I run it using the command java -Dconfig.file=/lccs/home/logio9/Configure_Cromwell/cromwellconfig.conf \ -jar cromwell-77.jar run test-workflow.wdl I get an error parsing the config file. I am confused as to where the error is, bellow is the contents of the configuration file:

include required(classpath("application"))

backend {
  default = SLURM
  providers {
    SLURM {
      actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
      config {
        runtime-attributes = """
        Int runtime_minutes = 600
        Int cpus = 2
        Int requested_memory_mb_per_core = 8000
        String queue = "short"
        String jobname = "testwork"
        String cwd = "/lccs/home/logio9/Configure_Cromwell"
        String err = "errors.output"
        String out = "ouput.out"
        """
        
      
        submit = """
            sbatch -J ${jobname} -D ${cwd} -o ${out} -e ${err} -t ${runtime_minutes} -p ${queue} \
            ${"-c " + cpus} \
        --mem-per-cpu ${requested_memory_mb_per_core} \
            --wrap "/bin/bash ${script}"
    """  
    kill = "scancel ${job_id}"
        check-alive = "squeue -j ${job_id}"
        job-id-regex = "Submitted batch job (\\d+).*"
      }
    }
  }
}
  

This is the test wdl script I made, it copies a very large directory into another directory.

version 1.0

workflow Greetings {
    call SayHello {
    }
}

task SayHello {
    command <<<
        cp -R /lccs/home/logio9/Configure_Cromwell/tf1 /lccs/home/logio9/Configure_Cromwell/tf2

    >>>
    output {
        Array[String] out = read_lines(stdout())
    }
}

If anyone has had experience with this, please do share a bit on how exactly this configuration works.

$\endgroup$
2
  • $\begingroup$ Could you provide what is exactly the error that you are getting? $\endgroup$
    – user324810
    May 1, 2022 at 18:31
  • $\begingroup$ It says: java.lang.RuntimeException: Error parsing generated wdl: and Caused by: wdl.draft2.parser.WdlParser$SyntaxError: ERROR: Sibling nodes have conflicting names: Declaration defined here (line 5, col 1): String cwd ^ $\endgroup$ May 2, 2022 at 1:07

1 Answer 1

1
$\begingroup$

Cromwell already defines the cwd, err and out runtime attributes by itself (it also defines a job_name and script). So when you define these variables in your config it causes a name conflict, since they already exist.

Cromwell will make a directory inside of the "cromwell-executions" directory (created when you run cromwell) for each job it runs. It will write the script, various stdout and stderr files, and the rc file to this directory. The intend is also for the job to run in that directory. Hence cromwell provides these runtime attributes to point to the appropriate locations within this directory so they can be used in your custom submission command.

You can try just removing these variables in the runtime-attributes section, while keeping them in the submit section.

$\endgroup$
4
  • $\begingroup$ Thank you for your explanation, your solution works. The only issue that I am having is when I run Cromwell with the command above, Cromwell still seems to be running. If I do a CTRL + C, it stops Cromwell and quits the slurm job. Is there a way to simply dispatch the job to slurm and have Cromwell return/exit? Or perhaps have Cromwell run in the background? $\endgroup$ May 4, 2022 at 18:58
  • $\begingroup$ @LogiosJames Cromwell is designed to run multiple consecutive jobs which rely on each other's outputs. So, it needs to keep running in order to check up on the status of the jobs it has dispatched and then submit the next jobs when their inputs have become available. You could just submit the cromwell process to the cluster in the traditional way, though, and have it run on an execution node (eg. sbatch [...] --wrap cromwell run worklow.wdl). Or use something like byobu/tmux and run cromwell in one window and do your other work in another. $\endgroup$
    – DavyCats
    May 5, 2022 at 9:57
  • $\begingroup$ Ok, good to note. I normally access and work with Cromwell on my cluster via an ssh connection, if I am running my workflow as I described above and my ssh connection to my cluster closes, would Cromwell continue executing, or would it exit/stop upon the connection closing? $\endgroup$ May 5, 2022 at 19:50
  • $\begingroup$ @LogiosJames If you just run cromwell directly in your ssh session it will stop when you disconnect. If you submit cromwell to an execution node, it will keep running on that node. If you open a tmux or byobu session, those sessions will stay alive when you disconnect and you can reconnect with those sessions later using tmux attach-session -t 0 or byobu respectively. $\endgroup$
    – DavyCats
    May 6, 2022 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.