[CP2K:3050] Re: Segfault with psmp

Ondrej Marsalek ondrej.... at gmail.com
Thu Jan 13 14:21:03 CET 2011


Hi,

On Wed, Jan 12, 2011 at 09:15, Urban Borštnik <urban.b... at gmail.com> wrote:
> Hello,
>
> On Tue, 2011-01-11 at 14:49 +0100, Ondrej Marsalek wrote:
>> Additional confusion: the problem occurs within an 'IF (nthread > 1)',
>> even if I set OMP_NUM_THREADS=1. When I print nthread in that place, I
>> always get '8'. Is cp2k supposed to honor the value of the env
>> variable? If not, what is the proper way to set the number of threads?
>
> The OMP_NUM_THREADS environment variable is not interpreted by CP2K but
> by the threading library that implements OpenMP.
>
> This variable is obtained by a call to OMP_GET_MAX_THREADS.  Its return
> value of 8 in your case seems to conflict with the specified behavior,
> which is to return the number of threads to be used in (following) OMP
> PARALLEL sections.  These continue to use only one thread.

Thanks for the info, it is what I expected but not what I was getting.
Turns out it was a silly typo on my part, sorry about that. My I get
expected behavior with respect to the number of threads, but still get
the original bug. I will prepare a simpler test case and post it
separately.

Ondrej



More information about the CP2K-user mailing list