Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
c25b660f
Commit
c25b660f
authored
14 years ago
by
Andreas Kusalananda Kähäri
Browse files
Options
Downloads
Patches
Plain Diff
Only submit sequence dumping jobs if there are jobs to submit.
parent
76bfdd44
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/id_mapping/dump_cache.pl
+27
-22
27 additions, 22 deletions
misc-scripts/id_mapping/dump_cache.pl
with
27 additions
and
22 deletions
misc-scripts/id_mapping/dump_cache.pl
+
27
−
22
View file @
c25b660f
...
...
@@ -278,40 +278,45 @@ sub build_cache_by_seq_region {
# run lsf job array
$logger
->
info
("
\n
Submitting
$num_jobs
jobs to lsf.
\n
");
$logger
->
debug
("
$cmd
\n\n
");
$logger
->
debug
("
$pipe
\n\n
");
local
*BSUB
;
open
BSUB
,
$pipe
or
$logger
->
error
("
Could not open open pipe to bsub: $!
\n
");
if
(
$num_jobs
>
0
)
{
$logger
->
debug
("
$cmd
\n\n
");
$logger
->
debug
("
$pipe
\n
\n
");
print
BSUB
$cmd
;
$logger
->
error
("
Error submitting jobs: $!
\n
")
unless
(
$?
==
0
);
close
BSUB
;
local
*BSUB
;
open
BSUB
,
$pipe
or
$logger
->
error
("
Could not open open pipe to bsub: $!
\n
");
# submit dependent job to monitor finishing of jobs
$logger
->
info
(
"
Waiting for jobs to finish...
\n
",
0
,
'
stamped
'
);
print
BSUB
$cmd
;
$logger
->
error
("
Error submitting jobs: $!
\n
")
unless
(
$?
==
0
);
close
BSUB
;
my
$dependent_job
=
qq{bsub -K -w "ended($lsf_name)" }
.
$conf
->
param
('
lsf_opt_run_small
')
.
qq{ -o $logpath/dump_cache.$dbtype.depend.out /bin/true}
;
# submit dependent job to monitor finishing of jobs
$logger
->
info
(
"
Waiting for jobs to finish...
\n
",
0
,
'
stamped
'
);
system
(
$dependent_job
)
==
0
or
$logger
->
error
("
Error submitting dependent job: $!
\n
");
my
$dependent_job
=
qq{bsub -K -w "ended($lsf_name)" }
.
$conf
->
param
('
lsf_opt_run_small
')
.
qq{ -o $logpath/dump_cache.$dbtype.depend.out /bin/true}
;
$logger
->
info
(
"
All jobs finished.
\n
",
0
,
'
stamped
'
);
system
(
$dependent_job
)
==
0
or
$logger
->
error
("
Error submitting dependent job: $!
\n
");
$logger
->
info
(
"
All jobs finished.
\n
",
0
,
'
stamped
'
);
sleep
(
5
);
}
## end if ( $num_jobs > 0 )
# check for lsf errors
sleep
(
5
);
my
$err
;
foreach
my
$i
(
1
..
$num_jobs
)
{
$err
++
unless
(
-
e
"
$logpath
/dump_by_seq_region.
$dbtype
.
$i
.success
"
);
if
(
!-
e
"
$logpath
/dump_by_seq_region.
$dbtype
.
$i
.success
"
)
{
$err
++
;
}
}
if
(
$err
)
{
if
(
$err
>
0
)
{
$logger
->
error
(
"
At least one of your jobs failed.
\n
"
.
"
Please check the logfiles at
$logpath
for errors.
\n
"
);
return
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment