[Pw_forum] Quantum Espresso (4.3.2) and pure openmp runs

Axel Kohlmeyer akohlmey at gmail.com
Mon Aug 6 12:20:59 CEST 2012


On Mon, Aug 6, 2012 at 12:06 PM, Cristian Degli Esposti Boschi
<degliesposti at bo.imm.cnr.it> wrote:
> Dear all,
>
> I have a (maybe basic) question on the performance of Quantum Espresso
> with respect to openmp, even if I do not realise if the answer lies in
> the way QE handles different levels of parallelism or lies at the system
> level instead.
>
> However, I am running QE 4.3.2 on a quad-core machine with 2 CPUs 64bit.
> SO is Debian stable, and it recognises 16 threads in the CPU table.
>
> I have compiled QE with pure openmp support (gcc) without any MPI
> environment.
>
> The question is: even if I do NOT set the OMP_NUM_THREADS variable
> at runtime, from the table of the "top" command my process
> now uses 1000 % CPU time, as if it were "parallelised" over 10 threads.
>
> Is this real? Is there some kind of default when pw.x is invoked?
> If so, how is openmp parallelism exploited by QE?

this has nothing to do with QE but is a typical implementation default.
if OMP_NUM_THREADS is not set, most OpenMP runtime environment
automatically default to using all CPU cores for threads. the fact
that you see about 1000% and not 1600% is probably due to the
limited threading during the course of execution for your specific
input. in any case, you are more likely to get better performance
with hyperthreading disabled and/or OMP_NUM_THREADS set to 8.

BTW: this default behavior of OpenMP is a major nuisance for
codes that can do both MPI and OpenMP, so that any reasonable
system admin will set up machines, so that OMP_NUM_THREADS
is explicitly set to 1 by default in the system environment.

axel.


>
> Thanks for your time and support.
>
> --
> Cristian Degli Esposti Boschi
> CNR-IMM, Sezione di Bologna,
> via Gobetti, 101, 40129, Bologna, Italia
> tel. ++39 051 6399152, fax ++39 051 6399216
> email: degliesposti -AT- bo.imm.cnr.it
> web:   www.bo.imm.cnr.it/site/staff/personal_pages/degliesposti/
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum



-- 
Dr. Axel Kohlmeyer  akohlmey at gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.



More information about the users mailing list