Skip to content

Commit

Permalink
fix issues with resubmit on mira
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 19, 2015
1 parent 419dc93 commit cc31e80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cime_config/cesm/machines/config_machines.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@
<BATCHQUERY>qstat</BATCHQUERY>
<BATCHSUBMIT>qsub</BATCHSUBMIT>
<BATCHREDIRECT></BATCHREDIRECT>
<SUPPORTED_BY> mickelso -at- mcs.anl.gov</SUPPORTED_BY>
<SUPPORTED_BY> cseg </SUPPORTED_BY>
<GMAKE_J>4</GMAKE_J>
<MAX_TASKS_PER_NODE>64</MAX_TASKS_PER_NODE>
<PES_PER_NODE>8</PES_PER_NODE>
Expand Down
6 changes: 3 additions & 3 deletions cime_config/cesm/machines/template.cesmrun
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ sub doPreRunChecks()
$logger->info(" - To prestage restarts, untar a restart.tar file into $config{'RUNDIR'}");

# Run preview namelists.. should turn this into a module at some point..
system("./preview_namelists -loglevel $opts{loglevel}");
system("./preview_namelists -loglevel $opts{loglevel} ");

if($?)
{
Expand Down Expand Up @@ -248,7 +248,7 @@ sub checkInputData()
$out.="expected location, and are not from the input data repository.\n";
$out.="This is informational only.\n";
$logger->warn($out);
system("./check_input_data -inputdata $config{'DIN_LOC_ROOT'} -check -loglevel $opts{loglevel}");
system("./check_input_data -inputdata $config{'DIN_LOC_ROOT'} -check -loglevel $opts{loglevel} ");
}

if(@missing)
Expand Down Expand Up @@ -490,7 +490,7 @@ sub resubmitCheck()
my $submitscript = "$config{'CASEROOT'}/case.submit";
my $cwd = getcwd;
chdir $config{'CASEROOT'};
my $resubmitcommand = "$submitscript -resubmit -scriptname case. -loglevel $opts{loglevel}";
my $resubmitcommand = "$submitscript -resubmit -scriptname case.";

if(defined $config{TESTCASE} && $config{TESTCASE} eq "ERR"){
$resubmitcommand .= "test";
Expand Down
6 changes: 3 additions & 3 deletions cime_config/cesm/machines/template.starchive
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Batch system directives
#------------------------------------------------------------------------------
{{ batchdirectives }}

use strict;
if(! -e "./xmlquery" and defined $ENV{'PBS_O_WORKDIR'})
{
chdir $ENV{'PBS_O_WORKDIR'};
Expand All @@ -21,7 +21,7 @@ require Batch::BatchUtils;
use Cwd;
require Log::Log4perl;

my $level = Log::Log4perl::Level::to_priority("DEBUG");
my $level = Log::Log4perl::Level::to_priority("INFO");
Log::Log4perl->easy_init({level=>$level,
layout=>'%m%n'});

Expand Down Expand Up @@ -63,7 +63,7 @@ sub resubmitCheck()
my $submitscript = "$config{'CASEROOT'}/case.submit";
my $cwd = getcwd;
chdir $config{CASEROOT};
my $resubmitcommand = "$submitscript -resubmit -scriptname case.st_archive -loglevel $opts{loglevel}";
my $resubmitcommand = "$submitscript -resubmit -scriptname case.st_archive";
$logger->debug( "running resubmit check $resubmitcommand");
if(-e $testlog){
open(TL,">>$testlog");
Expand Down
5 changes: 5 additions & 0 deletions utils/perl5lib/Batch/BatchMaker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ sub setQueue()
# Get the queue from env_batch.xml if its defined there
# otherwise get the default from config_machines.xml
# and set it in env_batch.xml
if(! defined $self->{envBatch}){
$logger->logdie("envBatch not defined");
}elsif(! defined $self->{job}){
$logger->logdie("job not defined");
}

my $queue = $self->{envBatch}{$self->{job}}{JOB_QUEUE};

Expand Down

0 comments on commit cc31e80

Please sign in to comment.