delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 9A0F73858018 |
Authentication-Results: | sourceware.org; dmarc=none (p=none dis=none) |
header.from=SystematicSw.ab.ca | |
Authentication-Results: | sourceware.org; |
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca | |
X-Authority-Analysis: | v=2.4 cv=NYRYa0P4 c=1 sm=1 tr=0 ts=5ffa3421 |
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 | |
a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=mDV3o1hIAAAA:8 a=AIPdC31oAAAA:8 | |
a=w_pzkKWiAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10 a=PpX-2crAHtMA:10 | |
a=fOcBNXRhbC4A:10 a=Kn6ebLBVpGwA:10 a=DebOKrv3xLwA:10 a=XYUH600dFVEA:10 | |
a=ul9cdbp4aOFLsgKbc677:22 a=_FVE-zBwftR9WsbkzFJk:22 a=5478VIVnyzLWgM9zoUhq:22 | |
a=sRI3_1zDfAgwuvI8zelB:22 | |
To: | cygwin AT cygwin DOT com |
References: | <657c8576-2715-8c80-a59a-23453306230f AT netcologne DOT de> |
<32467133-a288-b974-4a86-fe17d1ac6a14 AT SystematicSw DOT ab DOT ca> | |
<c53fa5c5-84f9-dc0d-0be5-e7602f8bc314 AT SystematicSw DOT ab DOT ca> | |
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
Organization: | Systematic Software |
Subject: | Re: PTHREAD_PROCESS_SHARED not implemented (was PTHREAD_MUTEX_SHARED |
on Cygwin) | |
Message-ID: | <1011d110-a2a2-1ba0-a73b-bdb3cee23b71@SystematicSw.ab.ca> |
Date: | Sat, 9 Jan 2021 15:54:24 -0700 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 |
Thunderbird/78.6.0 | |
MIME-Version: | 1.0 |
In-Reply-To: | <c53fa5c5-84f9-dc0d-0be5-e7602f8bc314@SystematicSw.ab.ca> |
X-CMAE-Envelope: | MS4xfNNYbfs1x0TgixeIlnY4He556dFTII2Es2dgUo13F/sEo5Vfm/q/Kg2wj3diJQpMoP7+VOb+Co9YYbB/V4quKqIzTr8T+NY/tcScgSbqqJIWfUg9kzSg |
BMbDgiN8IINpuIAMjFva+D8jnsW8Mh2CJj9HpLmBhnjVfY8eKW+DTCZ8mUF7gCc9yRcdMLc5mACUZf1fBlwi8NWCOf+/NgMvxuo= | |
X-Spam-Status: | No, score=-5.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, | |
RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, | |
TXREP autolearn=ham autolearn_force=no version=3.4.2 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
server2.sourceware.org | |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
Reply-To: | cygwin AT cygwin DOT com |
Errors-To: | cygwin-bounces AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 109Mss0D006053 |
On 2021-01-09 15:16, Brian Inglis wrote: > On 2021-01-09 12:58, Brian Inglis wrote: >> On 2021-01-09 11:23, Thomas Koenig via Cygwin wrote: >>> there is a branch of gfortran for implementing coarrays based on a >>> shared memory implementation instead of MPI, the devel_coarray/native >>> branch. >>> >>> I tried it out on Cygwin, but it doesn't work there (hangs on the >>> first sync). >>> >>> The branch uses pthread mutexes and condition variables >>> with PTHREAD_PROCESS_SHARED for synchronization between processes. >>> >>> I also ran the attached test program, which gave the output >>> >>> pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED)failed: No error >>> >>> >>> Is it correct that PTHREAD_PROCESS_SHARED is not supported on >>> Cygwin? Is it supported for condition variables, or is the fact >>> that it is reported as working an oversight? >> >> The function is supported but that parameter is not implemented or tested and >> returns EINVAL: >> >> https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/thread.cc;hb=HEAD#l16 >> >> >> https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/thread.cc;hb=HEAD#l1889 >> >> >>> If PTHREAD_PROCESS_SHARED does not work, are there known workarounds? >> >> If you have the ability and time to work on this, one of the Cygwin >> developers/maintainers may be able to assist. > > It looks like there was nothing on this between implementation circa 2002 and: > > https://sourceware.org/pipermail/cygwin/2019-February/240178.html > > Presumably your goal is to support or disqualify gfortran coarrays: > > https://gcc.gnu.org/pipermail/fortran/2021-January/055542.html > > For more about Windows limitations and alternatives see: > > https://www.boost.org/doc/libs/1_75_0/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.sharedmemory.emulation > > > and the internal page link target: > > https://www.boost.org/doc/libs/1_75_0/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.sharedmemory.windows_shared_memory Bit more discussion where Dave Korn suggests using Sys V IPC semaphores instead: https://cygwin.com/pipermail/cygwin/2006-September/150304.html which I believe requires running the cygserver daemon as a Windows service, using cygrunsrv as a Windows elevated admin process, possibly in a scheduled task at startup or logon. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |