/** * @brief Prints a greeting message to the standard output containing code * version and revision number */ void greetings(void) { printf(" Welcome to the cosmological code\n"); printf(" ______ _________________\n"); printf(" / ___/ | / / _/ ___/_ __/\n"); printf(" \\__ \\| | /| / // // /_ / / \n"); printf(" ___/ /| |/ |/ // // __/ / / \n"); printf(" /____/ |__/|__/___/_/ /_/ \n"); printf(" SPH With Inter-dependent Fine-grained Tasking\n\n"); printf(" Version : %s\n", package_version()); printf(" Revision: %s, Branch: %s\n", git_revision(), git_branch()); printf(" Webpage : www.swiftsim.com\n\n"); printf(" Compiler: %s, Version: %s\n", compiler_name(), compiler_version()); #ifdef HAVE_HDF5 printf(" HDF5 library version: %s\n", hdf5_version()); #endif #ifdef WITH_MPI printf(" MPI library: %s\n", mpi_version()); #ifdef HAVE_METIS printf(" METIS library version: %s\n", metis_version()); #endif #endif printf("\n"); }
std::string complete_version() { boost::format logo( "Versions:\n" " HPX: %s\n" " Boost: %s\n" #if defined(HPX_HAVE_HWLOC) " Hwloc: %s\n" #endif #if defined(HPX_HAVE_PARCELPORT_MPI) " MPI: %s\n" #endif "\n" "Build:\n" " Type: %s\n" " Date: %s\n" " Platform: %s\n" " Compiler: %s\n" " Standard Library: %s\n"); std::string version = boost::str(logo % build_string() % boost_version() % #if defined(HPX_HAVE_HWLOC) hwloc_version() % #endif #if defined(HPX_HAVE_PARCELPORT_MPI) mpi_version() % #endif build_type() % build_date_time() % boost_platform() % boost_compiler() % boost_stdlib()); #if defined(HPX_HAVE_MALLOC) version += " Allocator: " + malloc_version() + "\n"; #endif return version; }
std::string configuration_string() { std::ostringstream strm; #if defined(HPX_HAVE_NATIVE_TLS) strm << " HPX_HAVE_NATIVE_TLS=ON\n"; #else strm << " HPX_HAVE_NATIVE_TLS=OFF\n"; #endif #if defined(HPX_HAVE_STACKTRACES) strm << " HPX_HAVE_STACKTRACES=ON\n"; #else strm << " HPX_HAVE_STACKTRACES=OFF\n"; #endif #if defined(HPX_HAVE_COMPRESSION_BZIP2) strm << " HPX_HAVE_COMPRESSION_BZIP2=ON\n"; #else strm << " HPX_HAVE_COMPRESSION_BZIP2=OFF\n"; #endif #if defined(HPX_HAVE_COMPRESSION_SNAPPY) strm << " HPX_HAVE_COMPRESSION_SNAPPY=ON\n"; #else strm << " HPX_HAVE_COMPRESSION_SNAPPY=OFF\n"; #endif #if defined(HPX_HAVE_COMPRESSION_ZLIB) strm << " HPX_HAVE_COMPRESSION_ZLIB=ON\n"; #else strm << " HPX_HAVE_COMPRESSION_ZLIB=OFF\n"; #endif #if defined(HPX_HAVE_PARCEL_COALESCING) strm << " HPX_HAVE_PARCEL_COALESCING=ON\n"; #else strm << " HPX_HAVE_PARCEL_COALESCING=OFF\n"; #endif #if defined(HPX_HAVE_PARCELPORT_TCP) strm << " HPX_HAVE_PARCELPORT_TCP=ON\n"; #else strm << " HPX_HAVE_PARCELPORT_TCP=OFF\n"; #endif #if defined(HPX_HAVE_PARCELPORT_MPI) strm << " HPX_HAVE_PARCELPORT_MPI=ON (" << mpi_version() << ")\n"; #else strm << " HPX_HAVE_PARCELPORT_MPI=OFF\n"; #endif #if defined(HPX_HAVE_PARCELPORT_IPC) strm << " HPX_HAVE_PARCELPORT_IPC=ON\n"; #else strm << " HPX_HAVE_PARCELPORT_IPC=OFF\n"; #endif #if defined(HPX_HAVE_PARCELPORT_IBVERBS) strm << " HPX_HAVE_PARCELPORT_IBVERBS=ON\n"; #else strm << " HPX_HAVE_PARCELPORT_IBVERBS=OFF\n"; #endif #if defined(HPX_HAVE_VERIFY_LOCKS) strm << " HPX_HAVE_VERIFY_LOCKS=ON\n"; #else strm << " HPX_HAVE_VERIFY_LOCKS=OFF\n"; #endif #if defined(HPX_HAVE_HWLOC) strm << " HPX_HAVE_HWLOC=ON\n"; #else strm << " HPX_HAVE_HWLOC=OFF\n"; #endif #if defined(HPX_HAVE_ITTNOTIFY) strm << " HPX_HAVE_ITTNOTIFY=ON\n"; #else strm << " HPX_HAVE_ITTNOTIFY=OFF\n"; #endif #if defined(BOOST_MSVC) #if defined(HPX_HAVE_FIBER_BASED_COROUTINES) strm << " HPX_HAVE_FIBER_BASED_COROUTINES=ON\n"; #else strm << " HPX_HAVE_FIBER_BASED_COROUTINES=OFF\n"; #endif #if defined(HPX_HAVE_SWAP_CONTEXT_EMULATION) strm << " HPX_HAVE_SWAP_CONTEXT_EMULATION=ON\n"; #else strm << " HPX_HAVE_SWAP_CONTEXT_EMULATION=OFF\n"; #endif #endif #if defined(HPX_HAVE_RUN_MAIN_EVERYWHERE) strm << " HPX_HAVE_RUN_MAIN_EVERYWHERE=ON\n"; #else strm << " HPX_HAVE_RUN_MAIN_EVERYWHERE=OFF\n"; #endif #if defined(HPX_LIMIT) strm << " HPX_LIMIT=" << HPX_LIMIT << "\n"; #endif #if defined(HPX_PARCEL_MAX_CONNECTIONS) strm << " HPX_PARCEL_MAX_CONNECTIONS=" << HPX_PARCEL_MAX_CONNECTIONS << "\n"; #endif #if defined(HPX_PARCEL_MAX_CONNECTIONS_PER_LOCALITY) strm << " HPX_PARCEL_MAX_CONNECTIONS_PER_LOCALITY=" << HPX_PARCEL_MAX_CONNECTIONS_PER_LOCALITY << "\n"; #endif #if defined(HPX_INITIAL_AGAS_LOCAL_CACHE_SIZE) strm << " HPX_INITIAL_AGAS_LOCAL_CACHE_SIZE=" << HPX_INITIAL_AGAS_LOCAL_CACHE_SIZE << "\n"; #endif #if defined(HPX_AGAS_LOCAL_CACHE_SIZE_PER_THREAD) strm << " HPX_AGAS_LOCAL_CACHE_SIZE_PER_THREAD=" << HPX_AGAS_LOCAL_CACHE_SIZE_PER_THREAD << "\n"; #endif #if defined(HPX_HAVE_PARCELPORT_IPC) && defined(HPX_PARCEL_IPC_DATA_BUFFER_CACHE_SIZE) strm << " HPX_PARCEL_IPC_DATA_BUFFER_CACHE_SIZE=" << HPX_PARCEL_IPC_DATA_BUFFER_CACHE_SIZE << "\n"; #endif #if defined(HPX_HAVE_MALLOC) strm << " HPX_HAVE_MALLOC=" << HPX_HAVE_MALLOC << "\n"; #endif strm << " HPX_PREFIX (configured)=" << util::hpx_prefix() << "\n"; #if !defined(__ANDROID__) && !defined(ANDROID) && !defined(__MIC) strm << " HPX_PREFIX=" << util::find_prefix() << "\n"; #endif return strm.str(); }