X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9841538708EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1610223887; bh=9+C+2uw1LXzFsmuBXWQz5V4acjO5kD6aZL1xdO/LO74=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=t9LmeBQD6tphvV1A7JwRciACCJlYT5M2CKqgvWeDxhIBOzYtWBHMTWomv7l8BO/Gj 8EF/k734ZbD6uwHyimVNl+DqRax0LY3p4Vv9lLbKBJCc/0tzXhpZHENLg/FfxPwbdg WAf0E2B52/sJkBfBzKDku1RekNHeSzNr+QxjsLDs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 184433861038 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uhoBqlOAybdB4jcWHSlzo5jGkjH1JJ6JHtPRKjwSQ84=; b=VTwAiGcqCcaLsvoPqgiqz119CNXpHvShPKXWmV+QAOJOI8n9PFJRaAmNjeS68cYbV3 zqMz69fih7kflUKA4gLZ++mIoAp8a2Qp/D+3YQw1NltPTJTGH3ojCuzXGrCYysQFcIBk PILCzCKIvavm220jbN++pwF4qWFTIfGSTmAkay1u4XtJBHtA4xPPo0n3syD7M8SNlxYa x5h1G7rtL1hewpZwMUFPzEMHU/CAP+5fOOtR+34vRw7V/7YmKkaAFOAdT4diXnBhrSrV Rw5pNgqkVP/QfCCkKB4po6MiU8WMwvNTpdym2fOJLVm9nNXGhFkUFDr5EP9WD0KMsNHy qQhQ== X-Gm-Message-State: AOAM530H6UV8QV+duT4hKgcI8puaFAb2M3gsxFksFqkcS1cpKsOMS4ul 3ajwWjAfRtejmZWiszb4q5sY5wPZVPYcSw== X-Google-Smtp-Source: ABdhPJxOLpZ5O+5qWyD97Q0orrpl9we4gEfG6K9iyZFIfS4iSlN+I1Ynwa77x5qupx8w+2tZSs6R5Q== X-Received: by 2002:a17:906:9452:: with SMTP id z18mr6416522ejx.389.1610223884257; Sat, 09 Jan 2021 12:24:44 -0800 (PST) Subject: Re: PTHREAD_MUTEX_SHARED on Cygwin To: cygwin AT cygwin DOT com References: <657c8576-2715-8c80-a59a-23453306230f AT netcologne DOT de> Message-ID: <082bd13d-da7d-6fa0-1b0d-f9c721424615@gmail.com> Date: Sat, 9 Jan 2021 21:24:42 +0100 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: <657c8576-2715-8c80-a59a-23453306230f@netcologne.de> Content-Language: it X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, 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: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Marco Atzeri via Cygwin Reply-To: Marco Atzeri Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 109KPBdn017808 On 09.01.2021 19:23, Thomas Koenig via Cygwin wrote: > > Hi, > > 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? > > If PTHREAD_PROCESS_SHARED does not work, are there known workarounds? > > Best regards > >     Thomas > some time ago I worked on a similar shared memory issue on Fortran https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030 but I was never able to fully follow-up and it seems my patch was incomplete, and caused https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89079 so it is possible that this issue is also impacting your problem. Regards Marco -- 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