From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 249623858C31 for ; Fri, 1 Mar 2024 08:29:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 249623858C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 249623858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709281772; cv=none; b=CQOOQKkM0C9Mmh+0jjaSSD65woNTnCCJ77N6LmnYeu9kVvbtUHy6sXRaobvapBTlE2YfeLPNZupQcIOhDiQvXuBpM+spI09xxL2GIrC9QaGOZF6/pyKBC0nEEoCHX2vE0rH3fCokEi3o0P9zGVH1BnEDRdxY15yMs3SDiwBnw28= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709281772; c=relaxed/simple; bh=SNt4zjiRx09ktvrlb/KaOZrSvJS2W1DCQ+x1vdpgikU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=XO9Hzbhl/uUcOllnYooPeio2D4OoMwXZ6qTiwPtWN2QxUSdszcHdONmn2n2QgQk1jUiWr94nBjeh3+G7OAGjVqpukzIIRoM4jhB9BrXXorQBhFbPgiL5vnUyyXchOa4zHKsma7lEXr3Aq3t13Mje5APs1TKD4N/ko5P7uOMuZss= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d109e82bd0so19893881fa.3 for ; Fri, 01 Mar 2024 00:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1709281743; x=1709886543; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LECmSuOWI4OXOoTA5v16UQuR6sFc/edXhToEkUcfsYE=; b=czyIaw5j52Ya2LZfSwD6OFmqweVtYfCRvFzx+AkkLbedbIuNHjahOEi7TbpCTpUHpO +ZtTcDTX88X3R+u4DqzQ7TA0W20lpy9Z89r7MzlsQYSVhS0ZkNfZisKQLSWRVwFKgkdX FXVnnkJ0LH95VQqiA3Ux2nCnABWBnK0AxTi4SgTGQGZ3pfl7bIetYAH9SE4drTtLrvxj BchV4Oa9E6O0QIZ7yvowyFvTH2lAgLXvMnnI2QvUj0btiHSlTS5d4xLwRh3xXoIgwM6p aQLrxWyBeOQTsx8iC5PJwbOUkcgLGYNAT+7I9v58ZR2jA9YWxExgIrfKUI57boG6UEzs 073Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709281743; x=1709886543; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LECmSuOWI4OXOoTA5v16UQuR6sFc/edXhToEkUcfsYE=; b=CYCQHqrKg2IxmqC5iJnRI7UUFNs4+GA1RBRwKoXhh7NQpXwv+iCOzXjtlTWzVo7VEt tU4WexBNGjWE8H2YrK4MH8TXxago2IYRwIEeHha7VYkhT05xNIdw4u1otyJzKaAIY1m0 3Zb1hZ2izz0/q0mN6o7K6srF2ccrNP97Dd5F44E7UWO78T3IVw9FV8BbVpx4Roqbfy99 4EniSHN/tqdfQ4HBjgKPos0WhMeT8mQra/fQWP4qbYazl/eLauzO5yLBuBgKCSwgY+7p wy6mKzE2oJWSNOsZsgP57NcKLnP1lDPfqxCU7AulASaxxZ7gdYEwkb4R7Q50dplXfZ9k RDOA== X-Gm-Message-State: AOJu0Yy8BwzqheRJn56i4uj9xFw83KGuSE0IvkvyfKA0msS7CONPso+p VGOA8hnRbCAA5nQNW8xtmyw/8NHJ5ZLVel8NtkrWqgLf9zOs19cGlJb+qRc/2PA= X-Google-Smtp-Source: AGHT+IFsOx9LI9ydojqRWIpd37lakl0a5kxlXJM07fc1UEP1sZqQmsnABglaFKOWu+DO5DA8i5EmVg== X-Received: by 2002:a05:6512:31d6:b0:513:437:b348 with SMTP id j22-20020a05651231d600b005130437b348mr990286lfe.10.1709281743076; Fri, 01 Mar 2024 00:29:03 -0800 (PST) Received: from ?IPV6:2001:16b8:2ad9:e300:5813:eeb6:c153:9368? (200116b82ad9e3005813eeb6c1539368.dip.versatel-1u1.de. [2001:16b8:2ad9:e300:5813:eeb6:c153:9368]) by smtp.gmail.com with ESMTPSA id g25-20020adfa499000000b0033d6c928a95sm3946565wrb.63.2024.03.01.00.29.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Mar 2024 00:29:02 -0800 (PST) Message-ID: Date: Fri, 1 Mar 2024 09:29:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [committed] Set num_threads to 50 on 32-bit hppa in two libgomp loop tests Content-Language: en-US To: John David Anglin , Thomas Schwinge , John David Anglin Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek , Helge Deller References: <87sf1ax4aq.fsf@euler.schwinge.ddns.net> From: Tobias Burnus In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi all, hi John & Thomas John David Anglin wrote: > On 2024-02-29 6:02 p.m., Thomas Schwinge wrote: >> I wonder: shouldn't that cap at 50 threads happen inside libgomp, >> generally, instead of per test case and user code (!)? >> Per my >> understanding, OpenMP 'num_threads' specifies a *desired* number of >> threads; the implementation may limit that value. > Sounds like a good suggestion. I concur – if the hardware/OS doesn't support more. * * * However – for completeness and to correct a statement: While num_threads specifies the desired number of threads, 'strict' will turn this into error termination if the implementation cannot fulfilled the request. Namely, "if prescriptiveness is specified as 'strict' and Algorithm 11.1 would result in a number of threads other than the value of the first item of the _nthreads_ list then runtime error termination is performed." Note that 'strict' for num_threads is new in/since the OpenMP 6.0 draft (TR11, I think) and not yet implemented in GCC. However, I guess that the thread limit also affects 'teams' and nested parallelization. And for teams 'num_teams(n)' sets lower = upper value to 'n' — Thus, this enforces this number of teams. (While 'num_teams(m:n)' sets both limits and 'omp_set_num_teams(n)' or OMP_NUM_TEAMS=n only set the upper bound). [As far as I can see, OpenACC always permits an implementation to use fewer gangs/workers/vectors if the hardware doesn't support the requested number.] Tobias