Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
fead6df4
Commit
fead6df4
authored
Jun 07, 2017
by
Jens Korinth
Browse files
SLURM: add comment to jobs containing the composition
parent
cd1ac9ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/slurm.job.template
View file @
fead6df4
...
...
@@ -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
...
...
src/main/scala/tapasco/slurm/Slurm.scala
View file @
fead6df4
...
...
@@ -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
...
...
src/main/scala/tapasco/task/ComposeTask.scala
View file @
fead6df4
...
...
@@ -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
...
...
Jens Korinth
@jk
mentioned in commit
a831b501
·
Jul 14, 2017
mentioned in commit
a831b501
mentioned in commit a831b5015df6bd8f8d23ddd334a3b1159392de92
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment