]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpi/test/version_test.cpp
5ebd90746e156a8332f4c717fa883eb47bf1e283
[ceph.git] / ceph / src / boost / libs / mpi / test / version_test.cpp
1 // Copyright (C) 2013 Alain Miniussi <alain.miniussi@oca.eu>
2
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6
7 // test mpi version
8
9 #include <boost/mpi/environment.hpp>
10 #include <boost/test/minimal.hpp>
11 #include <iostream>
12
13 namespace mpi = boost::mpi;
14
15 int
16 test_main(int argc, char* argv[]) {
17 #if defined(MPI_VERSION)
18 int mpi_version = MPI_VERSION;
19 int mpi_subversion = MPI_SUBVERSION;
20 #else
21 int mpi_version = 0;
22 int mpi_subversion = 0;
23 #endif
24
25 mpi::environment env(argc,argv);
26 std::pair<int,int> version = env.version();
27 std::cout << "MPI Version: " << version.first << ',' << version.second << '\n';
28
29 BOOST_CHECK(version.first == mpi_version);
30 BOOST_CHECK(version.second == mpi_subversion);
31 return 0;
32 }