From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailg110.ethz.ch (mailg110.ethz.ch [IPv6:2001:67c:10ec:5605::21]) by sourceware.org (Postfix) with ESMTPS id 1A3F1385E021 for ; Tue, 5 Jan 2021 16:12:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1A3F1385E021 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=student.ethz.ch Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=koenigni@student.ethz.ch Received: from mailm211.d.ethz.ch (2001:67c:10ec:5603::25) by mailg110.ethz.ch (2001:67c:10ec:5605::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 5 Jan 2021 17:11:59 +0100 Received: from [10.5.35.95] (10.5.35.95) by mailm211.d.ethz.ch (2001:67c:10ec:5603::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 5 Jan 2021 17:12:24 +0100 Subject: Re: Update on shared memory coarrays To: Iain Sandoe CC: Thomas Koenig , "dhumieres.dominique@free.fr" , Fortran List References: <86fa53e3-155d-1912-8b88-b0789323ee09@netcologne.de> <2d94ef13-e12e-b941-dcb0-a9a79362f2d5@netcologne.de> <6D26C802-E6E0-473F-BB17-A9B373541980@sandoe.co.uk> <00ABD0DC-235B-4A4E-B9E0-B1200AC07EAD@sandoe.co.uk> <191C9834-F907-4CF0-B652-16E04A42B7AB@sandoe.co.uk> <5683F724-2723-4EE4-AC50-83FDB598D238@sandoe.co.uk> <2007278F-63EE-427A-BFB6-A504E96D3572@sandoe.co.uk> <116ed7ff-7cdc-6324-c6c3-33fa9b1a036c@netcologne.de> <72972030-407F-4BD7-9B6C-D6937292E906@sandoe.co.uk> <816E309C-4983-4159-973D-F1A46AD8CB3C@sandoe.co.uk> <4020eab0-cd40-7ed5-5de0-ebb0727815f9@student.ethz.ch> From: =?UTF-8?Q?Nicolas_K=c3=b6nig?= Message-ID: <88f87fb3-4374-c60f-889f-159d223634c7@student.ethz.ch> Date: Tue, 5 Jan 2021 18:11:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.5.35.95] X-ClientProxiedBy: mailm113.d.ethz.ch (2001:67c:10ec:5602::25) To mailm211.d.ethz.ch (2001:67c:10ec:5603::25) X-TM-SNTS-SMTP: F0FD23A00B4586D6060DF7E19D8861AEC5E1DD1E6034DF3DC506CCBB6DEBA8622000:8 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, LIKELY_SPAM_FROM, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 16:12:30 -0000 Hi Iain On 05/01/2021 15:58, Iain Sandoe wrote: > Hi Nicolas, > > Nicolas König wrote: > >>>>>> It also doesn't bring my hopes up that other things like >>>>>> pthread_{mutex,cond}attr_setpshared() will work. >>>>> Darwin is Posix SUSv3 (actually, AFAICT the majority of the certified >>>>> platforms are; there only seems to be one certified to UNIX7). >>>>> - so pthreads stuff that’s mandated in SUSv3 is definitely present >>>>> on Darwin. >>>>> (in practice some of the optional stuff is also present - you can >>>>> look at >>>>> what libstdc++ does to get an idea of what works in a >>>>> cross-platform manner) >>>> >>>> Process shared mutexes/condition variables are optional :) Attached >>>> is a test case that should check whether the two work. >>>> >>> This will work from macOS 10.7+ (Darwin11+) >> >> Finally some good news. >> >>> earlier OS versions fail with >>> pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)failed: >>> Undefined error: 0 >>> (the compile succeeds, but some functionality is missing). >> >> Shared mutexes are absolutely necessary, so we probably will never >> support macOS<10.7, but -given it was released 9 years ago- I don't >> feel too bad about that. > > I don’t feel too bad about it either (not bad enough to divert scarce > effort into finding an alterate solution, currently anyway)*** > > However, there needs to be a strategy for handling it ( e.g. don’t try > to build the library / disable the functionality ) on platforms without > required support. The test I send you should probably be added as a configure test, though I haven't heard anything about the branch causing build errors. > > GCC is built on macOS back to 10.4 [I even test it over that range] >  (and macports and homebrew have support for many OSS packages) - it’s > completely reasonable that these (much) older platforms have reduced or > absent functionality - but GCC should continue to build there, and work > at least as much as it does now ;) Absolutely agreed. I'm trying to be as careful as possible not to break bootstrap anywhere :D Nicolas > > cheers > Iain > > *** note that libstdc++ has encountered most of the pthreads issues and > might already have solutions. >