[Openmp-dev] Runtime aborts when OMP_THREAD_LIMIT is set and "target teams" construct is used

Simone Atzeni via Openmp-dev openmp-dev at lists.llvm.org
Tue Aug 6 11:53:27 PDT 2019


Hi,

I have this program:

#define N 100

int main()
{
    int x[N], y[N];

    for (int i = 0; i < N; i++) {
        y[i] = 1;
        x[i] = 1;
    }

#pragma omp target teams distribute parallel for
    for (int i = 0; i < N; i++){
        y[i] += x[i];
    }
}

Compile and run in this way:

$ clang -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu test.c -lomptarget
$ OMP_THREAD_LIMIT=8 OMP_TARGET_OFFLOAD=DISABLED ./a.out
OMP: Warning #96: Cannot form a team with 80 threads, using 8 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
Segmentation fault (core dumped)

I get the warning, but why does the runtime aborts?
Is this situation described in the Spec? I could not find anything specific.

I am using Clang/LLVM/OpenMP 8.0.1.

Thanks.
Simone


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190806/54667dd9/attachment-0001.html>


More information about the Openmp-dev mailing list