[Openmp-commits] [PATCH] D142175: [OpenMP] Create a temp file in /tmp if /dev/shm is not accessible

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 24 14:37:28 PST 2023


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LG



================
Comment at: openmp/runtime/src/kmp_runtime.cpp:6790
     } else if (fd1 == -1) { // SHM didn't open; it was due to error other than
-      // already exists.
-      // error out here.
-      __kmp_fatal(KMP_MSG(FunctionError, "Can't open SHM2"), KMP_ERR(errno),
-                  __kmp_msg_null);
+      // Already exists. Try to create a temp file under /tmp.
+      // TODO: /tmp might not always be the temporary directory. For now we will
----------------
start the comment in this line, not the line above


================
Comment at: openmp/runtime/src/kmp_runtime.cpp:6917
+    // file did not open. Try the temporary file.
+    use_shm = false;
+    FILE *tf = fopen(temp_reg_status_file_name, O_RDONLY);
----------------
KMP_DEBUG_ASSERT(temp_reg_status_file_name);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142175



More information about the Openmp-commits mailing list