10 std::ofstream jobInfoFile;
11 std::string FullPathJobInfoFile = dir;
12 FullPathJobInfoFile +=
"/job_info";
13 jobInfoFile.open(FullPathJobInfoFile.c_str(), std::ios::out);
15 std::string PrettyLine =
"==================================================="
16 "============================\n";
17 std::string OtherLine =
"----------------------------------------------------"
18 "----------------------------\n";
19 std::string SkipSpace =
" ";
22 jobInfoFile << PrettyLine;
23 jobInfoFile <<
" REMORA Job Information\n";
24 jobInfoFile << PrettyLine;
26 jobInfoFile <<
"inputs file: " <<
inputs_name <<
"\n\n";
28 jobInfoFile <<
"number of MPI processes: "
29 << amrex::ParallelDescriptor::NProcs() <<
"\n";
31 jobInfoFile <<
"number of threads: " << omp_get_max_threads() <<
"\n";
35 jobInfoFile <<
"CPU time used since start of simulation (CPU-hours): "
38 jobInfoFile <<
"\n\n";
41 jobInfoFile << PrettyLine;
42 jobInfoFile <<
" Plotfile Information\n";
43 jobInfoFile << PrettyLine;
48 tm* localtm = localtime(&now);
49 jobInfoFile <<
"output data / time: " << asctime(localtm);
51 std::string currentDir = amrex::FileSystem::CurrentPath();
52 jobInfoFile <<
"output dir: " << currentDir <<
"\n";
54 jobInfoFile <<
"\n\n";
57 jobInfoFile << PrettyLine;
58 jobInfoFile <<
" Build Information\n";
59 jobInfoFile << PrettyLine;
62 jobInfoFile <<
"build machine: " << amrex::buildInfoGetBuildMachine() <<
"\n";
63 jobInfoFile <<
"build dir: " << amrex::buildInfoGetBuildDir() <<
"\n";
64 jobInfoFile <<
"AMReX dir: " << amrex::buildInfoGetAMReXDir() <<
"\n";
73 for (
int n = 1; n <= amrex::buildInfoGetNumModules(); n++) {
74 jobInfoFile << amrex::buildInfoGetModuleName(n) <<
": "
75 << amrex::buildInfoGetModuleVal(n) <<
"\n";
82 if (strlen(githash1) > 0) {
83 jobInfoFile <<
"REMORA git hash: " << githash1 <<
"\n";
85 if (strlen(githash2) > 0) {
86 jobInfoFile <<
"AMReX git hash: " << githash2 <<
"\n";
89 const char* buildgithash = amrex::buildInfoGetBuildGitHash();
90 const char* buildgitname = amrex::buildInfoGetBuildGitName();
91 if (strlen(buildgithash) > 0) {
92 jobInfoFile << buildgitname <<
" git hash: " << buildgithash <<
"\n";
95 jobInfoFile <<
"\n\n";
98 jobInfoFile << PrettyLine;
99 jobInfoFile <<
" Grid Information\n";
100 jobInfoFile << PrettyLine;
102 int f_lev = finest_level;
104 for (
int i = 0; i <= f_lev; i++) {
105 jobInfoFile <<
" level: " << i <<
"\n";
106 jobInfoFile <<
" number of boxes = " << grids[i].size() <<
"\n";
107 jobInfoFile <<
" maximum zones = ";
108 for (
int n = 0; n < AMREX_SPACEDIM; n++) {
109 jobInfoFile << geom[i].Domain().length(n) <<
" ";
111 jobInfoFile <<
"\n\n";
114 jobInfoFile <<
" Boundary conditions\n";
123 jobInfoFile <<
"\n\n";
126 jobInfoFile << PrettyLine;
127 jobInfoFile <<
" Inputs File Parameters\n";
128 jobInfoFile << PrettyLine;
130 amrex::ParmParse::dumpTable(jobInfoFile,
true);
137 std::string PrettyLine = std::string(78,
'=') +
"\n";
138 std::string OtherLine = std::string(78,
'-') +
"\n";
139 std::string SkipSpace = std::string(8,
' ');
143 os <<
" REMORA Build Information\n";
147 os <<
"build machine: " << amrex::buildInfoGetBuildMachine() <<
"\n";
148 os <<
"build dir: " << amrex::buildInfoGetBuildDir() <<
"\n";
149 os <<
"AMReX dir: " << amrex::buildInfoGetAMReXDir() <<
"\n";
156 os <<
"C++ compiler: " << amrex::buildInfoGetCXXName() <<
"\n";
157 os <<
"C++ flags: " << amrex::buildInfoGetCXXFlags() <<
"\n";
161 os <<
"Link flags: " << amrex::buildInfoGetLinkFlags() <<
"\n";
162 os <<
"Libraries: " << amrex::buildInfoGetLibraries() <<
"\n";
166 for (
int n = 1; n <= amrex::buildInfoGetNumModules(); n++) {
167 os << amrex::buildInfoGetModuleName(n) <<
": "
168 << amrex::buildInfoGetModuleVal(n) <<
"\n";
174 if (strlen(githash1) > 0) {
175 os <<
"REMORA git hash: " << githash1 <<
"\n";
177 if (strlen(githash2) > 0) {
178 os <<
"AMReX git hash: " << githash2 <<
"\n";
181 const char* buildgithash = amrex::buildInfoGetBuildGitHash();
182 const char* buildgitname = amrex::buildInfoGetBuildGitName();
183 if (strlen(buildgithash) > 0) {
184 os << buildgitname <<
" git hash: " << buildgithash <<
"\n";
188 os <<
" REMORA Compile time variables: \n";
191 os <<
" REMORA Defines: \n";
193 os << std::setw(35) << std::left <<
"_OPENMP " << std::setw(6) <<
"ON"
196 os << std::setw(35) << std::left <<
"_OPENMP " << std::setw(6) <<
"OFF"
201 os << std::setw(35) << std::left <<
"MPI_VERSION " << std::setw(6)
202 << MPI_VERSION << std::endl;
204 os << std::setw(35) << std::left <<
"MPI_VERSION " << std::setw(6)
205 <<
"UNDEFINED" << std::endl;
209 os << std::setw(35) << std::left <<
"MPI_SUBVERSION " << std::setw(6)
210 << MPI_SUBVERSION << std::endl;
212 os << std::setw(35) << std::left <<
"MPI_SUBVERSION " << std::setw(6)
213 <<
"UNDEFINED" << std::endl;