From: bangerth Date: Mon, 26 Sep 2011 13:30:02 +0000 (+0000) Subject: Deprecate Utilities::System::program_uses_mpi in favor of Utilities::System::job_supp... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876f741c5bd7cb9a3c2841b3dfb1ea91e70e1a32;p=dealii-svn.git Deprecate Utilities::System::program_uses_mpi in favor of Utilities::System::job_supports_mpi. git-svn-id: https://svn.dealii.org/trunk@24421 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 523490874b..03d7736143 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -121,6 +121,12 @@ is now deprecated.
(Wolfgang Bangerth, 2011/09/26) +
  • Removed: Utilities::System::program_uses_mpi does exactly the same thing +as Utilities::System::job_supports_mpi. The former has therefore been +deprecated. +
    +(Wolfgang Bangerth, 2011/09/26) +
  • New: When using a new enough version of GCC, debug sections in object files are now compressed using the -Wa,--compress-debug-sections flag, resulting in savings in disk space on the order of 230 MB. diff --git a/deal.II/include/deal.II/base/utilities.h b/deal.II/include/deal.II/base/utilities.h index 87af69181f..ba15c0fc4c 100644 --- a/deal.II/include/deal.II/base/utilities.h +++ b/deal.II/include/deal.II/base/utilities.h @@ -494,6 +494,23 @@ namespace Utilities */ bool job_supports_mpi (); + /** + * Alias for job_supports_mpi(). + * + * @deprecated + */ + bool program_uses_mpi(); + + /** + * @name Functions that work + * in parallel via MPI. The + * functions following here + * are all deprecated and have + * been moved to namespace + * Utilities::MPI. + */ + /** @{ */ + /** * This function is an alias for * Utilities::MPI::n_mpi_processes. @@ -546,6 +563,7 @@ namespace Utilities const double my_value, MinMaxAvg & result); + /** @} */ /** @@ -608,14 +626,6 @@ namespace Utilities */ const bool owns_mpi; }; - - /** - * Returns whether deal.II has been - * configured to use MPI and if so - * whether MPI has already been - * initialized using MPI_Init(). - */ - bool program_uses_mpi(); } diff --git a/deal.II/source/base/utilities.cc b/deal.II/source/base/utilities.cc index a119461e5f..1b6c721ffb 100644 --- a/deal.II/source/base/utilities.cc +++ b/deal.II/source/base/utilities.cc @@ -779,27 +779,12 @@ namespace Utilities } -#ifdef DEAL_II_COMPILER_SUPPORTS_MPI - bool job_supports_mpi () { - int MPI_has_been_started = 0; - MPI_Initialized(&MPI_has_been_started); - - return (MPI_has_been_started > 0); + return program_uses_mpi; } -#else - - bool job_supports_mpi () - { - return false; - } - -#endif - - MPI_InitFinalize::MPI_InitFinalize (int &argc, char** &argv)