Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in p3/shoc run_and_cmp #6805

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions components/eamxx/src/physics/p3/tests/p3_run_and_cmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ int main (int argc, char** argv) {
std::string predict_nc = "both";
std::string prescribed_ccn = "both";
std::string baseline_fn;
for (int i = 1; i < argc-1; ++i) {
for (int i = 1; i < argc; ++i) {
if (ekat::argv_matches(argv[i], "-g", "--generate")) { generate = true; no_baseline = false; }
if (ekat::argv_matches(argv[i], "-c", "--compare")) { no_baseline = false; }
if (ekat::argv_matches(argv[i], "-b", "--baseline-file")) {
Expand Down Expand Up @@ -301,9 +301,6 @@ int main (int argc, char** argv) {
expect_another_arg(i, argc);
++i;
repeat = std::atoi(argv[i]);
if (repeat > 0) {
generate = true;
}
}
if (ekat::argv_matches(argv[i], "-pn", "--predict-nc")) {
expect_another_arg(i, argc);
Expand Down
6 changes: 3 additions & 3 deletions components/eamxx/src/physics/shoc/tests/shoc_run_and_cmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int main (int argc, char** argv) {
" -i <cols> Number of columns(ncol). Default=8.\n"
" -k <nlev> Number of vertical levels. Default=72.\n"
" -q <num_qtracers> Number of q tracers. Default=3.\n"
" -n <nadv> Number of SHOC loops per timestep. Default=15.\n"
" -l <nadv> Number of SHOC loops per timestep. Default=15.\n"
" -r <repeat> Number of repetitions, implies timing run (generate + no I/O). Default=0.\n";

return 1;
Expand All @@ -231,7 +231,7 @@ int main (int argc, char** argv) {
Int repeat = 0;
std::string baseline_fn;
std::string device;
for (int i = 1; i < argc-1; ++i) {
for (int i = 1; i < argc; ++i) {
if (ekat::argv_matches(argv[i], "-g", "--generate")) { generate = true; no_baseline = false; }
if (ekat::argv_matches(argv[i], "-c", "--compare")) { no_baseline = false; }
if (ekat::argv_matches(argv[i], "-b", "--baseline-file")) {
Expand Down Expand Up @@ -269,7 +269,7 @@ int main (int argc, char** argv) {
++i;
num_qtracers = std::atoi(argv[i]);
}
if (ekat::argv_matches(argv[i], "-n", "--nadv")) {
if (ekat::argv_matches(argv[i], "-l", "--nadv")) {
expect_another_arg(i, argc);
++i;
nadv = std::atoi(argv[i]);
Expand Down
Loading