From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78917 invoked by alias); 23 Sep 2018 20:19:33 -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 78904 invoked by uid 89); 23 Sep 2018 20:19:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=thereof, lives, H*f:sk:F61171E, Install X-HELO: mail-ot1-f53.google.com Received: from mail-ot1-f53.google.com (HELO mail-ot1-f53.google.com) (209.85.210.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Sep 2018 20:19:31 +0000 Received: by mail-ot1-f53.google.com with SMTP id o13-v6so17959872otl.4 for ; Sun, 23 Sep 2018 13:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B6u3gYASHFPDc5cAnkVDES8/yjEpD0IodPrS8Vx+t14=; b=bU4vJAjGuET0pTdIqHRzMOMAyCbRORAZMdepPwv4Zc8S5Rsg/6D0og3D9hWx3SbC3E 7o+/Ghh0T7WEwE10AV2E8DwwqEoeUKbBY94j613a3qdXaEGVhH6iZk44L0p+q8E6Devu cM8z01tNVqEWBTBMwywr7wKcGcEr03MVp9hYwR+MF76pMti8TBD4WTwjZFCq01gPU74A yq+M48H82DbUVrTjA8ZttluNe2MtH3iWCtaB9L3pAufPsRymMGrVF3TjR9oCpQhvUx6X XUd+9XUAnxgdiRJbIV1ywruGHtIv/1C9qXPJoMx5uwa27WFfcqncXxS9Gh5qi/VFyBIL Fivg== MIME-Version: 1.0 References: <024e798b9539b765a1259cfc9cb2f1dc480b24ca.1536144068.git.ams@codesourcery.com> <7f5064c3-afc6-b7b5-cade-f03af5b86331@moene.org> <9290b55e-b12a-838a-5943-0c72d040dc3f@codesourcery.com> <7bef0368-f709-642b-3bb4-14cb07aaba25@netcologne.de> <594e5471-3e22-40ae-0be4-952b2c246e3a@charter.net> <1cf5773a-0ec7-dc22-0dbe-9075590fd9a9@moene.org> In-Reply-To: <1cf5773a-0ec7-dc22-0dbe-9075590fd9a9@moene.org> From: Bernhard Reutner-Fischer Date: Sun, 23 Sep 2018 20:19:00 -0000 Message-ID: Subject: Re: OpenCoarrays integration with gfortran To: Toon Moene Cc: Jerry DeLisle , Damian Rouson , Thomas Koenig , ams@codesourcery.com, Janne Blomqvist , gfortran Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00182.txt.bz2 On Sun, 23 Sep 2018 at 21:17, Toon Moene wrote: > > [ dropping mailing list gcc-patches, as it is not relevant to *this* > discussion :-) ] yea, sorry for that. > > On 09/23/2018 06:47 PM, Bernhard Reutner-Fischer wrote: > > > On 23 September 2018 11:46:57 CEST, Toon Moene wrote: > > >> and recompiled my stuff: > >> > >> gfortran -g -fbacktrace -fcoarray=lib random-weather.f90 > >> -L/usr/lib/x86_64-linux-gnu/open-coarrays/openmpi/lib -lcaf_mpi > >> > >> [ Yes, the location of the libs is quite experimental, but OK for the > >> "Testing" variant of Debian ... ] > > > > Are you sure you need the -L? > > For me a simple -fcoarray=lib -lcaf_mpi > > links fine. > > I get this: > > toon@moene:~/src$ gfortran -g -fbacktrace -fcoarray=lib > random-weather.f90 -lcaf_mpi > /usr/bin/ld: cannot find -lcaf_mpi > collect2: error: ld returned 1 exit status > > Are you sure the linker isn't finding another libcaf_mpi.so ? Yes, i'm certain it finds the right libcaf_mpi and openmpi, but then you're on testing and i'm on sid, maybe that's a difference. For reference (my compiler built from trunk lives in /opt/$(uname -m)/gcc-9.0.mine): $ cat ~/tmp/hello.f08;echo EOF implicit none character(len=64) :: str, hi[*] integer :: i, nprocs nprocs = num_images() do i=1, nprocs !write(hi[this_image()], '(i0,a,i0,": ",a)') this_image(), '/', nprocs, 'hello world' ! :) but data-ref :( write(str, '(i0,a,i0,": ",a)') this_image(), '/', nprocs, 'hello world' ! :( hi[this_image()] = str end do sync all write(*,*) hi[this_image()] end EOF $ gfortran -o hi -fcoarray=lib -lcaf_mpi ~/tmp/hello.f08 && mpirun -np 3 ./hi 1/3: hello world 2/3: hello world 3/3: hello world $ ldd ./hi linux-vdso.so.1 (0x00007ffd03986000) libcaf_mpi.so.3 => /usr/lib/x86_64-linux-gnu/libcaf_mpi.so.3 (0x00007fe9e6a72000) libgfortran.so.5 => /opt/x86_64/gcc-9.0.mine/lib64/libgfortran.so.5 (0x00007fe9e677a000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe9e65e6000) libgcc_s.so.1 => /opt/x86_64/gcc-9.0.mine/lib64/libgcc_s.so.1 (0x00007fe9e65c2000) libquadmath.so.0 => /opt/x86_64/gcc-9.0.mine/lib64/libquadmath.so.0 (0x00007fe9e6576000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe9e63b9000) libmpi.so.40 => /usr/lib/x86_64-linux-gnu/libmpi.so.40 (0x00007fe9e62af000) libmpi_usempif08.so.40 => /usr/lib/x86_64-linux-gnu/libmpi_usempif08.so.40 (0x00007fe9e6278000) libmpi_usempi_ignore_tkr.so.40 => /usr/lib/x86_64-linux-gnu/libmpi_usempi_ignore_tkr.so.40 (0x00007fe9e626c000) libmpi_mpifh.so.40 => /usr/lib/x86_64-linux-gnu/libmpi_mpifh.so.40 (0x00007fe9e620f000) /lib64/ld-linux-x86-64.so.2 (0x00007fe9e6acb000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe9e620a000) libopen-rte.so.40 => /usr/lib/x86_64-linux-gnu/libopen-rte.so.40 (0x00007fe9e6150000) libopen-pal.so.40 => /usr/lib/x86_64-linux-gnu/libopen-pal.so.40 (0x00007fe9e60a3000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe9e6099000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fe9e6094000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe9e5e76000) libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007fe9e5e35000) libevent-2.1.so.6 => /usr/lib/x86_64-linux-gnu/libevent-2.1.so.6 (0x00007fe9e5bdd000) libevent_pthreads-2.1.so.6 => /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.6 (0x00007fe9e59da000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe9e59b9000) libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007fe9e59ab000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fe9e59a0000) $ dpkg -S /usr/lib/x86_64-linux-gnu/libcaf_mpi.so.3 libcaf-mpi3:amd64: /usr/lib/x86_64-linux-gnu/libcaf_mpi.so.3 $ dpkg -l libcaf-mpi3 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================-===============-===============-=============================================== ii libcaf-mpi3:amd64 2.2.0-1 amd64 Co-Array Fortran libraries for gfortran I'd check if you really got the debian files so you don't run afoul a manual install or leftovers thereof. If it's really unpleasant in testing, it will at least ripple down from sid sometimes and hence should work without hazzle soonish :) HTH and cheers, Bernhard