From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27895 invoked by alias); 8 Apr 2018 18:56:07 -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 27873 invoked by uid 89); 8 Apr 2018 18:56:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=2008, employed, H*p:D*org, HCc:U*gcc X-HELO: mail-pf0-f169.google.com Received: from mail-pf0-f169.google.com (HELO mail-pf0-f169.google.com) (209.85.192.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Apr 2018 18:56:04 +0000 Received: by mail-pf0-f169.google.com with SMTP id p15so4399938pff.11 for ; Sun, 08 Apr 2018 11:56:04 -0700 (PDT) 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:content-transfer-encoding :content-disposition; bh=CBFusVfSeXAhi/10sPye2M5LNqNG0QHI7w1LhFkjqzg=; b=cNTBIG5+4ro7N4X8d65bvad4dAuhaFNgyBxY6qt/MuoxhT6qNTTEheiaEc8Ek96icO wIyebpZiLvTeZDUG7PF/UrDhDi7J5pNFyG3PP1Vy5044JmicsaGSb2QDZWlOYvYsABhD dfud9ZIln3BAzrZjoycoDWc+VjUtOqUQiEVgll89+25J0jI7Vu0Zl85V5M5WKf22Z+5i R2L2S9vRyIcntKNpnQRO5n5ZV1MBY7cQdwH6x3R3Cjw4Fh9iKoGZdS5A9wChhC+5F+Aw boM1qtm5dGGCwbC8BZUE3ut5foyhefob+nRASnMl0cnRUDFoE3Utpfn/wbRgLbhK0OtW mYAQ== X-Gm-Message-State: AElRT7ETCgcQZYN9a91yAb6VruIFCTdAEXv3fWktPxePzLEkmyLiu0xn L3xwBbRkLB80gblWUVEzLYW6pQ== X-Google-Smtp-Source: AIpwx4+2MXxyHco9yNvYyJfhiW/03YMn7s/p/PrJx/sXNQWAD+Sqjvk8gmtgTLD96yPzrxXRqO4tzg== X-Received: by 10.98.31.86 with SMTP id f83mr27029935pff.196.1523213763180; Sun, 08 Apr 2018 11:56:03 -0700 (PDT) Received: from localhost.mail ([2601:644:500:6039:55f5:eb1:3597:2793]) by smtp.gmail.com with ESMTPSA id y3sm23500268pgc.81.2018.04.08.11.56.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Apr 2018 11:56:01 -0700 (PDT) Date: Sun, 08 Apr 2018 18:56:00 -0000 From: Damian Rouson To: Richard Biener Cc: Daniel Celis Garza , Jerry DeLisle , gfortran , =?utf-8?Q?Filippone=2C_Salvatore?= , GCC Development Message-ID: In-Reply-To: References: Subject: Re: Patching the GCC build system to build MPICH and OpenCoarrays MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00029.txt.bz2 On April 4, 2018 at 1:12:25 AM, Richard Biener (richard.guenther@gmail.com(= mailto:richard.guenther@gmail.com)) wrote: =C2=A0 > In that case user programs compiled with -fcoarray=3Dlib are but gfortran > or libgfortran itself is not linked against OpenCoarrays? Yes. =C2=A0OpenCoarrays produces the parallel runtime library libcaf_mpi us= ing MPI. > So if we consider OpenCoarrays part of the gfortran runtime then > it makes sense to build it in-tree=E2=80=A6 Yes. =C2=A0Many gfortran users and developers who will be glad to see this = both because it enables the Fortran 2008/2018 parallel features and because= it facilitates building related tests. > ... but building an mpi library in-tree might not? OpenCoarrays requires an underlying parallel programming model. =C2=A0MPI i= s the default model because it provides the broadest coverage of the requir= ed features. =C2=A0OpenCoarrays also offers alternatives to MPI, but those = are experimental and support a more restricted subset of Fortran 2008/2018. > I'm still lacking an idea of what it takes to enable coarrays with gfortr= an We will mimic the OpenCoarrays build system, which installs=C2=A0=E2=80=9Cc= af" and =E2=80=9Ccafrun" scripts analogous to MPI's "mpifort" and =E2=80=9C= mpirun,=E2=80=9D respectively. =C2=A0These are used to compile and launch p= arallel programs:=C2=A0 $ cat hello.f90 print *,=E2=80=9DHello from image =E2=80=9C,this_image(),=E2=80=9D of =E2= =80=9C,num_images() end $ caf hello.f90 $ cafrun -n 4 ./a.out =C2=A0 Hello from image 2 of 4 =C2=A0 Hello from image 1 of 4 =C2=A0 Hello from image 4 of 4 =C2=A0 Hello from image 3 of 4 > since install.texi doesn't talk about this at all, neither in the prerequ= esites > section nor in a fortran/coarray specific section. If there are guidelines for modifying install.texi and invoke.texi, please = send a link. =C2=A0It appears install.texi is written in raw TeX. =C2=A0I u= se LaTeX regularly but haven=E2=80=99t touched TeX in decades. I=E2=80=99ll= give it a shot. =C2=A0I also don=E2=80=99t understand how those files are = used > In fact the only thing I find is in invoke.texi which says >=20=20 > @item -fcoarray=3D@var{} > @opindex @code{fcoarray} > ... > @item @samp{lib} > Library-based coarray parallelization; a suitable GNU Fortran coarray > library needs to be linked. > @end table >=20=20 > which suggests linking to the coarray library doesn't happen automatically > but the user is supposed to link a suitable library? caf invokes gfortran and links against libcaf_mpi and the MPI libraries. = =C2=A0The OpenCoarrays build system customizes caf to ensure a consistent t= ool chain (e.g., ensuring the employed MPI was built by the employed compil= er). This allows for reusing one gfortran installation with multiple parall= el programming models. > I'd love to "enable" coarray support for openSUSE but as said I have a ha= rd > time assessing what I'd need to do here. Until we figure out how to get the GCC build system to build MPICH and Open= Coarrays, enabling coarray support requires downloading and building MPICH = and OpenCoarrays separately. =C2=A0Please see the instructions for GCC deve= lopers: https://github.com/sourceryinstitute/opencoarrays/blob/master/INSTA= LL.=C2=A0 Thanks for your feedback. =C2=A0I=E2=80=99m hopeful that your advice will b= e helpful for Daniel in figuring out how to modify the GCC build system.=C2= =A0 Damian