]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Deprecate Utilities::System::program_uses_mpi in favor of Utilities::System::job_supp...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Sep 2011 13:30:02 +0000 (13:30 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Sep 2011 13:30:02 +0000 (13:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@24421 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/base/utilities.h
deal.II/source/base/utilities.cc

index 523490874bee70bff0ed7921c121060e8500b0aa..03d77361432da4a6ff4198cfce0fc21f6c924b3c 100644 (file)
@@ -121,6 +121,12 @@ is now deprecated.
 <br>
 (Wolfgang Bangerth, 2011/09/26)
 
+<li> Removed: Utilities::System::program_uses_mpi does exactly the same thing
+as Utilities::System::job_supports_mpi. The former has therefore been
+deprecated.
+<br>
+(Wolfgang Bangerth, 2011/09/26)
+
 <li> New: When using a new enough version of GCC, debug sections in
 object files are now compressed using the <code>-Wa,--compress-debug-sections</code>
 flag, resulting in savings in disk space on the order of 230 MB.
index 87af69181f87404247ce71762d1199fc8fbc6dc7..ba15c0fc4c7b44d5fd97849ba3fa9b3ce0b4b10c 100644 (file)
@@ -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();
   }
 
 
index a119461e5f0ecf13ef2ff76cb455b7adce6effe1..1b6c721ffb73c3b0242b9183093fba6c2b29ee42 100644 (file)
@@ -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)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.