From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12095 invoked by alias); 12 May 2016 17:54:06 -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 12076 invoked by uid 89); 12 May 2016 17:54:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:3791, UD:php X-HELO: mail-oi0-f48.google.com Received: from mail-oi0-f48.google.com (HELO mail-oi0-f48.google.com) (209.85.218.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 12 May 2016 17:53:54 +0000 Received: by mail-oi0-f48.google.com with SMTP id k142so132282212oib.1 for ; Thu, 12 May 2016 10:53:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fT8aBhZykbKWltnV3PoPNE8NJ2ocZK7awhsHKO/0zYU=; b=cr/LQRPgDQa1Mb51y/PVXOi1/BdwADVh9/h6Ld8EoTOEiX/41RmV8TuLrw0dZpjh// rypzfiegeo82BIebWg9c0mHY1BQ1AbMAs6UcuWErAZAMS7JhHgKIUsxebWf3l1ZO3F81 b3BbDMW1twS6GWtmomHgA06wR/DAXU9Ye4hmAEIf8UvQeIFCkmRSBZB2nVS9eyQBdohz HV87bLNAklDXMXyetzpYOJyaoBfQDBi1mgxHv3xWc9F6EETEUVlFcHtOub8z+1LJf2Lh XUOizsOsxP7SU87BPsaIOR98KR6SzXEx2rHjESMD3+yXUjEPR/aXZb2HzqMLIr8Vw7fS X0yg== X-Gm-Message-State: AOPr4FVIQr4+mIszEz9kMgh02xlc8JKSIyTMd8jcQwmQa5493AxcYqbAnWzsbMrFK7l/hQcq4UHksQPGt4Zvcw== X-Received: by 10.157.32.197 with SMTP id x63mr6588963ota.28.1463075632705; Thu, 12 May 2016 10:53:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.43.168 with HTTP; Thu, 12 May 2016 10:53:13 -0700 (PDT) In-Reply-To: References: <8737qn5rd4.fsf@kepler.schwinge.homeip.net> <8760vj45bi.fsf@hertz.schwinge.homeip.net> <2b4f59d5-be38-2814-27bb-73aa7ffb4b8f@codesourcery.com> <878u0o6wwj.fsf@kepler.schwinge.homeip.net> <87inyjuw6b.fsf@kepler.schwinge.homeip.net> From: Vikram Singh Date: Thu, 12 May 2016 17:54:00 -0000 Message-ID: Subject: Re: OpenACC-Library-Interoperability To: Thomas Schwinge Cc: Salvatore Filippone , =?UTF-8?Q?Vladim=C3=ADr_Fuka?= , James Norris , Chung-Lin Tang , fortran@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-05/txt/msg00031.txt.bz2 Hi. How would I go about getting this patched version of gfortran? On Thu, May 12, 2016 at 7:40 PM, Vikram Singh wr= ote: > Well, I have already written code that I had originally wanted to do, > that is, use openacc with cublas. > > And it works perfectly well with PGI compiler. I guess I will have to > check on how I would go about trying to run it using gfortran now that > host_data works using gfortran. > > On Thu, May 12, 2016 at 6:34 PM, Thomas Schwinge > wrote: >> Hi! >> >> On Fri, 15 Apr 2016 13:59:53 +0300, Vikram Singh wrote: >>> I checked libgomp.oacc-c-c++-common/context-*.c, and they seem to be >>> exactly what I needed to start with. >>> >>> If I understand it correctly, I'll anyway be trying to implement >>> something similar with PGI compilers, so I'll have something as a >>> starting point. >> >> Any progress on that already? I had a very quick look myself, but it's >> not as easy as I thought... A "courageous" use of "use cublas" in >> Fortran code compiled with gfortran results in: "Fatal Error: Can't open >> module file 'cublas.mod' for reading". The problem is: Fortran >> interfacing to C libraries (which cuBLAS is). >> >> has some instructions how to do it. Anyone got that to work already? >> >>> But again, it will need the OpenACC host_data construct to be setup >>> for gfortran to test. >> >> In >> , >> Chung-Lin has now posted a patch (pending review) that should make the >> OpenACC host_data construct usable in GCC Fortran. (Problem discussed in >> >> before.) >> >> For reference: >> >>> On Fri, Apr 15, 2016 at 11:57 AM, Thomas Schwinge >>> wrote: >>> > On Fri, 15 Apr 2016 11:35:06 +0300, Vikram Singh wrote: >>> >> Yes, I came to the conclusion that host_data >>> >> would be the only way to do it in fortran. >>> >> >>> >> On the other hand, I though there were no plans to implement it in >>> >> gfortran 6 either >>> > >>> > I still hope we'll get this (that is, ) >>> > fixed in time for the GCC 6.1 release. I'll keep you posted. >>> > >>> > >>> >> > I'm copying Jim, who is the author of this chapter in the document= ation >>> >> > as well as the libgomp/testsuite/libgomp.oacc-c-c++-common/context= -*.c >>> >> > test cases, and much of the relevant libgomp code, too, and who sh= ould >>> >> > please correct me if I'm wrong. I'll make a note for later, that = we >>> >> > should translate the libgomp.oacc-c-c++-common/context-*.c test ca= ses to >>> >> > Fortran, and also replicate them using the OpenACC host_data const= ruct >>> >> > (like in libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-1.c= ), and >>> >> > the same for the documentation you referenced. (Vikram, please te= ll if >>> >> > you're interested to work on these items.) >>> >> >>> >> I am not sure I understand what you want me to work on exactly. I am >>> >> not really much of a C programmer, so I wouldn't be good at it. I >>> >> would still like to help. >>> > >>> > Sorry for being unclear. My idea/question has been whether you're >>> > interested in helping by translating the documentation as well as the >>> > libgomp.oacc-c-c++-common/context-*.c test cases from C to Fortran (u= sing >>> > the OpenACC host_data construct instead of the acc_* functions). If = yes, >>> > then that's great, if not, then one of us will do it at some point. >> >> >> Gr=C3=BC=C3=9Fe >> Thomas