From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106635 invoked by alias); 9 Jan 2018 23:33:32 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 106593 invoked by uid 89); 9 Jan 2018 23:33:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.6 required=5.0 tests=BAYES_00,HTML_MESSAGE,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*c:alternative, images, H*c:HHHHHHHH, H*c:HHHH X-HELO: mail-pg0-f53.google.com Received: from mail-pg0-f53.google.com (HELO mail-pg0-f53.google.com) (74.125.83.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Jan 2018 23:33:28 +0000 Received: by mail-pg0-f53.google.com with SMTP id i196so9181008pgd.0 for ; Tue, 09 Jan 2018 15:33:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version; bh=jyj0ld2bPE46kbfxodriscPI7AXH8fH8DHyOlO7/2uc=; b=CLxRhGICmdY/9IEul0tLInNnOJ0x53kl7VVZ3gF6F6PkAqq63NYz9Db6d0gWypskfM AjVajJU0oCMzuhZeJ5I9XsHMY/ndJrsPM+eegcumq7NS09gew3kr2ZI1alBJzhVanbrS s3Skm7N1av0JOAJ9U4s7YPVYmamTjGr9iGOqgBpasclqY7eVODTky8GJPX39YH4z+kHm ngjK1vPh2heNgi0BvxUM0+aAFZwGU/dgLlbZkFTRxawFzXgbjN/d2dMo21uwYbeZKDYD ruMrI9vVkwCAesHTGfyMKRS07aznTiTyL4aYZ0svr7OGvK6ymmaWtYJfGlZXTUvhjkNJ GzEA== X-Gm-Message-State: AKwxytebIAKy/ondaOHgZUlAZSjbXtaMZSRnLa0Zl6soPWfGcXHPfswb HqzMx9mk9nv8JU+emh2zb3Vxog== X-Google-Smtp-Source: ACJfBovjFUpt1QMwzvLRyHxFz/WLtVgZL69mwhYBj7TnbRrktaNSDV0lopDXChWnM+YrX3lnJm+OwQ== X-Received: by 10.159.246.152 with SMTP id c24mr629109pls.294.1515540807114; Tue, 09 Jan 2018 15:33:27 -0800 (PST) Received: from localhost.mail ([2601:644:500:6039:9ca3:302e:eb3d:87bf]) by smtp.gmail.com with ESMTPSA id r9sm26072575pgp.78.2018.01.09.15.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 15:33:25 -0800 (PST) Date: Tue, 09 Jan 2018 23:33:00 -0000 From: Damian Rouson To: sgk@troutmask.apl.washington.edu Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Message-ID: In-Reply-To: <20180109020322.GA16271@troutmask.apl.washington.edu> References: <20180108025140.GA14526@troutmask.apl.washington.edu> <20180109005801.GA11634@troutmask.apl.washington.edu> <20180109020322.GA16271@troutmask.apl.washington.edu> Subject: Re: [PATCH] Implementation of RANDOM_INIT from F2018 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00077.txt.bz2 Hi Steve, Here are the results of compiling with the OpenCoarrays =E2=80=9Ccaf=E2=80= =9D compiler wrapper, which uses -fcoarray=3Dlib -lcaf_mpi: 1. random_init(repeatable=3D.true., image_distinct=3D.true.) gives repeatab= le sequences that are distinct on each image. 2. random_init(.true., .false.) gives repeatable sequences that are identic= al on all images. 3. random_init(.false.,.true.) gives non-repeatable sequences that are dist= inct on each image. 4. random_init(.false.,.false.) gives non-repeatable sequences that are dis= tinct on each image. The behavior with test 2 differs from the description in the email below. I= hope this is helpful. =C2=A0I can provide the raw output if so desired.=C2= =A0 In case it=E2=80=99s of interest, there=E2=80=99s a script in OpenCoarrays = that checks out the trunk, applies a provided patch to it, and then does a = non-bootstrap build of the patched trunk, MPICH, and OpenCoarrays. =C2=A0Th= ese were my steps: git clone https://github.com/sourceryinstitute/opencoarrays cd opencoarrays ./developer-scripts/patched-trunk-instal.sh random_init.diff source prerequisites/installations/setup.sh caf repeatable-distinct.f90 cafrun -n 4 ./a.out If you decide to try this, please let me know. =C2=A0I can edit the above s= cript to give an option for multithreaded builds to speed things up quite a= bit. Damian On January 8, 2018 at 6:03:26 PM, Steve Kargl (sgk@troutmask.apl.washington= .edu) wrote: On Mon, Jan 08, 2018 at 05:33:01PM -0800, Damian Rouson wrote:=20=20 > I=E2=80=99ll be glad to test with -fcoarray=3Dlib -lcaf_mpi with two cave= ats:=20=20 >=20=20 > 1. My turnaround time will probably usually be 48-72 hours for=20=20 > such tests.=20=20 Turn around time is unimportant to me. I'm simply interested if=20=20 what I have done work or if I need to fix a bug.=20=20 > 2. I don=E2=80=99t monitor this mailing list very closely so I might miss= =20=20 > similar requests unless they are also submitted as issues on the=20=20 > OpenCoarrays GitHub repository.=20=20 That's understandable. There is only so much time in a day.=20=20 > For clarification, are you asking for simple execution of the=20=20 > existing tests or do you suspect that the tests might need=20=20 > modification (or new tests) to exercise the -fcoarray=3Dlib option?=20=20 Hopefully, this clarifies the situation. Suppose, you have a co-array=20=20 program that causes execution of 2 images, say, image0 and image1.=20=20 If the program contains=20=20 call random_init(repeatable=3D.true., image_distinct=3D.true.)=20=20 then image0 and image1 will have distinct PRNG sequences. Now, if you=20=20 re-run the program, then image0 and image1 will have the same distinct=20=20 sequences. If you have=20=20 call =C2=A0random_init(.true., .false.)=C2=A0 image0 and image1 do not need to have distinct PRNG sequences, but=20=20 I set up gfortran to have distinct sequences. If you re-run the=20=20 program image0 and image1 should have the same sequences. Finally,=20=20 if you have=20=20 call random_init(.false.,.true.)=20=20 image0 and image1 will have distinct sequence, and if you re-run the=20=20 program image and image1 will should have different sequence than=20=20 what was seen in the previous and these are distinct.=20=20 There is one final detail, the standard says that calling random_init=20=20 in one image cannot affect the PRNG sequence in another image if=20=20 image_distinct=3D.false.=20=20 --=20=20 Steve=20=20