Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
6dda6ab4
Commit
6dda6ab4
authored
Jul 03, 2018
by
Brandon Walts
Browse files
Merge branch 'version/2.1' into version/2.2
parents
7765fe85
87b9e8f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
+10
-9
No files found.
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
View file @
6dda6ab4
...
...
@@ -87,18 +87,20 @@ sub count_pending_workers_by_rc_name {
my
(
$self
)
=
@_
;
my
$jnp
=
$self
->
job_name_prefix
();
my
$cmd
=
"
bjobs -w -J '
${jnp}
*' 2>/dev/null
| grep PEND
"
;
# "-u all" has been removed to ensure one user's PEND processes
# do not affect another user helping to run the same pipeline.
my
@bjobs_out
=
qx{
bjobs -w -J '${jnp}*' 2>/dev/null
}
;
# "-u all" has been removed to ensure one user's PEND processes
# do not affect another user helping to run the same pipeline.
# warn "LSF::count_pending_workers_by_rc_name() running cmd:\n\t$cmd\n";
my
%pending_this_meadow_by_rc_name
=
();
my
$total_pending_this_meadow
=
0
;
foreach
my
$line
(
qx/$cmd/
)
{
if
(
$line
=~
/\b\Q$jnp\E(\S+)\-\d+(\[\d+\])?\b/
)
{
$pending_this_meadow_by_rc_name
{
$
1
}
++
;
$total_pending_this_meadow
++
;
foreach
my
$line
(
@bjobs_out
)
{
if
(
$line
=~
/PEND/
)
{
if
(
$line
=~
/\b\Q$jnp\E(\S+)\-\d+(\[\d+\])?\b/
)
{
$pending_this_meadow_by_rc_name
{
$
1
}
++
;
$total_pending_this_meadow
++
;
}
}
}
...
...
@@ -110,12 +112,11 @@ sub count_running_workers {
my
(
$self
)
=
@_
;
my
$jnp
=
$self
->
job_name_prefix
();
my
$cmd
=
"
bjobs -w -J '
${jnp}
*' -u all 2>/dev/null
| grep RUN | wc -l
"
;
my
@bjobs_out
=
qx{
bjobs -w -J '${jnp}*' -u all 2>/dev/null
}
;
# warn "LSF::count_running_workers() running cmd:\n\t$cmd\n";
my
$run_count
=
qx/$cmd/
;
$run_count
=~
s/\s+//g
;
# remove both leading and trailing spaces
my
$run_count
=
scalar
(
grep
{
/RUN/
}
@bjobs_out
);
return
$run_count
;
}
...
...
Write
Preview
Markdown
is supported
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