From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A8312385DC27 for ; Wed, 16 Mar 2022 13:36:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8312385DC27 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-Rec_nN2SOtSewoHGuEPJVA-1; Wed, 16 Mar 2022 09:36:48 -0400 X-MC-Unique: Rec_nN2SOtSewoHGuEPJVA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 897B93800503; Wed, 16 Mar 2022 13:36:47 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45D7D454D7C; Wed, 16 Mar 2022 13:36:46 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 22GDaiiu3297935 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 16 Mar 2022 14:36:44 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 22GDacKK3292526; Wed, 16 Mar 2022 14:36:38 +0100 Date: Wed, 16 Mar 2022 14:36:37 +0100 From: Jakub Jelinek To: Marcel Vollweiler Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH] OpenMP, Fortran: Bugfix for omp_set_num_teams. Message-ID: Reply-To: Jakub Jelinek References: <498625bc-2ca0-8f5e-89df-03453a2c96a8@codesourcery.com> <02535b12-184f-02ff-ea02-becd75c5a097@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <02535b12-184f-02ff-ea02-becd75c5a097@codesourcery.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 13:36:52 -0000 On Wed, Mar 16, 2022 at 02:06:16PM +0100, Marcel Vollweiler wrote: > libgomp/ChangeLog: > > * fortran.c (omp_set_num_teams_8_): Fix bug. > * testsuite/libgomp.fortran/icv-8.f90: New test. Ok, with a minor nit. Please use Call omp_set_num_teams instead of omp_set_max_active_levels. instead of Fix bug. in the ChangeLog. > diff --git a/libgomp/fortran.c b/libgomp/fortran.c > index 8c1cfd1..d984ce5 100644 > --- a/libgomp/fortran.c > +++ b/libgomp/fortran.c > @@ -491,7 +491,7 @@ omp_set_num_teams_ (const int32_t *num_teams) > void > omp_set_num_teams_8_ (const int64_t *num_teams) > { > - omp_set_max_active_levels (TO_INT (*num_teams)); > + omp_set_num_teams (TO_INT (*num_teams)); > } > > int32_t > diff --git a/libgomp/testsuite/libgomp.fortran/icv-8.f90 b/libgomp/testsuite/libgomp.fortran/icv-8.f90 > new file mode 100644 > index 0000000..9478c15 > --- /dev/null > +++ b/libgomp/testsuite/libgomp.fortran/icv-8.f90 > @@ -0,0 +1,10 @@ > +! This tests 'set_num_teams_8' function. > + > +program set_num_teams_8 > + use omp_lib > + use, intrinsic :: iso_fortran_env > + integer(int64) :: x > + x = 42 > + call omp_set_num_teams (x) > + if (omp_get_max_teams () .ne. 42) stop 1 > +end program Jakub