19 ParmParse pp_remora(
"remora");
22 pp.add(
"refine_grid_layout_x",1);
23 pp.add(
"refine_grid_layout_y",1);
24 pp.add(
"refine_grid_layout_z",0);
34 int max_grid_size = 2048;
35 pp.queryAdd(
"max_grid_size",max_grid_size);
39 int blocking_factor = 1;
40 pp.queryAdd(
"blocking_factor",blocking_factor);
42 pp.add(
"n_error_buf",0);
46 amrex::Vector<int> n_cell;
47 pp_remora.queryarr(
"n_cell",n_cell);
48 pp.queryAdd(
"n_cell",n_cell);
52 if (!pp.query(
"max_level",max_level)) {
53 pp.queryAdd(
"max_level",max_level);
57 int amr_verbosity = 0;
58 bool defined_amr_verbosity = pp.query(
"v",amr_verbosity);
59 if (!defined_amr_verbosity) {
60 int rem_verbosity = 0;
61 pp_remora.query(
"v",rem_verbosity);
62 pp.queryAdd(
"v",rem_verbosity);
65 ParmParse pp_geometry(
"geometry");
66 amrex::Vector<amrex::Real> prob_lo;
67 amrex::Vector<amrex::Real> prob_hi;
68 amrex::Vector<int> is_periodic;
69 pp_remora.queryarr(
"prob_lo",prob_lo);
70 pp_remora.queryarr(
"prob_hi",prob_hi);
71 pp_remora.queryarr(
"is_periodic",is_periodic);
72 pp_geometry.queryAdd(
"prob_lo",prob_lo);
73 pp_geometry.queryAdd(
"prob_hi",prob_hi);
74 pp_geometry.queryAdd(
"is_periodic",is_periodic);
76 ParmParse pp_fabarray(
"fabarray");
77#if defined(REMORA_USE_GPU)
78 amrex::Vector<int> omp_tile_size = {1024000,1024000,1024000};
80 amrex::Vector<int> omp_tile_size = {8, 8, 1024000};
82 pp_remora.queryarr(
"omp_tile_size",omp_tile_size,0,3);
83 pp_fabarray.queryAdd(
"mfiter_tile_size",omp_tile_size);
86int main(
int argc,
char* argv[])
90 MPI_Init(&argc, &argv);
97 MPI_COMM_WORLD,
"No input file provided. Exiting!!");
102 for (
auto i = 1; i < argc; i++) {
103 const std::string param(argv[i]);
104 if ((param ==
"--help") || (param ==
"-h") || (param ==
"--usage")) {
111 if (!amrex::FileSystem::Exists(std::string(argv[1]))) {
115 MPI_COMM_WORLD,
"Input file does not exist = " +
116 std::string(argv[1]) +
". Exiting!!");
123 for (
auto i = 1; i < argc; i++) {
124 if (std::string(argv[i]) ==
"--describe") {
129 }
else if(argc < 2) {
130 amrex::Print() <<
"REMORA is currently under development as a next-generation version of the Regional Ocean Modeling System (ROMS). See Docs for more information.\n"
132 <<
" ./REMORA3d.xxx.yyy.ex inputs" <<std::endl;
137 amrex::Initialize(argc,argv,
true,MPI_COMM_WORLD,
add_par);
140 if (!strchr(argv[1],
'=')) {
145 BL_PROFILE_VAR(
"main()", pmain);
148 const Real strt_total = Real(amrex::second());
151 BL_PROFILE_VAR(
"REMORA::InitData()", pinit);
159 BL_PROFILE_VAR_STOP(pinit);
165 Real end_total = Real(amrex::second()) - strt_total;
168 ParallelDescriptor::ReduceRealMax(end_total ,ParallelDescriptor::IOProcessorNumber());
169 if (remora.Verbose()) {
170 amrex::Print() <<
"\nTotal Time: " << end_total <<
'\n';
175 BL_PROFILE_VAR_STOP(pmain);
int main(int argc, char *argv[])