TIMPI
Loading...
Searching...
No Matches
utility_unit.C
Go to the documentation of this file.
1#include <timpi/timpi.h>
2
3#include <timpi/timpi_version.h>
4
5#define TIMPI_UNIT_ASSERT(expr) \
6 if (!(expr)) \
7 timpi_error();
8
9using namespace TIMPI;
10
12
14 {
15 std::string build_string = timpi_version_string();
16 TIMPI_UNIT_ASSERT(build_string.find("Version = 1.8.5") != std::string::npos);
17 TIMPI_UNIT_ASSERT(build_string.find("Build Date") != std::string::npos);
18 TIMPI_UNIT_ASSERT(build_string.find("C++ Config") != std::string::npos);
19 TIMPI_UNIT_ASSERT(build_string.find("Using find correctly") == std::string::npos);
20 }
21
23 {
25 TIMPI_UNIT_ASSERT(version == 10805);
26 }
27
28
29int main(int argc, const char * const * argv)
30{
32 TestCommWorld = &init.comm();
33
36
37 return 0;
38}
Encapsulates the MPI_Comm object.
The TIMPIInit class, when constructed, initializes any dependent libraries (e.g.
Definition timpi_init.h:58
std::string timpi_version_string()
Tnew cast_int(Told oldvar)
int get_timpi_version()
void testVersionNumber()
Communicator * TestCommWorld
void testVersionString()
int main()
Definition version.C:20