1 // Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com> 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 #include <boost/mpi/timer.hpp> 7 #include <boost/mpi/exception.hpp> 8 9 namespace boost { namespace mpi { 10 time_is_global()11bool timer::time_is_global() 12 { 13 int* is_global; 14 int found = 0; 15 16 BOOST_MPI_CHECK_RESULT(MPI_Comm_get_attr, 17 (MPI_COMM_WORLD, MPI_WTIME_IS_GLOBAL, &is_global, 18 &found)); 19 if (!found) 20 return false; 21 else 22 return *is_global != 0; 23 } 24 25 } } // end namespace boost::mpi 26