| 61 | } |
| 62 | |
| 63 | int |
| 64 | main (int argc, |
| 65 | char* argv[]) |
| 66 | { |
| 67 | |
| 68 | // check to see if it contains --describe |
| 69 | if (argc >= 2) { |
| 70 | for (auto i = 1; i < argc; i++) { |
| 71 | if (std::string(argv[i]) == "--describe") { |
| 72 | Castro::writeBuildInfo(); |
| 73 | return 0; |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // |
| 79 | // Make sure to catch new failures. |
| 80 | // |
| 81 | amrex::Initialize(argc, argv, true, MPI_COMM_WORLD, override_parameters); |
| 82 | { |
| 83 | |
| 84 | // Refuse to continue if we did not provide an inputs file. |
| 85 | |
| 86 | if (argc <= 1) { |
| 87 | amrex::Abort("Error: no inputs file provided on command line."); |
| 88 | } |
| 89 | |
| 90 | // Save the inputs file name for later. |
| 91 | |
| 92 | if (!strchr(argv[1], '=')) { |
| 93 | inputs_name = argv[1]; |
| 94 | } |
| 95 | |
| 96 | BL_PROFILE_VAR("main()", pmain); |
| 97 | |
| 98 | double dRunTime1 = ParallelDescriptor::second(); |
| 99 | |
| 100 | std::cout << std::setprecision(10); |
| 101 | |
| 102 | int max_step; |
| 103 | Real strt_time; |
| 104 | Real stop_time; |
| 105 | ParmParse pp; |
| 106 | |
| 107 | max_step = -1; |
| 108 | strt_time = 0.0; |
| 109 | stop_time = -1.0; |
| 110 | |
| 111 | pp.query("max_step",max_step); |
| 112 | pp.query("strt_time",strt_time); |
| 113 | pp.query("stop_time",stop_time); |
| 114 | |
| 115 | if (strt_time < 0.0) |
| 116 | { |
| 117 | amrex::Abort("MUST SPECIFY a non-negative strt_time"); |
| 118 | } |
| 119 | |
| 120 | if (max_step < 0 && stop_time < 0.0) { |
nothing calls this directly
no test coverage detected