ensembl-hive  2.8.1
MemlimitTest_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
9  init_pipeline.pl Bio::EnsEMBL::Hive::Examples::FailureTest::PipeConfig::MemlimitTest_conf -password <your_password>
10 
11 =head1 DESCRIPTION
12 
13  This is another example pipeline built around FailureTest.pm RunnableDB. It consists of two analyses:
14 
15  Analysis_1: JobFactory.pm is used to create an array of jobs -
16 
17  these jobs are sent down the branch #2 into the second analysis
18 
19  Analysis_2: FailureTest.pm in "memory grab" mode may overrun the current resource's memory limit and be killed by the LSF
20 
21 =head1 LICENSE
22 
23  See the NOTICE file distributed with this work for additional information
24  regarding copyright ownership.
25 
26  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
27  You may obtain a copy of the License at
28 
29  http://www.apache.org/licenses/LICENSE-2.0
30 
31  Unless required by applicable law or agreed to in writing, software distributed under the License
32  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33  See the License for the specific language governing permissions and limitations under the License.
34 
35 =head1 CONTACT
36 
37  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
38 
39 =cut
40 
41 
42 package Bio::EnsEMBL::Hive::Examples::FailureTest::PipeConfig::MemlimitTest_conf;
43 
44 use strict;
45 use warnings;
46 
47 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
48 
49 
50 sub resource_classes {
51  my ($self) = @_;
52  return {
53  %{$self->SUPER::resource_classes}, # inherit 'default' from the parent class
54 
55  'default' => {'LSF' => '-C0 -M100 -R"select[mem>100] rusage[mem=100]"' }, # to make sure it fails similarly on both farms
56  '200Mb_job' => {'LSF' => '-C0 -M200 -R"select[mem>200] rusage[mem=200]"' },
57  '400Mb_job' => {'LSF' => '-C0 -M400 -R"select[mem>400] rusage[mem=400]"' },
58  '1Gb_job' => {'LSF' => '-C0 -M1000 -R"select[mem>1000] rusage[mem=1000]"' },
59  };
60 }
61 
62 
63 sub pipeline_analyses {
64  my ($self) = @_;
65  return [
66  { -logic_name => 'generate_jobs',
68  -meadow_type => 'LOCAL',
69  -parameters => {
70  'column_names' => [ 'grab_mln' ],
71  },
72  -input_ids => [
73  { 'inputlist' => [ 0.6 , 0.8 , 1.0 , 1.2 , 1.4 , 1.6 , 1.8 , 2.0, 2.5, 3.0, 5.0, 7.0, 10 ], },
74  ],
75 
76  -flow_into => {
77  2 => [ 'failure_test' ],
78  },
79  },
80 
81  { -logic_name => 'failure_test',
83  -parameters => {
84  'time_RUN' => 30,
85  },
86  -rc_name => 'default', # pick a valid value from resource_classes() section
87  },
88  ];
89 }
90 
91 1;
92 
Bio::EnsEMBL::Hive::Examples::FailureTest::RunnableDB::FailureTest
Definition: FailureTest.pm:44
Bio::EnsEMBL::Hive::Examples::FailureTest::PipeConfig::MemlimitTest_conf
Definition: MemlimitTest_conf.pm:24
Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf
Definition: HiveGeneric_conf.pm:54
Bio::EnsEMBL::Hive::RunnableDB::JobFactory
Definition: JobFactory.pm:35