Hi Michael! We have the same problem on our machine in our working group. As far as I know, in actual versions of deal.ii there is no possibility to set Multithreadinfo::n_default_threads to any kind of number. However, in older deal.ii versions this was possible.
> Hi all, > > I have a question regarding controlling the number of threads that > deal.II uses when run multithreading is enabled. This problem arose > because I am now running code on an SMP machine with about 240 cores > and a batch system (Torque I believe). My job does not require many > cores so I request 4 from the batch system, however when my deal.II > code starts it correctly determines that the machine has 240 cores and > attempts to use them all. Apart from tying up the cluster, this also > means that my own program is very slow. > > How can I limit the number of cores that deal.II attempts to use? I > believe that this question has come up before, but unfortunately can't > find the response. If my memory serves me no real answer came for the > question since the person who asked it was not using an SMP machine of > this size and it wasn't a real issue. I have testing creating an > instance of MultiThreadInfo and setting > MultithreadInfo::n_default_threads to 4, but this made no difference. > > My current best option would be to decide how many cores I want to use > once off, modify the source of MultithreadInfo::n_cpus to return that > number (since this seems to the value that the number of threads is > set from) and recompile. This isn't a very elegant solution and any > suggestions are appreciated. > If it does work, you make this. However, you always have the possibility to configure deal.ii with the option --disable-threads and run your program on just one core. But this is probably not your intention. > Regards, > Michael Best regards, Thomas >>--------------------------------------->> Thomas Wick Universität Heidelberg AG Numerik, Raum 213 Im Neuenheimer Feld 293 69120 Heidelberg Tel.: +49-(0)6221 / 54-5449 E-mail: [email protected] Web: numerik.iwr.uni-heidelberg.de/~twick/ >>--------------------------------------->> _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
