]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Replace #warning directive by #error directive (commented out). Update documentation.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Mar 2004 07:17:27 +0000 (07:17 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Mar 2004 07:17:27 +0000 (07:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@8644 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/multithread_info.h
deal.II/base/source/multithread_info.cc

index f30e48285dc00ac0c32074df1f870cce823362c3..0890db0fbe7997dc2db2fec6ae29a9d8cc80cbe6 100644 (file)
@@ -53,6 +53,13 @@ class MultithreadInfo
                                      * system.  It is one if
                                      * detection is not implemented
                                      * or failed.
+                                     *
+                                     * If it is one, although you
+                                     * are on a multi-processor
+                                     * machine, please refer to the
+                                     * documentation in
+                                     * <tt>multithread_info.cc</tt>
+                                     * near to the #error directive.
                                      */
     const unsigned int n_cpus;
 
index 5fc7a3e49a26de9ba4084409dc7bff1b0297629c..f01523cc7fbd286199d142429b7ed7bd9a3001cf 100644 (file)
@@ -72,16 +72,26 @@ unsigned int MultithreadInfo::get_n_cpus()
 
 #  else
 
-// if you get to see this warning, then this can have two reasons: either
-// because you fell through all of the above #if clauses and on your system
-// the detection of processors is really not implemented, or you are using
-// a compiler that does not understand the #warning directive, in which case
-// you will see a report on the screen even if the detection of processors
-// is implemented for your system. In the latter case, you need not worry
-// about the warning (although it is acknowledged that it is annoying),
-// otherwise you might want to consider implementing the missing feature
-// and submitting it back to the authors of the library.
-#    warning Detection of Processors not supported on this OS
+// If you get n_cpus=1 although you are on a multi-processor machine,
+// then this may have two reasons: either because the system macros,
+// e.g.__linux__, __sgi__, etc. weren't defined by the compiler or the
+// detection of processors is really not implemented for your specific
+// system. In the first case you can add e.g. -D__sgi__ to your
+// compiling flags, in the latter case you need to implement the
+// get_n_cpus() function for your system.
+//
+// In both cases, this #else case is compiled, a fact that you can
+// easily verify by uncommenting the following #error directive,
+// recompiling and getting a compilation error right at that line.
+// After definition of the system macro or the implementation of the
+// new detection this #error message during compilation shouldn't
+// occur any more.
+//
+// Please send all new implementations of detection of processors to
+// the deal.II mailing list, such that it can be included into the
+// next deal.II release.
+
+//#error Detection of Processors not supported on this OS. Setting n_cpus=1 by default.
 
 unsigned int MultithreadInfo::get_n_cpus()
 {

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.