Skip to content

[OpenMP] Fix KMP_OS_AIX handling #138499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ class KMPAffinity {
typedef KMPAffinity::Mask kmp_affin_mask_t;
extern KMPAffinity *__kmp_affinity_dispatch;

#ifndef KMP_OS_AIX
#if !KMP_OS_AIX
class kmp_affinity_raii_t {
kmp_affin_mask_t *mask;
bool restored;
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_affinity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5468,7 +5468,7 @@ void __kmp_affinity_bind_init_mask(int gtid) {
__kmp_set_system_affinity(th->th.th_affin_mask, FALSE);
} else
#endif
#ifndef KMP_OS_AIX
#if !KMP_OS_AIX
// Do not set the full mask as the init mask on AIX.
__kmp_set_system_affinity(th->th.th_affin_mask, TRUE);
#endif
Expand Down
5 changes: 3 additions & 2 deletions openmp/runtime/src/kmp_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define KMP_OS_SOLARIS 0
#define KMP_OS_WASI 0
#define KMP_OS_EMSCRIPTEN 0
#define KMP_OS_AIX 0
#define KMP_OS_UNIX 0 /* disjunction of KMP_OS_LINUX, KMP_OS_DARWIN etc. */

#ifdef _WIN32
Expand Down Expand Up @@ -163,11 +164,11 @@
#undef KMP_ARCH_PPC64_ELFv1
#define KMP_ARCH_PPC64_ELFv1 1
#endif
#elif defined KMP_OS_AIX
#elif KMP_OS_AIX
#undef KMP_ARCH_PPC64_XCOFF
#define KMP_ARCH_PPC64_XCOFF 1
#endif
#elif defined(__powerpc__) && defined(KMP_OS_AIX)
#elif defined(__powerpc__) && KMP_OS_AIX
#undef KMP_ARCH_PPC_XCOFF
#define KMP_ARCH_PPC_XCOFF 1
#undef KMP_ARCH_PPC
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_wrapper_getpid.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// On Unix-like systems (Linux* OS and OS X*) getpid() is declared in standard
// headers.
#if !defined(KMP_OS_AIX) && !defined(KMP_OS_HAIKU)
#if !KMP_OS_AIX && !KMP_OS_HAIKU
#include <sys/syscall.h>
#endif
#include <sys/types.h>
Expand Down
Loading