Skip to content

Commit 0b5adb6

Browse files
committed
EAMxx: fix parsing of inputs in rrtmgp generate_baseline
We must allow extra args. E.g., --ekat-kokkos-device N may be added by EKAT's test-launcher
1 parent cdde3e0 commit 0b5adb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/eamxx/src/physics/rrtmgp/tests/generate_baseline.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ int main (int argc, char** argv) {
3333
auto logger = std::make_shared<logger_t>("",LogLevel::info,comm);
3434

3535
// Get filenames from command line
36-
if (argc != 3) {
36+
if (argc < 3) {
3737
std::string msg = "Missing required inputs. Usage:\n";
3838
msg += argv[0];
3939
msg += " inputfile baseline\n";
4040
logger->error(msg);
4141
return 1;
4242
}
43-
std::string inputfile(argv[argc-2]);
44-
std::string baseline(argv[argc-1]);
43+
std::string inputfile(argv[1]);
44+
std::string baseline(argv[2]);
4545

4646
// Initialize yakl
4747
yakl::init();

0 commit comments

Comments
 (0)