Skip to content

Commit

Permalink
KMP_HW_SUBSET extended with NUMA support when HWLOC enabled
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D31600

llvm-svn: 300220
  • Loading branch information
AndreyChurbanov committed Apr 13, 2017
1 parent 7840dc8 commit 4a9a892
Show file tree
Hide file tree
Showing 7 changed files with 834 additions and 380 deletions.
2 changes: 1 addition & 1 deletion openmp/runtime/src/dllexports
Expand Up @@ -351,7 +351,7 @@ kmpc_set_defaults 224
%ifdef OMP_30
__kmpc_omp_taskyield 235
%endif # OMP_30
__kmpc_place_threads 236
# __kmpc_place_threads 236
%endif

# OpenMP 4.0 entry points
Expand Down
10 changes: 7 additions & 3 deletions openmp/runtime/src/i18n/en_US.txt
Expand Up @@ -38,7 +38,7 @@ Language "English"
Country "USA"
LangId "1033"
Version "2"
Revision "20160714"
Revision "20161216"



Expand Down Expand Up @@ -388,8 +388,8 @@ OBSOLETE "%1$s: granularity=core will be used."
EnvLockWarn "%1$s must be set prior to first OMP lock call or critical section; ignored."
FutexNotSupported "futex system call not supported; %1$s=%2$s ignored."
AffGranUsing "%1$s: granularity=%2$s will be used."
AffHWSubsetInvalid "%1$s: invalid value \"%2$s\", valid format is \"Ns[@N],Nc[@N],Nt "
"(nSockets@offset, nCores@offset, nTthreads per core)\"."
AffHWSubsetInvalid "%1$s: invalid value \"%2$s\", valid format is \"N<item>[@N][,...][,Nt] "
"(<item> can be S, N, L2, C, T for Socket, NUMA Node, L2 Cache, Core, Thread)\"."
AffHWSubsetUnsupported "KMP_HW_SUBSET ignored: unsupported architecture."
AffHWSubsetManyCores "KMP_HW_SUBSET ignored: too many cores requested."
SyntaxErrorUsing "%1$s: syntax error, using %2$s."
Expand All @@ -411,6 +411,10 @@ AffHwlocErrorOccurred "%1$s: Hwloc failed in %2$s. Relying on internal af
EnvSerialWarn "%1$s must be set prior to OpenMP runtime library initialization; ignored."
EnvVarDeprecated "%1$s variable deprecated, please use %2$s instead."
RedMethodNotSupported "KMP_FORCE_REDUCTION: %1$s method is not supported; using critical."
AffHWSubsetNoHWLOC "KMP_HW_SUBSET ignored: unsupported item requested for non-HWLOC topology method (KMP_TOPOLOGY_METHOD)"
AffHWSubsetManyNodes "KMP_HW_SUBSET ignored: too many NUMA Nodes requested."
AffHWSubsetManyTiles "KMP_HW_SUBSET ignored: too many L2 Caches requested."
AffHWSubsetManyProcs "KMP_HW_SUBSET ignored: too many Procs requested."


# --------------------------------------------------------------------------------------------------
Expand Down
21 changes: 13 additions & 8 deletions openmp/runtime/src/kmp.h
Expand Up @@ -774,11 +774,19 @@ typedef enum kmp_cancel_kind_t {
} kmp_cancel_kind_t;
#endif // OMP_40_ENABLED

extern int __kmp_place_num_sockets;
extern int __kmp_place_socket_offset;
extern int __kmp_place_num_cores;
extern int __kmp_place_core_offset;
extern int __kmp_place_num_threads_per_core;
// KMP_HW_SUBSET support:
typedef struct kmp_hws_item {
int num;
int offset;
} kmp_hws_item_t;

extern kmp_hws_item_t __kmp_hws_socket;
extern kmp_hws_item_t __kmp_hws_node;
extern kmp_hws_item_t __kmp_hws_tile;
extern kmp_hws_item_t __kmp_hws_core;
extern kmp_hws_item_t __kmp_hws_proc;
extern int __kmp_hws_requested;
extern int __kmp_hws_abs_flag; // absolute or per-item number requested

/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
Expand Down Expand Up @@ -3494,9 +3502,6 @@ KMP_EXPORT kmp_int32 __kmp_get_reduce_method( void );
KMP_EXPORT kmp_uint64 __kmpc_get_taskid();
KMP_EXPORT kmp_uint64 __kmpc_get_parent_taskid();

// this function exported for testing of KMP_PLACE_THREADS functionality
KMP_EXPORT void __kmpc_place_threads(int,int,int,int,int);

/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */

Expand Down

0 comments on commit 4a9a892

Please sign in to comment.