]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
update quick test to work on older kernels
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 16 Sep 2013 21:38:01 +0000 (21:38 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 16 Sep 2013 21:38:01 +0000 (21:38 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30749 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/tests/affinity.cc

index 81549ae370defe501f551bcdf6b4025e7067ebf4..96a6d79fa156424e88c0023eb4237764c9c81ec1 100644 (file)
@@ -1,4 +1,5 @@
 #include <deal.II/grid/tria.h>
+#include <stdio.h>
 #include <sched.h>
 
 int main ()
@@ -18,7 +19,9 @@ int main ()
       return -1;
     }
 
-  unsigned int bits_set = CPU_COUNT(&my_set);
+  unsigned int bits_set = 0;//not supported on old kernels: CPU_COUNT(&my_set);
+  for (int i=0;i<CPU_SETSIZE;++i)
+    bits_set += CPU_ISSET(i,&my_set);
 
   if (bits_set==1)
     {

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.