Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
5e18e801
Commit
5e18e801
authored
Nov 08, 2020
by
Matthieu Muffato
Committed by
ens-bwalts
Nov 12, 2020
Browse files
Check that LSF detection works as expected
parent
3c9db527
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
1 deletion
+90
-1
t/04.meadow/lsf.t
t/04.meadow/lsf.t
+20
-1
t/04.meadow/lsf_detection/no_slurm_gcloud/lsid
t/04.meadow/lsf_detection/no_slurm_gcloud/lsid
+10
-0
t/04.meadow/lsf_detection/ok_EBI/lsid
t/04.meadow/lsf_detection/ok_EBI/lsid
+12
-0
t/04.meadow/lsf_detection/ok_YODA/lsid
t/04.meadow/lsf_detection/ok_YODA/lsid
+12
-0
t/04.meadow/lsf_detection/ok_cluster1/lsid
t/04.meadow/lsf_detection/ok_cluster1/lsid
+12
-0
t/04.meadow/lsf_detection/ok_lsf91_bw3/lsid
t/04.meadow/lsf_detection/ok_lsf91_bw3/lsid
+13
-0
t/04.meadow/lsf_detection/ok_openlava/lsid
t/04.meadow/lsf_detection/ok_openlava/lsid
+11
-0
No files found.
t/04.meadow/lsf.t
View file @
5e18e801
...
@@ -21,13 +21,14 @@ use warnings;
...
@@ -21,13 +21,14 @@ use warnings;
use
Cwd
;
use
Cwd
;
use
File::
Basename
;
use
File::
Basename
;
use
Test::
More
tests
=>
2
2
;
use
Test::
More
tests
=>
2
4
;
use
Test::
Exception
;
use
Test::
Exception
;
use
Bio::EnsEMBL::Hive::Utils::
Config
;
use
Bio::EnsEMBL::Hive::Utils::
Config
;
BEGIN
{
BEGIN
{
use_ok
(
'
Bio::EnsEMBL::Hive::Valley
'
);
use_ok
(
'
Bio::EnsEMBL::Hive::Valley
'
);
use_ok
(
'
Bio::EnsEMBL::Hive::Meadow::LSF
'
);
}
}
# Need EHIVE_ROOT_DIR to access the default config file
# Need EHIVE_ROOT_DIR to access the default config file
...
@@ -223,5 +224,23 @@ lives_and( sub {
...
@@ -223,5 +224,23 @@ lives_and( sub {
}
# end local $ENV{'PATH'}
}
# end local $ENV{'PATH'}
subtest
"
Cluster detection
",
sub
{
my
$lsf_detection_root_dir
=
$ENV
{'
EHIVE_ROOT_DIR
'}
.
'
/t/04.meadow/lsf_detection
';
opendir
(
my
$dir_fh
,
$lsf_detection_root_dir
)
||
die
"
Can't opendir
$lsf_detection_root_dir
: $!
";
foreach
my
$subdir
(
readdir
(
$dir_fh
)
)
{
next
unless
-
d
"
$lsf_detection_root_dir
/
$subdir
";
local
$ENV
{'
PATH
'}
=
"
$lsf_detection_root_dir
/
$subdir
:
$ini_path
";
if
(
$subdir
=~
/^ok_(.*)$/
)
{
my
$detected_name
=
Bio::EnsEMBL::Hive::Meadow::LSF::
name
();
ok
(
$detected_name
,
"
Detects
$subdir
");
is
(
$detected_name
,
$
1
,
"
Correct cluster name
");
}
elsif
(
$subdir
=~
/^no/
)
{
my
$detected_name
=
Bio::EnsEMBL::Hive::Meadow::LSF::
name
();
ok
(
!
$detected_name
,
"
Does not detect
$subdir
");
}
}
closedir
(
$dir_fh
);
};
done_testing
();
done_testing
();
t/04.meadow/lsf_detection/no_slurm_gcloud/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
exec cat
<<
EOF
Slurm 20.02.3, Feb 1 2020
Copyright SchedMD LLC, 2010-2017.
My cluster name is g2
My master name is g2-controller
EOF
t/04.meadow/lsf_detection/ok_EBI/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
# LSF EBI "noah" farm
exec cat
<<
EOF
IBM Spectrum LSF Standard 10.1.0.6, May 25 2018
Copyright International Business Machines Corp. 1992, 2016.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
My cluster name is EBI
My master name is ebi-master-001
EOF
t/04.meadow/lsf_detection/ok_YODA/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
# LSF EBI "yoda" farm
exec cat
<<
EOF
IBM Spectrum LSF Standard 10.1.0.0, Jul 08 2016
Copyright International Business Machines Corp. 1992, 2016.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
My cluster name is YODA
My master name is hh-yoda-02-02.ebi.ac.uk
EOF
t/04.meadow/lsf_detection/ok_cluster1/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
# Old LSF version (7.*)
# http://sunray2.mit.edu/kits/platform-lsf/7.0.6/1/guides/kit_lsf_guide_source/admin/cluster_ops.html
exec cat
<<
EOF
Platform LSF 7 Update 6 May 6 2009
Copyright 1992-2009 Platform Computing Corporation
My cluster name is cluster1
My master name is hostA
EOF
t/04.meadow/lsf_detection/ok_lsf91_bw3/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
# Old LSF version (9.*)
# https://www.bsc.es/support/LSF/9.1.2/lsf_admin/index.htm?cluster_info_viewing_lsf.html~main
exec cat
<<
EOF
IBM Platform LSF Standard 9.1.2, May 5 2013
© Copyright IBM Corporation 1992, 2013.
US Governmant Users Restricted Rights - Use, duplication or disclosure restricted
by GSA ADP Schedule Contract with IBM Corp.
My cluster name is lsf91_bw3
My master name is delpe04.lsf.ibm.com
EOF
t/04.meadow/lsf_detection/ok_openlava/lsid
0 → 100755
View file @
5e18e801
#!/bin/sh
# openlava
# https://jensd.be/404/linux/install-and-use-the-openlava-job-scheduler-and-openlava-web-gui-on-centos
exec cat
<<
EOF
openlava project 2.2, Nov 6 2014
My cluster name is openlava
My master name is node01
EOF
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