58 #if defined(AMREX_MPI_THREAD_MULTIPLE)
59 int requested = MPI_THREAD_MULTIPLE;
61 MPI_Init_thread(&argc, &argv, requested, &provided);
62 #elif defined(AMREX_USE_MPI)
63 MPI_Init(&argc, &argv);
70 MPI_COMM_WORLD,
"No input file provided. Exiting!!");
75 for (
auto i = 1; i < argc; i++) {
76 const std::string param(argv[i]);
77 if ((param ==
"--help") || (param ==
"-h") || (param ==
"--usage")) {
84 if (!amrex::FileSystem::Exists(std::string(argv[1]))) {
88 MPI_COMM_WORLD,
"Input file does not exist = " +
89 std::string(argv[1]) +
". Exiting!!");
96 for (
auto i = 1; i < argc; i++) {
97 if (std::string(argv[i]) ==
"--describe") {
103 #ifdef ERF_USE_WW3_COUPLING
104 MPI_Comm comm = amrex::MPMD::Initialize(argc, argv);
105 amrex::Initialize(argc,argv,
true,comm,
add_par);
107 amrex::Initialize(argc,argv,
true,MPI_COMM_WORLD,
add_par);
110 #ifdef ERF_USE_KOKKOS
112 if (!Kokkos::is_initialized()) { Kokkos::initialize(); }
116 if (!strchr(argv[1],
'=')) {
121 BL_PROFILE_VAR(
"main()", pmain);
124 const Real strt_total = amrex::second();
138 Real end_total = amrex::second() - strt_total;
141 ParallelDescriptor::ReduceRealMax(end_total ,ParallelDescriptor::IOProcessorNumber());
143 amrex::Print() <<
"\nTotal Time: " << end_total <<
'\n';
148 BL_PROFILE_VAR_STOP(pmain);
149 #ifdef ERF_USE_WW3_COUPLING
150 MPI_Barrier(MPI_COMM_WORLD);
153 #ifdef ERF_USE_KOKKOS
159 #ifdef ERF_USE_WW3_COUPLING
160 amrex::MPMD::Finalize();
amrex::Real Real
Definition: ERF_ShocInterface.H:16
void Evolve()
Definition: ERF.cpp:477
static void print_banner(MPI_Comm, std::ostream &)
Definition: ERF_ConsoleIO.cpp:60
void InitData()
Definition: ERF.cpp:772
static void print_error(MPI_Comm, const std::string &msg)
Definition: ERF_ConsoleIO.cpp:43
static void writeBuildInfo(std::ostream &os)
Definition: ERF_WriteJobInfo.cpp:137
static void print_usage(MPI_Comm, std::ostream &)
Definition: ERF_ConsoleIO.cpp:26
void add_par()
Definition: main.cpp:24
std::string inputs_name
Definition: main.cpp:14