Commit fead6df4 authored by Jens Korinth's avatar Jens Korinth

SLURM: add comment to jobs containing the composition

parent cd1ac9ed
......@@ -6,6 +6,7 @@
#SBATCH --mem-per-cpu=@@MEM_PER_CPU@@
#SBATCH -n @@CPUS@@
#SBATCH -t @@TIMELIMIT@@
#SBATCh --comment="@@COMMENT@@"
export TAPASCO_HOME=@@TAPASCO_HOME@@
source ~/vivado.sh
......
......@@ -29,7 +29,9 @@ final object Slurm extends Publisher {
/** Time limit (in hours). */
maxHours: Int,
/** Sequence of commands to execute (bash). */
commands: Seq[String]
commands: Seq[String],
/** Optional comment. */
comment: Option[String] = None
)
/** Exception class for negative SLURM responses. */
......@@ -91,6 +93,7 @@ final object Slurm extends Publisher {
jobScript("TIMELIMIT") = "%02d:00:00".format(job.maxHours)
jobScript("TAPASCO_HOME") = FileAssetManager.TAPASCO_HOME.toString
jobScript("COMMANDS") = job.commands mkString "\n"
jobScript("COMMENT") = job.comment getOrElse ""
// create parent directory
Files.createDirectories(file.getParent())
// write file
......
......@@ -89,7 +89,8 @@ class ComposeTask(composition: Composition,
errorLog = _errorLogFile.toString,
consumer = this,
maxHours = ComposeTask.MAX_COMPOSE_HOURS,
commands = Seq("tapasco --configFile %s".format(cfgFile.toString))
commands = Seq("tapasco --configFile %s".format(cfgFile.toString)),
comment = Some("%s".format(composition.composition map (ce => "%s % d".format(ce.kernel, ce.count)) mkString ", "))
)
// generate non-SLURM config with single job
val newCfg = cfg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment