PTHREAD_PROCESS_SHARED not implemented (was PTHREAD_MUTEX_SHARED on Cygwin)
Sat Jan 9 22:16:04 GMT 2021
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
>> 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:
>> 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:
Presumably your goal is to support or disqualify gfortran coarrays:
For more about Windows limitations and alternatives see:
and the internal page link target:
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.]
More information about the Cygwin