]> https://gitweb.dealii.org/ - dealii.git/commitdiff
dealii::multithread_info.n_cpus returns the correct number of CPU on FreeBSD. 440/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 14 Jan 2015 16:17:45 +0000 (10:17 -0600)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 14 Jan 2015 16:59:15 +0000 (10:59 -0600)
doc/news/changes.h
source/base/multithread_info.cc

index bceba1927b4882a70e72764333bd7a75e04dafde..e28e3b94bd187215240753be81296851ec6a5d29 100644 (file)
@@ -202,6 +202,12 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> New: dealii::multithread_info.n_cpus returns the correct number of CPU 
+  on FreeBSD.
+  <br>
+  (Bruno Turcksin, 2015/01/14)
+  </li>
+
   <li> Improved: MPI collective operations such as MPI::sum, MPI::max now
   check for job_supports_mpi() internally, which allows running them also
   without a call to MPI_Init.
index 0c162e16bca073bc42ce3a25e998d8b1e490cac2..0728ea5169043a1fb02c4bebbacb95d579e2b418 100644 (file)
 #  include <unistd.h>
 #endif
 
-#if defined(__MACH__) && defined(__APPLE__)
+#if (defined(__MACH__) && defined(__APPLE__)) || defined(__FreeBSD__)
 #  include <sys/types.h>
 #  include <sys/sysctl.h>
 #endif
 
-#if defined(__FreeBSD__)
-#  include <stdlib.h>
-#endif
 
 #ifdef DEAL_II_WITH_THREADS
 #  include <deal.II/base/thread_management.h>
@@ -53,7 +50,7 @@ unsigned int MultithreadInfo::get_n_cpus()
   return sysconf(_SC_NPROCESSORS_ONLN);
 }
 
-#  elif defined(__MACH__) && defined(__APPLE__)
+#  elif (defined(__MACH__) && defined(__APPLE__)) || defined(__FreeBSD__)
 // This is only tested on a dual G5 2.5GHz running MacOSX 10.3.6
 // and on an Intel Mac Book Pro.
 // If it doesn't work please contact the mailinglist.

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.