Index: openmp/trunk/runtime/src/i18n/en_US.txt =================================================================== --- openmp/trunk/runtime/src/i18n/en_US.txt +++ openmp/trunk/runtime/src/i18n/en_US.txt @@ -38,7 +38,7 @@ Country "USA" LangId "1033" Version "2" -Revision "20170327" +Revision "20170523" @@ -325,6 +325,8 @@ # %1, -- name of ignored variable, %2 -- name of variable with higher priority. OBSOLETE "%1$s: overrides %3$s specified before" # %1, %2 -- name and value of the overriding variable, %3 -- name of overriden variable. +AffTilesNoHWLOC "%1$s: Tiles are only supported if KMP_TOPOLOGY_METHOD=hwloc, using granularity=package instead" +AffTilesNoTiles "%1$s: Tiles requested but were not detected on this HW, using granularity=package instead" OmptOutdatedWorkshare "OMPT: Cannot determine workshare type; using the default (loop) instead. " "This issue is fixed in an up-to-date compiler." Index: openmp/trunk/runtime/src/kmp_affinity.cpp =================================================================== --- openmp/trunk/runtime/src/kmp_affinity.cpp +++ openmp/trunk/runtime/src/kmp_affinity.cpp @@ -3849,6 +3849,13 @@ } } + if (__kmp_affinity_gran == affinity_gran_tile && + // check if user's request is valid + __kmp_affinity_dispatch->get_api_type() == KMPAffinity::NATIVE_OS) { + KMP_WARNING(AffTilesNoHWLOC, "KMP_AFFINITY"); + __kmp_affinity_gran = affinity_gran_package; + } + int depth = -1; kmp_i18n_id_t msg_id = kmp_i18n_null; @@ -4115,6 +4122,11 @@ return; } + if (__kmp_affinity_gran == affinity_gran_tile && __kmp_tile_depth == 0) { + // tiles requested but not detected, warn user on this + KMP_WARNING(AffTilesNoTiles, "KMP_AFFINITY"); + } + __kmp_apply_thread_places(&address2os, depth); // Create the table of masks, indexed by thread Id.