IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
IpplInfo.cpp
Go to the documentation of this file.
1//
2// Class IpplInfo
3// Global Ippl information.
4//
5#include "Ippl.h"
6#include "IpplVersions.h"
7
8#include "Utility/IpplInfo.h"
9
10#include <csignal>
11#include <cstdio>
12#include <unistd.h>
13
15// printVersion: print out a version summary. If the argument is true,
16// print out a detailed listing, otherwise a summary.
18 std::cout << "IPPL Framework version " << version() << std::endl;
19 std::cout << "Last build date: " << compileDate() << " by user ";
20 std::cout << compileUser() << std::endl;
21 std::cout << "Built for machine: " << compileMachine() << std::endl;
22}
23
24void IpplInfo::printHelp(char** argv) {
25 std::cout << "Usage: " << argv[0] << " [<option> ...]\n";
26 std::cout << "The possible values for <option> are:\n";
27 std::cout << " --info <n> : Set info message level. 0 = off.\n";
28 std::cout << " --overallocate|-b <factor> : Set the buffer overallocation factor\n";
29 std::cout << " --timer-fences <on|off> : Enable or disable timer fences (default enabled "
30 "if only "
31 "one accelerator present)\n";
32 std::cout << " --help : Print IPPL help message\n";
33 std::cout << " --kokkos-help : Print Kokkos help message\n";
34}
35
37// version: return the name of this version of Ippl, as a string
38// (from Versions.h)
39const char* IpplInfo::version() {
40 return ippl_version_name;
41}
42
44// compileArch: return the architecture on which this library was built
45// (from IpplVersions.h)
46const char* IpplInfo::compileArch() {
47 return ippl_compile_arch;
48}
49
51// compileDate: return the date on which this library was prepared for
52// compilation (from IpplVersions.h)
53const char* IpplInfo::compileDate() {
54 return ippl_compile_date;
55}
56
58// compileLine: return the compiler command used to compile each source file
59// (from IpplVersions.h)
60const char* IpplInfo::compileLine() {
61 return ippl_compile_line;
62}
63
65// compileMachine: return the machine on which this library was
66// compiled (from IpplVersions.h)
68 return ippl_compile_machine;
69}
70
72// compileOptions: return the option list used to compile this library
73// (from IpplVersions.h)
75 return ippl_compile_options;
76}
77
79// compileUser: return the username of the user who compiled this
80// library (from IpplVersions.h)
81const char* IpplInfo::compileUser() {
82 return ippl_compile_user;
83}
static void printVersion(void)
Definition IpplInfo.cpp:17
static const char * compileMachine()
Definition IpplInfo.cpp:67
static const char * compileLine()
Definition IpplInfo.cpp:60
static const char * compileArch()
Definition IpplInfo.cpp:46
static const char * version()
Definition IpplInfo.cpp:39
static void printHelp(char **argv)
Definition IpplInfo.cpp:24
static const char * compileUser()
Definition IpplInfo.cpp:81
static const char * compileDate()
Definition IpplInfo.cpp:53
static const char * compileOptions()
Definition IpplInfo.cpp:74