<div dir="ltr">Dear William,<div>CP2K uses OpenMP for the threading. The number of threads is set by using the environment variable OMP_NUM_THREADS and it goes at runtime, therefore there is no relation with the compilation (you can specify the number of threads at runtime). By default, if you don't set the variable, OpenMP assumes the maximum number of available threads on the system (8 and 40 in your case). That's why you see 40 threads. However, you should consider that it is very hard to get good scalability for such large number of threads (actually it depends on your workload), that's why in "average" (what you see from top command) you are using 8 corresponding fully loaded threads.</div><div><br></div><div>I can suggest to experiment with setting a different number of threads. Just use:</div><div><br></div><div>export OMP_NUM_THREADS=<any number between 1 and 40></div><div><br></div><div>before running CP2K.</div><div><br></div><div>Another better solution would be to use MPI and OpenMP (psmp version), by using 4 MPI ranks and 10 threads (for example). Likely it would give you better performance...</div><div><br></div><div>Alfio</div><div><br></div><div><br><br>Il giorno giovedì 23 febbraio 2017 22:48:01 UTC+1, William Tao ha scritto:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>Dear friends,</div><div><br></div>I compiled the cp2k version 4.1 on a 8-core CPU machine.<div>When I run the binary cp2k.ssmp on another machine with 40-core CPU, the output prints that the number of threads is 40.</div><div>However, when I check with "top" command, the process could use up to 800% CPU.</div><div><br></div><div>Does anybody know what is going on?</div><div><br></div><div><br></div><div>William </div><div><br></div></div></blockquote></div></div>