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
f1c17c2d
Commit
f1c17c2d
authored
Oct 12, 2020
by
Matthieu Muffato
Committed by
ens-bwalts
Nov 12, 2020
Browse files
Make sure this is a real LSF (or openlava) and exclude Slurm clusters that ship "lsid"
parent
5f942cd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
+7
-3
t/04.meadow/fake_bin/lsid
t/04.meadow/fake_bin/lsid
+1
-0
No files found.
modules/Bio/EnsEMBL/Hive/Meadow/LSF.pm
View file @
f1c17c2d
...
...
@@ -54,12 +54,16 @@ our $VERSION = '3.1'; # Semantic version of the Meadow interface:
=cut
sub
name
{
my
$mcni
=
'
My cluster name is
';
my
$re_lsf_names
=
qr/(IBM Spectrum LSF|Platform LSF|openlava project)/
;
my
$re_cluster_name
=
qr/^My cluster name is\s+(\S+)/
;
my
@lsid_out
=
`
lsid 2>/dev/null
`;
my
$is_lsf
=
0
;
foreach
my
$lsid_line
(
@lsid_out
)
{
if
(
$lsid_line
=~
/^$mcni\s+(\S+)/
)
{
return
$
1
;
if
(
$lsid_line
=~
$re_lsf_names
)
{
$is_lsf
=
1
;
}
elsif
(
$lsid_line
=~
$re_cluster_name
)
{
return
$
1
if
$is_lsf
;
}
}
}
...
...
t/04.meadow/fake_bin/lsid
View file @
f1c17c2d
#!/bin/bash
echo
"Platform LSF"
echo
'My cluster name is test_clUster'
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