From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61636 invoked by alias); 4 Apr 2018 13:09:37 -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 61625 invoked by uid 89); 4 Apr 2018 13:09:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=respond, phone, HContent-Transfer-Encoding:8bit X-HELO: moene.org Received: from moene.org (HELO moene.org) (80.101.130.238) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Apr 2018 13:09:30 +0000 Received: from [::1] (helo=moene.org) by moene.org with esmtp (Exim 4.90_1) (envelope-from ) id 1f3iAK-0000wP-Mn for fortran@gcc.gnu.org; Wed, 04 Apr 2018 15:09:28 +0200 Subject: Re: Patching the GCC build system to build MPICH and OpenCoarrays To: fortran@gcc.gnu.org References: From: Toon Moene Message-ID: <1fbf07b7-d7bf-4418-6a04-939b55c09c7b@moene.org> Date: Wed, 04 Apr 2018 13:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00015.txt.bz2 On 04/04/2018 08:24 AM, Damian Rouson wrote: > On April 3, 2018 at 1:36:37 AM, Richard Biener (richard.guenther@gmail.com) wrote: > > You probably only want a new target_module for the MPI library. Note > it's name has to match that of the directory containing the sources > which > as far as I see is 'mpich', not 'libmpi'. > Thanks!  I’ll ask Daniel to respond if he has further questions. > > May I ask again why mpi/opencoarrays should be built together with > gfortran rather than separately? Does gfortran or any of its current > target libraries > link against them? > Yes, gfortran links to OpenCoarrays via the -fcoarray=lib argument. OpenCoarrays provides the only parallel implementations of gfortran’s Coarray ABI (http://bit.ly/Coarray-ABI). Any Fortran program that uses the large set of parallel features in Fortran 2008 and Fortran 2018 must have OpenCoarrays installed in order for the code to execute in parallel. > > We have found MPICH to be the most robust option and it has the only released support for some of the more advanced requirements such as the Fortran 2018 fault-tolerance features.  However, there will be configure options for using MPI implementations other than MPICH. My experience using various MPI implementations is: use the variant that is itself compiled with the compiler *you* are using to compile your code. The foremost obstacle to prevent other combinations is .mod files, but also having libraries compiled with different compilers than the one your "MAIN" program is compiled with (plus *its* libraries) will result in a bewildering spree of "unsatisfied external references", because only *one* Fortran compiler will do the link - and include *its* run time libraries, not knowing anything about the other compiler's run time libraries. So "one compiler to compile them all". :-) -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news