Re: [OpenMP] 40% slow down when setting OMP_PLACES="sockets"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



okay, I think I can already answer myself why Clang is unaffected by this
setting. The environment variables in libgomp are parsed in

static void __attribute__((constructor))
initialize_env (void)

this is attribute is GCC specific and basically ignored by Clang. And
therefore all env. vars for openmp are ignored when linking the library
with Clang, great.

The other issue I suspect it is because these OMP env. vars are mere
wrappers to pthread,  that is, they affect all threads in the program,
rather than only the threads handled by openmp. Again, great.

Yours,
quack

On Mon, 4 Jan 2021 at 22:28, nu quaquaraqua <nuquaquaraqua@xxxxxxxxx> wrote:

> Hey there,
> I have a multi-threaded experiment that runs with 60+ logical threads on a
> dual-socket 40-cores-in total machine. When setting the env. var.
> OMP_PLACES="sockets", the experiment is 40% slower. While the program is
> indeed linked with -fopenmp, it does not use it any opemp clause in the
> experiment nor before. Also this seems specific to GCC, as exporting the
> env. var. does not cause any slow down when compiling the program with
> Clang, despite both being linked to the same libgomp.
>
> Can someone explain what it is occurring here?
>
> Linux 5.0.17, Fedora 30, gcc v10.2
>
> Yours,
> quack
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux