]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpi/test/version_test.cpp
5ebd90746e156a8332f4c717fa883eb47bf1e283
1 // Copyright (C) 2013 Alain Miniussi <alain.miniussi@oca.eu>
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)
9 #include <boost/mpi/environment.hpp>
10 #include <boost/test/minimal.hpp>
13 namespace mpi
= boost::mpi
;
16 test_main(int argc
, char* argv
[]) {
17 #if defined(MPI_VERSION)
18 int mpi_version
= MPI_VERSION
;
19 int mpi_subversion
= MPI_SUBVERSION
;
22 int mpi_subversion
= 0;
25 mpi::environment
env(argc
,argv
);
26 std::pair
<int,int> version
= env
.version();
27 std::cout
<< "MPI Version: " << version
.first
<< ',' << version
.second
<< '\n';
29 BOOST_CHECK(version
.first
== mpi_version
);
30 BOOST_CHECK(version
.second
== mpi_subversion
);