nextflow
nextflow copied to clipboard
cpus and sge error
Hi,I have the following scripts:
test.nf
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
process test1 {
cpus = 1
input:
val name
output:
val name
path "${name}.test1.txt"
script:
"""
date > "${name}.test1.txt"
sleep 10
date >> "${name}.test1.txt"
"""
}
process test2 {
cpus = 2
executor 'sge'
input:
val name
path test1_out
output:
path "${name}.test2.txt"
script:
"""
date > "${name}.test2.txt"
sleep 5
date >> "${name}.test2.txt"
echo ${task.cpus} >> "${name}.test2.txt"
"""
}
process test3 {
input:
path test2_outs
output:
path "test3.txt"
script:
"""
date > test3.txt
sleep 5
date >> test3.txt
"""
}
workflow {
names = channel.fromList(['A', 'B', 'C', 'D', 'E'])
test1(names)
test2(test1.out[0], test1.out[1])
test3(test2.out.collect())
}
test.config
executor {
$local {
cpus = 3
}
$sge {
queueSize = 3
queue = 'all.q'
}
}
process.executor = 'sge'
When I execute the command (nextflow -C test.config run test.nf)I get an error:
N E X T F L O W ~ version 22.04.3
Launching `test.nf` [intergalactic_goodall] DSL2 - revision: 27e592bff8
executor > sge (5)
[3e/5f20b5] process > test1 (4) [ 60%] 3 of 5
[- ] process > test2 [ 0%] 0 of 3
executor > sge (5)
[de/974b8b] process > test1 (2) [100%] 3 of 3
[30/da87d1] process > test2 (1) [ 33%] 1 of 3, failed: 1
[- ] process > test3 -
Error executing process > 'test2 (1)'
Caused by:
Failed to submit process to grid scheduler for execution
Command executed:
qsub -terse .command.run
Command exit status:
-
Command output:
(empty)
Work dir:
/test/nextflow/work/30/da87d19d171d770a553751516491df
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
When I execute the command (qsub .command.run) in the directory(/test/nextflow/work/30/da87d19d171d770a553751516491df), I get an error:
Unable to run job: "job" denied: use parallel environments instead of requesting slots explicitly.
Exiting.
I found that the error was caused by "#$ -l slots=2" in the .command.run.
How can I delete -l slots=2 without modifying cpus=1?