174 std::stringstream file_name;
176 out_stream out_file = out_file_handler.
OpenOutputFile(file_name.str());
185 *out_file <<
"uname sysname = "
186 <<
"Microsoft Windows" << std::endl;
187#define INFO_BUFFER_SIZE 32767
188 TCHAR info_buffer[INFO_BUFFER_SIZE];
189 DWORD buffer_char_count = INFO_BUFFER_SIZE;
190 if (!GetComputerName(info_buffer, &buffer_char_count))
191 *out_file <<
"uname nodename = "
192 <<
"Windows machine name is unknown" << std::endl;
194 *out_file <<
"uname nodename = " << info_buffer << std::endl;
196 OSVERSIONINFOEX os_info;
197 ZeroMemory(&os_info,
sizeof(OSVERSIONINFO));
198 os_info.dwOSVersionInfoSize =
sizeof(OSVERSIONINFO);
200 GetVersionEx((OSVERSIONINFO*)&os_info);
203 if (os_info.dwMajorVersion < 6)
205 *out_file <<
"uname release = "
206 <<
"Microsoft Windows Server 2003 R2 (or earlier)" << std::endl;
211 if (os_info.dwMajorVersion > 6)
213 *out_file <<
"uname release = "
214 <<
"Microsoft Windows (Later than Microsoft Windows 8)" << std::endl;
218 if (os_info.dwMinorVersion == 2)
220 if (os_info.wProductType == VER_NT_WORKSTATION)
221 *out_file <<
"uname release = "
222 <<
"Microsoft Windows 8" << std::endl;
224 *out_file <<
"uname release = "
225 <<
"Microsoft Windows Server 2012" << std::endl;
227 else if (os_info.dwMinorVersion == 1)
229 if (os_info.wProductType == VER_NT_WORKSTATION)
230 *out_file <<
"uname release = "
231 <<
"Microsoft Windows 7" << std::endl;
233 *out_file <<
"uname release = "
234 <<
"Microsoft Windows Server 2008 R2" << std::endl;
236 else if (os_info.dwMinorVersion == 0)
238 if (os_info.wProductType == VER_NT_WORKSTATION)
239 *out_file <<
"uname release = "
240 <<
"Microsoft Windows Server 2008" << std::endl;
242 *out_file <<
"uname release = "
243 <<
"Microsoft Windows Vista" << std::endl;
247 *out_file <<
"uname version = " << os_info.dwMajorVersion <<
"." << os_info.dwMinorVersion << std::endl;
251 SYSTEM_INFO sys_info;
252 GetSystemInfo(&sys_info);
253 switch (sys_info.wProcessorArchitecture)
255 case PROCESSOR_ARCHITECTURE_AMD64:
256 *out_file <<
"uname machine = "
257 <<
"x64 (AMD or Intel)" << std::endl;
259 case PROCESSOR_ARCHITECTURE_ARM:
260 *out_file <<
"uname machine = "
261 <<
"ARM" << std::endl;
263 case PROCESSOR_ARCHITECTURE_IA64:
264 *out_file <<
"uname machine = "
265 <<
"Intel Itanium-based" << std::endl;
267 case PROCESSOR_ARCHITECTURE_INTEL:
268 *out_file <<
"uname machine = "
269 <<
"x86" << std::endl;
271 case PROCESSOR_ARCHITECTURE_UNKNOWN:
272 *out_file <<
"uname machine = "
273 <<
"Unknown Architecture" << std::endl;
276 *out_file <<
"uname machine = "
277 <<
"Other Architecture. Code = " << sys_info.wProcessorArchitecture << std::endl;
281 *out_file <<
"\nInformation on number and type of processors:" << std::endl;
282 *out_file << sys_info.dwNumberOfProcessors;
283 *out_file <<
"\nInformation on processor caches, in the same order as above:" << std::endl;
284 *out_file <<
"Unknown" << std::endl;
287 MEMORYSTATUSEX mem_status;
288 mem_status.dwLength =
sizeof(mem_status);
289 GlobalMemoryStatusEx(&mem_status);
290 *out_file <<
"\nInformation on system memory:" << std::endl;
291 *out_file << mem_status.ullTotalPhys / 1024 <<
" kB" << std::endl;
293 struct utsname uts_info;
296 *out_file <<
"uname sysname = " << uts_info.sysname << std::endl
298 *out_file <<
"uname nodename = " << uts_info.nodename << std::endl
300 *out_file <<
"uname release = " << uts_info.release << std::endl
302 *out_file <<
"uname version = " << uts_info.version << std::endl
304 *out_file <<
"uname machine = " << uts_info.machine << std::endl
310 *out_file <<
"\nInformation on number and type processors, and cache and memory sizes (in bytes)\n";
311 system_info = popen(
"sysctl hw.ncpu hw.physicalcpu machdep.cpu.brand_string hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize hw.memsize",
"r");
312 while (fgets(buffer, 100, system_info) != NULL)
319 *out_file <<
"\nInformation on number and type of processors:\n";
320 system_info = popen(
"grep ^model.name /proc/cpuinfo",
"r");
321 while (fgets(buffer, 100, system_info) !=
nullptr)
327 *out_file <<
"\nInformation on processor caches, in the same order as above:\n";
328 system_info = popen(
"grep ^cache.size /proc/cpuinfo",
"r");
329 while (fgets(buffer, 100, system_info) !=
nullptr)
335 *out_file <<
"\nInformation on system memory:\n";
336 system_info = popen(
"grep ^MemTotal /proc/meminfo",
"r");
337 while (fgets(buffer, 100, system_info) !=
nullptr)
376 std::stringstream output;
377 output <<
"<ChasteBuildInfo>\n";
379 output <<
"\t<ProvenanceInfo>\n";
384 output <<
"\t\t<CurrentTime>" << ChasteGetCurrentTime() <<
"</CurrentTime>\n";
388 output <<
"\t\t<Projects>\n";
392 for (
const auto& r_project_version : r_projects_versions)
396 output <<
"\t\t\t<Project>" << std::endl;
397 output <<
"\t\t\t\t<Name>" << r_project_version.first <<
"</Name>" << std::endl;
398 output <<
"\t\t\t\t<Version>" << r_project_version.second <<
"</Version>" << std::endl;
399 output <<
"\t\t\t\t<Modified>" << r_projects_modified.at(r_project_version.first) <<
"</Modified>" << std::endl;
400 output <<
"\t\t\t</Project>" << std::endl;
404 output <<
"\t\t</Projects>\n";
406 output <<
"\t</ProvenanceInfo>\n";
408 output <<
"\t<Compiler>\n";
411 output <<
"\t</Compiler>\n";
413 output <<
"\t<Libraries>\n";
415 output <<
"\t\t<CompiledIn>\n";
416 output <<
"\t\t\t<PETSc>" << PETSC_VERSION_MAJOR <<
"." << PETSC_VERSION_MINOR <<
"." << PETSC_VERSION_SUBMINOR <<
"</PETSc>\n";
417 output <<
"\t\t\t<Boost>" << BOOST_VERSION / 100000 <<
"." << BOOST_VERSION / 100 % 1000 <<
"." << BOOST_VERSION % 100 <<
"</Boost>\n";
418 output <<
"\t\t\t<HDF5>" << H5_VERS_MAJOR <<
"." << H5_VERS_MINOR <<
"." << H5_VERS_RELEASE <<
"</HDF5>\n";
419#ifdef PARMETIS_MAJOR_VERSION
420 output <<
"\t\t\t<Parmetis>" << PARMETIS_MAJOR_VERSION <<
"." << PARMETIS_MINOR_VERSION;
421#ifdef PARMETIS_SUBMINOR_VERSION
422 output <<
"." << PARMETIS_SUBMINOR_VERSION;
424 output <<
"</Parmetis>" << std::endl;
427 output <<
"\t\t\t<Parmetis>[NONE]</Parmetis>" << std::endl;
428 output <<
"\t\t\t<PT-Scotch>" << SCOTCH_VERSION<<
"."<<SCOTCH_RELEASE<<
"."<<SCOTCH_PATCHLEVEL<<
"</PT-Scotch>"<< std::endl;
431 output <<
"\t\t</CompiledIn>\n";
433 output <<
"\t\t<Binaries>\n";
435 output <<
"\t\t</Binaries>\n";
437 output <<
"\t\t<Optional>\n";
439 output <<
"\t\t\t<SUNDIALS>" << CHASTE_SUNDIALS_PACKAGE_VERSION <<
"</SUNDIALS>";
440#if CHASTE_SUNDIALS_VERSION < 30000
441 output <<
"<!-- includes Cvode of a different version number -->";
445 output <<
"\t\t\t<SUNDIALS>no</SUNDIALS>\n";
448 output <<
"\t\t\t<VTK>" << VTK_MAJOR_VERSION <<
"." << VTK_MINOR_VERSION <<
"</VTK>\n";
450 output <<
"\t\t\t<VTK>no</VTK>\n";
453 output <<
"\t\t\t<Xerces>" << XERCES_FULLVERSIONDOT <<
"</Xerces>\n";
455 output <<
"\t\t\t<Xerces>no</Xerces>\n";
457 output <<
"\t\t</Optional>\n";
459 output <<
"\t</Libraries>\n";
463 output <<
"</ChasteBuildInfo>" << std::endl;
464 rInfo = output.str();