Skip to content

Commit

Permalink
Merge pull request #137 from GEOS-ESM/feature/jstassi/#83/#119/AOD-pa…
Browse files Browse the repository at this point in the history
…rallel-and-runjob-consistency-check

Feature/jstassi/#83/#119/aod parallel and runjob consistency check
  • Loading branch information
rtodling authored Dec 13, 2021
2 parents 7cca58e + c689e65 commit d9ce92f
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 220 deletions.
2 changes: 1 addition & 1 deletion src/Applications/GEOSdas_App/GEOSdas.csm
Original file line number Diff line number Diff line change
Expand Up @@ -4413,7 +4413,7 @@ endif
# run at command line
#--------------------
chmod 744 $jobf
$jobf $aod_parallel_flag >&! $gaasLOG &
$jobf $aod_parallel_flag >&! $gaasLOG

else

Expand Down
38 changes: 21 additions & 17 deletions src/Applications/GEOSdas_App/fvsetup
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ sub get_expid {
my (%already_asked);

$expid = "u000_"."$res";
if ( $g5gcm ) { $expdsc = "${expid}__${cvstag}__agrid_${res}__ogrid_${ores}" }
if ( $g5gcm ) { $expdsc = "${expid}__agrid_${res}__ogrid_${ores}" }
else { $expdsc = "FVGCM-based_run" }

print <<"EOF";
Expand Down Expand Up @@ -2593,7 +2593,7 @@ EOF
}
}
}
$expdsc = "${expid}__${cvstag}__agrid_${res}__ogrid_${ores}" if $g5gcm;
$expdsc = "${expid}__agrid_${res}__ogrid_${ores}" if $g5gcm;
$expdsc = query(" EXPDSC?", $expdsc);
return 0;
}
Expand Down Expand Up @@ -2736,10 +2736,10 @@ EOF
last if -d $fvbcs;
if ($loop++ < 3) {
warn ">> ERROR << cannot find directory $fvbcs";
warn ">> WARNING << Cannot find directory $fvbcs; Try again;";
redo;
} else {
die ">> ERROR << cannot find directory $fvbcs";
die ">> ERROR << Cannot find directory $fvbcs;";
}
}
Expand All @@ -2756,10 +2756,10 @@ EOF
last if -d $fvrtbcs;
if ($loop++ < 3) {
warn ">> ERROR << cannot find directory $fvrtbcs";
warn ">> WARNING << Cannot find directory $fvrtbcs; Try again;";
redo;
} else {
die ">> ERROR << cannot find directory $fvrtbcs";
die ">> ERROR << Cannot find directory $fvrtbcs;";
}
}
Expand Down Expand Up @@ -2790,10 +2790,10 @@ sub get_extdata {
unless (-d $extdata{$set}) {
if ($loop++ < 3) {
warn ">> ERROR << cannot find directory: $extdata{$set}";
warn ">> WARNING << Cannot find directory: $extdata{$set}; Try again;";
redo;
} else {
die ">> ERROR << cannot find directory: $extdata{$set}";
die ">> ERROR << Cannot find directory: $extdata{$set};";
}
}
$loop = 0;
Expand Down Expand Up @@ -3179,10 +3179,10 @@ EOF
$nymde = query(" Ending year-month-day?", $nymde);
unless ($nymde =~ /^\s*\d{8}\s*$/) {
if ($loop++ < 3) {
warn ">> ERROR << Date must be in yyyymmdd format. Try again.\n\n";
warn ">> WARNING << Date must be in yyyymmdd format; Try again;";
redo;
} else {
die "Date must be in yyyymmdd format. Try again.\n\n";
die ">> ERROR << Date must be in yyyymmdd format;";
}
}
}
Expand All @@ -3199,11 +3199,11 @@ EOF
{
$fhours21 = query(" Length of FORECAST run segments (in hours)?", $fhours21);
if ($fhours21 % 3 != 0) {
if ($loop < 3) {
warn ">> Error << Number of hours should be a multiple of 3. Try again.\n";
if ($loop++ < 3) {
warn ">> WARNING << Number of hours should be a multiple of 3; Try again;";
redo;
} else {
die " Number of hours should be a multiple of 3. Try again.\n";
die ">> ERROR << Number of hours should be a multiple of 3;";
}
}
}
Expand Down Expand Up @@ -7618,7 +7618,7 @@ print SCRIPT <<"EOF";
setenv NCPUS_GPERT $ncpus_gpert # Number of CPUs to run gcmPERT
setenv NCPUS_AOD $ncpus_aod # Number of CPUs to run PSAS-AOD
setenv O_SERVERS $o_servers # Number of IO servers
setenv GAAS_RUN_SLURM 1 # launch AOD analysis as separate batch job
#setenv GAAS_RUN_SLURM 1 # launch AOD analysis as separate batch job
setenv AODBLOCKJOB 1
EOF
if ($ncpus_per_node) {
Expand Down Expand Up @@ -10801,8 +10801,9 @@ sub merge_txt {
}
#=======================================================================
sub write_saved_inputs {
my ($save_file, $dashes, $len, $prompt, $ans);
my (%varDef, @fvANS, $var, %alreadyWarned);
my ($save_file);
my ($ans, $dashes, $fvID, $len, $prompt, $var);
my (%alreadyWarned, %varDef, @fvANS);
$save_file = shift @_;
Expand All @@ -10815,12 +10816,15 @@ sub write_saved_inputs {
$len = length("$expid.input")+1;
$dashes = "-"x$len;
chomp($fvID = `git hash-object $0 | cut -c1-10`);
print SAVE "#$dashes\n";
print SAVE "# $expid.input\n";
print SAVE "#$dashes\n\n";
print SAVE "codeID: $cvstag\n";
print SAVE "description: $expdsc\n";
print SAVE "tag: $cvstag\n";
print SAVE "fvsetupID: $fvID\n";
print SAVE "fvsetupflags:".$fvsetupflags."\n" if $fvsetupflags;
%varDef = ();
Expand Down
15 changes: 8 additions & 7 deletions src/Applications/GEOSdas_App/testsuites/C180RPY.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C180RPY.input
#------------

description: C180RPY__GEOSadas-5_29_3__agrid_C360__ogrid_C
tag: GEOSadas-5_29_3
codeID: b3a880f
description: C180RPY__GEOSadas-5_29_3__agrid_C180__ogrid_C
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand All @@ -28,7 +29,7 @@ EXPID? [u000_C180]
Check for previous use of expid (y/n)? [y]
> n

EXPDSC? [C180RPY__GEOSadas-5_29_3__agrid_C360__ogrid_C]
EXPDSC? [C180RPY__GEOSadas-5_29_3__agrid_C180__ogrid_C]
>

Land Boundary Conditions? [Icarus_Updated]
Expand Down Expand Up @@ -85,7 +86,7 @@ Run model-adjoint-related applications (0=no,1=yes)? [0]
Run analysis-sensitivity applications (0=no,1=yes)? [0]
>

Ending year-month-day? [20191121]
Ending year-month-day? [20201201]
> 20210206

Length of FORECAST run segments (in hours)? [123]
Expand All @@ -97,7 +98,7 @@ Number of one-day DAS segments per PBS job? [1]
Number of PEs in the zonal direction (NX)? [8]
> 20

Number of PEs in the meridional direction (NY)? [48]
Number of PEs in the meridional direction (NY)? [30]
> 60

Job nickname? [g5das]
Expand All @@ -124,10 +125,10 @@ GEOS grid resolution instead? [d]
Ensemble Hybrid (<0;3=3dHyb;4=Hyb4d)? [-1]
> 4

Number of procs in the zonal direction (NX)? [12]
Number of procs in the zonal direction (NX)? [6]
> 16

Number of procs in the meridional direction (NY)? [20]
Number of procs in the meridional direction (NY)? [32]
> 42

Which main class of ObsSys (1: NRT; 2: MERRA; 3: MERRA-2)? [1]
Expand Down
15 changes: 8 additions & 7 deletions src/Applications/GEOSdas_App/testsuites/C180T14RPY.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C180T14RPY.input
#------------

description: C180T14RPY__GEOSadas-5_29_3__agrid_C360__ogrid_C
tag: GEOSadas-5_29_3
codeID: b3a880f
description: C180T14RPY__GEOSadas-5_29_3__agrid_C180__ogrid_T14
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand All @@ -28,7 +29,7 @@ EXPID? [u000_C180]
Check for previous use of expid (y/n)? [y]
> n

EXPDSC? [C180T14RPY__GEOSadas-5_29_3__agrid_C360__ogrid_C]
EXPDSC? [C180T14RPY__GEOSadas-5_29_3__agrid_C180__ogrid_T14]
>

Land Boundary Conditions? [Icarus_Updated]
Expand Down Expand Up @@ -85,7 +86,7 @@ Run model-adjoint-related applications (0=no,1=yes)? [0]
Run analysis-sensitivity applications (0=no,1=yes)? [0]
>

Ending year-month-day? [20191121]
Ending year-month-day? [20201201]
> 20210206

Length of FORECAST run segments (in hours)? [123]
Expand All @@ -97,7 +98,7 @@ Number of one-day DAS segments per PBS job? [1]
Number of PEs in the zonal direction (NX)? [8]
> 20

Number of PEs in the meridional direction (NY)? [48]
Number of PEs in the meridional direction (NY)? [30]
> 60

Job nickname? [g5das]
Expand All @@ -124,10 +125,10 @@ GEOS grid resolution instead? [d]
Ensemble Hybrid (<0;3=3dHyb;4=Hyb4d)? [-1]
> 4

Number of procs in the zonal direction (NX)? [12]
Number of procs in the zonal direction (NX)? [6]
> 16

Number of procs in the meridional direction (NY)? [20]
Number of procs in the meridional direction (NY)? [32]
> 42

Which main class of ObsSys (1: NRT; 2: MERRA; 3: MERRA-2)? [1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C360L181_replay.input
#------------

codeID: b3a880f
description: C360L181_replay__GEOSadas-5_29_3__agrid_C360__ogrid_C
tag: GEOSadas-5_29_3
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/testsuites/C360L91_replay.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C360L91_replay.input
#------------

codeID: b3a880f
description: C360L91_replay__GEOSadas-5_29_3__agrid_C360__ogrid_C
tag: GEOSadas-5_29_3
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/testsuites/C48f.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C48f.input
#-----------

codeID: b3a880f
description: C48f__GEOSadas-5_29_3__agrid_C48__ogrid_f34
tag: GEOSadas-5_29_3
fvsetupID: f7d8d041c9
fvsetupflags: -sensdeg 1

---ENDHEADERS---
Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/testsuites/C90C.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C90C.input
#-----------

codeID: b3a880f
description: C90C__GEOSadas-5_29_3__agrid_C90__ogrid_CS
tag: GEOSadas-5_29_3
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/testsuites/C90C_ens.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C90C_ens.input
#---------------

codeID: b3a880f
description: C90C_ens__GEOSadas-5_29_3__agrid_C90__ogrid_C
tag: GEOSadas-5_29_3
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand Down
3 changes: 2 additions & 1 deletion src/Applications/GEOSdas_App/testsuites/C90C_replay.input
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# C90C_replay.input
#---------------

codeID: b3a880f
description: C90C_replay__86f27c6__agrid_C90__ogrid_C
tag: 86f27c6
fvsetupID: f7d8d041c9

---ENDHEADERS---

Expand Down
21 changes: 18 additions & 3 deletions src/Applications/GEOSdas_App/testsuites/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,30 @@ if(GIT_FOUND)
message(FATAL_ERROR "This should not be reached")
endif ()
endif ()

message("Setting fvID to fvsetup SHA1 (1st 10 digits)")
execute_process(
COMMAND ${GIT_EXECUTABLE} hash-object src/Applications/GEOSdas_App/fvsetup
COMMAND cut -c1-10
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE fvID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("fvID=${fvID}")
endif()

configure_file(CVSTAG.in CVSTAG @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CVSTAG DESTINATION etc)
install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/CVSTAG
DESTINATION etc
)

set (ESMABIN ${CMAKE_INSTALL_PREFIX}/bin)
set (ESMATST ${CMAKE_INSTALL_PREFIX}/etc/testsuites)
foreach (perl_script checkinput runjob)
configure_file ( ${perl_script}.pl ${perl_script} @ONLY)
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${perl_script} DESTINATION bin)
install (
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${perl_script}
DESTINATION bin
)
endforeach ()

Loading

0 comments on commit d9ce92f

Please sign in to comment.