[Flang-dev] gnu extensions/ workarounds in flang

blubee blubeeme gurenchan at gmail.com
Thu Oct 18 03:36:42 EDT 2018


I cannot see how that will work, trying tp change this code

end function besselj_pp

double complex function besselh_p(n,xi,x)
  implicit none
  integer :: n
  double precision :: x,xi
  double complex, external :: besselh

  besselh_p = xi/2.d0*(besselh(n-1,2,x)-besselh(n+1,2,x))

end function besselh_p

I've been reading the PGI manual:
https://www.pgroup.com/resources/docs/18.1/x86/cuda-fortran-prog-guide/index.htm

But I'm just not seeing what's wrong. Replacing complex with CMPLX; then
those come with their own errors. Could it be compiler flags that will get
this to build?

Best

On Tue, Oct 16, 2018 at 1:16 PM Stephen Scalpone <sscalpone at nvidia.com>
wrote:

> Check out CMPLX.
>
>
>
> *From: *blubee blubeeme <gurenchan at gmail.com>
> *Date: *Monday, October 15, 2018 at 9:41 PM
> *To: *Stephen Scalpone <sscalpone at nvidia.com>
> *Cc: *"flang-dev at lists.flang-compiler.org" <
> flang-dev at lists.flang-compiler.org>
> *Subject: *Re: [Flang-dev] gnu extensions/ workarounds in flang
>
>
>
> This helped me get rid of 3 of the 4 errors:
>
> find . -name "*.f90" -exec sed -i -e 's|besjn|BESSEL_JN|g;
> s|besyn|BESSEL_YN|g' {} \;
>
>
>
> Now there's only one left:
>
> flang -c -g   besselh.f90
>
> F90-S-0038-Symbol, complex, has not been explicitly declared (besselh.f90)
>
>   0 inform,   0 warnings,   1 severes, 0 fatal for besselh
>
> gmake: *** [Makefile:37: besselh.o] Error 1
>
> gmake: *** [Makefile:37: besselh.o] Error 1
>
>
>
> Here's the source on gitlab:
> https://gitlab.onelab.info/getdp/getdp/blob/master/contrib/pewe/fortran/besselh.f90
>
>
>
> or
>
>
>
> pastebin: https://pastebin.com/kEZbwfvd
>
>
>
> Can anyone assist me with this last error?
>
>
>
> On Mon, Oct 15, 2018 at 10:16 PM Stephen Scalpone <sscalpone at nvidia.com>
> wrote:
>
> The Bessel functions are defined with different names in Fortran 2008.
>
>
>
> > BESSEL_JN(N, X) computes the Bessel function of the first kind of order
> *N* of *X*. This function is available under the name BESJN as a GNU
> extension.
>
>
>
> Etc.
>
>
>
> You can modernize pewe or update the compiler to recognize these gnu 95
> extensions.
>
>
>
>
>
> *From: *flang-dev <flang-dev-bounces at lists.flang-compiler.org> on behalf
> of blubee blubeeme <gurenchan at gmail.com>
> *Date: *Monday, October 15, 2018 at 6:10 AM
> *To: *"flang-dev at lists.flang-compiler.org" <
> flang-dev at lists.flang-compiler.org>
> *Subject: *[Flang-dev] gnu extensions/ workarounds in flang
>
>
>
> I am trying to link a build gmsh with flang and there's a pluging pewe:
> https://gitlab.onelab.info/getdp/getdp/blob/df0f31cb3cbb57b9797e267de1f136a18fd965c9/contrib/pewe/fortran/Makefile
>
>
>
> I am getting these errors below
>
> -------------------
>
>
>
> F90-S-0038-Symbol, complex, has not been explicitly declared (besselh.f90)
>
> F90-S-0038-Symbol, besjn, has not been explicitly declared (besselh.f90)
>
> F90-S-0038-Symbol, besyn, has not been explicitly declared (besselh.f90)
>
>   0 inform,   0 warnings,   3 severes, 0 fatal for besselh
>
> F90-S-0038-Symbol, besjn, has not been explicitly declared (besselh.f90)
>
>   0 inform,   0 warnings,   1 severes, 0 fatal for besselj_p
>
> F90-S-0038-Symbol, besjn, has not been explicitly declared (besselh.f90)
>
>   0 inform,   0 warnings,   1 severes, 0 fatal for besselj_pp
>
>
>
> a quick google search show's that they are a part of the GNU fortran:
> https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gfortran/BESJN.html
>
>
>
>
>
> is it possible to implement these features w/o relying on the GNU
> toolchain?
>
>
>
> Best
> ------------------------------
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message.
> ------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20181018/86fff6b7/attachment.html>


More information about the flang-dev mailing list