167 std::stringstream file_name;
169 out_stream out_file = out_file_handler.
OpenOutputFile(file_name.str());
178 *out_file <<
"uname sysname = "
179 <<
"Microsoft Windows" << std::endl;
180#define INFO_BUFFER_SIZE 32767
181 TCHAR info_buffer[INFO_BUFFER_SIZE];
182 DWORD buffer_char_count = INFO_BUFFER_SIZE;
183 if (!GetComputerName(info_buffer, &buffer_char_count))
184 *out_file <<
"uname nodename = "
185 <<
"Windows machine name is unknown" << std::endl;
187 *out_file <<
"uname nodename = " << info_buffer << std::endl;
189 OSVERSIONINFOEX os_info;
190 ZeroMemory(&os_info,
sizeof(OSVERSIONINFO));
191 os_info.dwOSVersionInfoSize =
sizeof(OSVERSIONINFO);
193 GetVersionEx((OSVERSIONINFO*)&os_info);
196 if (os_info.dwMajorVersion < 6)
198 *out_file <<
"uname release = "
199 <<
"Microsoft Windows Server 2003 R2 (or earlier)" << std::endl;
204 if (os_info.dwMajorVersion > 6)
206 *out_file <<
"uname release = "
207 <<
"Microsoft Windows (Later than Microsoft Windows 8)" << std::endl;
211 if (os_info.dwMinorVersion == 2)
213 if (os_info.wProductType == VER_NT_WORKSTATION)
214 *out_file <<
"uname release = "
215 <<
"Microsoft Windows 8" << std::endl;
217 *out_file <<
"uname release = "
218 <<
"Microsoft Windows Server 2012" << std::endl;
220 else if (os_info.dwMinorVersion == 1)
222 if (os_info.wProductType == VER_NT_WORKSTATION)
223 *out_file <<
"uname release = "
224 <<
"Microsoft Windows 7" << std::endl;
226 *out_file <<
"uname release = "
227 <<
"Microsoft Windows Server 2008 R2" << std::endl;
229 else if (os_info.dwMinorVersion == 0)
231 if (os_info.wProductType == VER_NT_WORKSTATION)
232 *out_file <<
"uname release = "
233 <<
"Microsoft Windows Server 2008" << std::endl;
235 *out_file <<
"uname release = "
236 <<
"Microsoft Windows Vista" << std::endl;
240 *out_file <<
"uname version = " << os_info.dwMajorVersion <<
"." << os_info.dwMinorVersion << std::endl;
244 SYSTEM_INFO sys_info;
245 GetSystemInfo(&sys_info);
246 switch (sys_info.wProcessorArchitecture)
248 case PROCESSOR_ARCHITECTURE_AMD64:
249 *out_file <<
"uname machine = "
250 <<
"x64 (AMD or Intel)" << std::endl;
252 case PROCESSOR_ARCHITECTURE_ARM:
253 *out_file <<
"uname machine = "
254 <<
"ARM" << std::endl;
256 case PROCESSOR_ARCHITECTURE_IA64:
257 *out_file <<
"uname machine = "
258 <<
"Intel Itanium-based" << std::endl;
260 case PROCESSOR_ARCHITECTURE_INTEL:
261 *out_file <<
"uname machine = "
262 <<
"x86" << std::endl;
264 case PROCESSOR_ARCHITECTURE_UNKNOWN:
265 *out_file <<
"uname machine = "
266 <<
"Unknown Architecture" << std::endl;
269 *out_file <<
"uname machine = "
270 <<
"Other Architecture. Code = " << sys_info.wProcessorArchitecture << std::endl;
274 *out_file <<
"\nInformation on number and type of processors:" << std::endl;
275 *out_file << sys_info.dwNumberOfProcessors;
276 *out_file <<
"\nInformation on processor caches, in the same order as above:" << std::endl;
277 *out_file <<
"Unknown" << std::endl;
280 MEMORYSTATUSEX mem_status;
281 mem_status.dwLength =
sizeof(mem_status);
282 GlobalMemoryStatusEx(&mem_status);
283 *out_file <<
"\nInformation on system memory:" << std::endl;
284 *out_file << mem_status.ullTotalPhys / 1024 <<
" kB" << std::endl;
286 struct utsname uts_info;
289 *out_file <<
"uname sysname = " << uts_info.sysname << std::endl
291 *out_file <<
"uname nodename = " << uts_info.nodename << std::endl
293 *out_file <<
"uname release = " << uts_info.release << std::endl
295 *out_file <<
"uname version = " << uts_info.version << std::endl
297 *out_file <<
"uname machine = " << uts_info.machine << std::endl
303 *out_file <<
"\nInformation on number and type processors, and cache and memory sizes (in bytes)\n";
304 system_info = popen(
"sysctl hw.ncpu hw.physicalcpu machdep.cpu.brand_string hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize hw.memsize",
"r");
305 while (fgets(buffer, 100, system_info) != NULL)
312 *out_file <<
"\nInformation on number and type of processors:\n";
313 system_info = popen(
"grep ^model.name /proc/cpuinfo",
"r");
314 while (fgets(buffer, 100, system_info) !=
nullptr)
320 *out_file <<
"\nInformation on processor caches, in the same order as above:\n";
321 system_info = popen(
"grep ^cache.size /proc/cpuinfo",
"r");
322 while (fgets(buffer, 100, system_info) !=
nullptr)
328 *out_file <<
"\nInformation on system memory:\n";
329 system_info = popen(
"grep ^MemTotal /proc/meminfo",
"r");
330 while (fgets(buffer, 100, system_info) !=
nullptr)
369 std::stringstream output;
370 output <<
"<ChasteBuildInfo>\n";
372 output <<
"\t<ProvenanceInfo>\n";
377 output <<
"\t\t<CurrentTime>" << ChasteGetCurrentTime() <<
"</CurrentTime>\n";
381 output <<
"\t\t<Projects>\n";
385 for (
const auto& r_project_version : r_projects_versions)
389 output <<
"\t\t\t<Project>" << std::endl;
390 output <<
"\t\t\t\t<Name>" << r_project_version.first <<
"</Name>" << std::endl;
391 output <<
"\t\t\t\t<Version>" << r_project_version.second <<
"</Version>" << std::endl;
392 output <<
"\t\t\t\t<Modified>" << r_projects_modified.at(r_project_version.first) <<
"</Modified>" << std::endl;
393 output <<
"\t\t\t</Project>" << std::endl;
397 output <<
"\t\t</Projects>\n";
399 output <<
"\t</ProvenanceInfo>\n";
401 output <<
"\t<Compiler>\n";
404 output <<
"\t</Compiler>\n";
406 output <<
"\t<Libraries>\n";
408 output <<
"\t\t<CompiledIn>\n";
409 output <<
"\t\t\t<PETSc>" << PETSC_VERSION_MAJOR <<
"." << PETSC_VERSION_MINOR <<
"." << PETSC_VERSION_SUBMINOR <<
"</PETSc>\n";
410 output <<
"\t\t\t<Boost>" << BOOST_VERSION / 100000 <<
"." << BOOST_VERSION / 100 % 1000 <<
"." << BOOST_VERSION % 100 <<
"</Boost>\n";
411 output <<
"\t\t\t<HDF5>" << H5_VERS_MAJOR <<
"." << H5_VERS_MINOR <<
"." << H5_VERS_RELEASE <<
"</HDF5>\n";
412 output <<
"\t\t\t<Parmetis>" << PARMETIS_MAJOR_VERSION <<
"." << PARMETIS_MINOR_VERSION;
413#ifdef PARMETIS_SUBMINOR_VERSION
414 output <<
"." << PARMETIS_SUBMINOR_VERSION;
416 output <<
"</Parmetis>" << std::endl;
417 output <<
"\t\t</CompiledIn>\n";
419 output <<
"\t\t<Binaries>\n";
421 output <<
"\t\t</Binaries>\n";
423 output <<
"\t\t<Optional>\n";
425 output <<
"\t\t\t<SUNDIALS>" << CHASTE_SUNDIALS_PACKAGE_VERSION <<
"</SUNDIALS>";
426#if CHASTE_SUNDIALS_VERSION < 30000
427 output <<
"<!-- includes Cvode of a different version number -->";
431 output <<
"\t\t\t<SUNDIALS>no</SUNDIALS>\n";
434 output <<
"\t\t\t<VTK>" << VTK_MAJOR_VERSION <<
"." << VTK_MINOR_VERSION <<
"</VTK>\n";
436 output <<
"\t\t\t<VTK>no</VTK>\n";
439 output <<
"\t\t\t<Xerces>" << XERCES_FULLVERSIONDOT <<
"</Xerces>\n";
441 output <<
"\t\t\t<Xerces>no</Xerces>\n";
443 output <<
"\t\t</Optional>\n";
445 output <<
"\t</Libraries>\n";
449 output <<
"</ChasteBuildInfo>" << std::endl;
450 rInfo = output.str();