Stxxl  1.4.0
common/stxxl_info.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002  *  common/stxxl_info.cpp
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright © 2007, 2009-2011 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
00007  *
00008  *  Distributed under the Boost Software License, Version 1.0.
00009  *  (See accompanying file LICENSE_1_0.txt or copy at
00010  *  http://www.boost.org/LICENSE_1_0.txt)
00011  **************************************************************************/
00012 
00013 #include <stxxl/io>
00014 #include <stxxl/mng>
00015 #include <stxxl/version.h>
00016 #include <stxxl/bits/compat/shared_ptr.h>
00017 
00018 int main(int argc, char **)
00019 {
00020     stxxl::config::get_instance();
00021     stxxl::block_manager::get_instance();
00022     stxxl::stats::get_instance();
00023     stxxl::disk_queues::get_instance();
00024 
00025     if (stxxl::check_library_version() != 0)
00026         STXXL_ERRMSG("version mismatch between headers and library");
00027     assert(stxxl::version_major() == STXXL_VERSION_MAJOR);
00028     assert(stxxl::version_minor() == STXXL_VERSION_MINOR);
00029     assert(stxxl::version_patchlevel() == STXXL_VERSION_PATCHLEVEL);
00030 
00031 #ifdef STXXL_PARALLEL_MODE
00032 #ifdef _GLIBCXX_PARALLEL
00033     STXXL_MSG("_GLIBCXX_PARALLEL, max threads = " << omp_get_max_threads());
00034 #else
00035     STXXL_MSG("STXXL_PARALLEL_MODE, max threads = " << omp_get_max_threads());
00036 #endif
00037 #elif defined(__MCSTL__)
00038     STXXL_MSG("__MCSTL__, max threads = " << omp_get_max_threads());
00039 #endif
00040     STXXL_MSG("sizeof(unsigned int)   = " << sizeof(unsigned int));
00041     STXXL_MSG("sizeof(unsigned_type)  = " << sizeof(stxxl::unsigned_type));
00042     STXXL_MSG("sizeof(uint64)         = " << sizeof(stxxl::uint64));
00043     STXXL_MSG("sizeof(size_t)         = " << sizeof(size_t));
00044     STXXL_MSG("sizeof(off_t)          = " << sizeof(off_t));
00045     STXXL_MSG("sizeof(void*)          = " << sizeof(void *));
00046 
00047 #if defined(STXXL_HAVE_AIO_FILE)
00048     STXXL_MSG("STXXL_HAVE_AIO_FILE    = " << STXXL_HAVE_AIO_FILE);
00049 #endif
00050     STXXL_MSG("STXXL_HAVE_SHARED_PTR  = " << STXXL_HAVE_SHARED_PTR);
00051     STXXL_MSG("STXXL_HAVE_MAKE_SHARED = " << STXXL_HAVE_MAKE_SHARED);
00052 
00053     assert(argc < 3);          // give two extra arguments to check whether assertions are enabled
00054     return argc != 2 ? 0 : -1; // give one extra argument to get exit code -1
00055 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines