[Openmp-commits] [PATCH] D89898: changing OMP rtl to use shared memory instead of env variable

Todd Erdner via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 18 13:57:04 PST 2020


terdner added a comment.

Ok, Here is what I propose we do:

1. I will change the name of the shared memory file to include UID at the end.  This way it will only conflict with users of the same UID which will reduce the likelihood of this happening because you will no longer collide with other UID.  this also implies that if a run changes UID the openMP runtime library will no longer recognize that a runtime is running.
2. I will put a call into unregister the library in z_Linux.utls.cpp at about line 1153 (in the case statement for SIGTERM).  This should call __kmp_unregister_library whenever runtime gets SIGTERM, SIGQUIT, SIGSYS, SIGSEGV etc (see list in file).   This may remove some of the leftover files when a run is terminated.

As Andrey said, user should set KMP_DUPLICATE_LIB_OK=1 if they want to allow the runtime to run when an existing file with the same name is outstanding.   If that env variable is not set runtime will still exit out.

I will make these changes today in my local area and run some regressions and confirm it doesn't have any unintended consequences.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89898/new/

https://reviews.llvm.org/D89898



More information about the Openmp-commits mailing list