[Flang-dev] fastmath GH_TARGET [ __fmth_i_dmod __fmth_i_amod ]

blubee blubeeme gurenchan at gmail.com
Sun Sep 2 12:57:31 EDT 2018


On Mon, Sep 3, 2018 at 12:19 AM Stephen Scalpone <sscalpone at nvidia.com>
wrote:

> Others have hit this.
>
>
>
> https://github.com/flang-compiler/flang/issues/491
>
>
>
> *From: *flang-dev <flang-dev-bounces at lists.flang-compiler.org> on behalf
> of blubee blubeeme <gurenchan at gmail.com>
> *Date: *Sunday, September 2, 2018 at 5:43 AM
> *To: *"flang-dev at lists.flang-compiler.org" <
> flang-dev at lists.flang-compiler.org>
> *Subject: *[Flang-dev] fastmath GH_TARGET [ __fmth_i_dmod __fmth_i_amod ]
>
>
>
> I am running this Fortran test suite:
> https://www.itl.nist.gov/div897/ctg/fortran_form.htm
>
>
>
> Most of the tests that actually build do pass so that's great news. I am
> running into a few issues though.
>
>
>
> I am getting undefined symbols for:
>
> __fmth_i_amod and __fmth_i_dmod
>
>
>
> I use this script to setenv before running the flang command
>
> -------------------------------------
>
> FLANG_LFS="-L/usr/local/bluflang/lib -lflang -lflangmain -lflangrti
> -lomptarget -lompstub -lomp -lpgmath -lgomp -liomp5 -lexecinfo -lmp"
>
> FLANG_RELAXED="-frelaxed-math"
>
>
>
> exec /usr/local/bluflang/bin/flang $FLANG_RPATH $FLANG_RELAXED $FLANG_LFS
> $FLANG_CFS $@
>
> -------------------------------------
>
>
>
> Am I missing something? The only thing that I notice is looking at the
> source code and I is #ifdef GH_TARGET; I am not sure if I need to define
> that somewhere or what's the problem?
>
>
>
> /usr/bin/ld: error: undefined symbol: __fmth_i_amod
>
> >>> referenced by FM097.FOR:334
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM097.FOR:334)
>
> >>>               /tmp/FM097-5931d1.o:(MAIN_)
>
>
>
> /usr/bin/ld: error: undefined symbol: __fmth_i_amod
>
> >>> referenced by FM097.FOR:356
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM097.FOR:356)
>
> >>>               /tmp/FM097-5931d1.o:(MAIN_)
>
> clang-6.0: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
>
>
>
>
> /usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>
> >>> referenced by FM833.FOR:201
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM833.FOR:201)
>
> >>>               /tmp/FM833-bf1392.o:(MAIN_)
>
>
>
> /usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>
> >>> referenced by FM833.FOR:201
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM833.FOR:201)
>
> >>>               /tmp/FM833-bf1392.o:(MAIN_)
>
> clang-6.0: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> /usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>
> >>> referenced by FM834.FOR:167
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM834.FOR:167)
>
> >>>               /tmp/FM834-f74910.o:(MAIN_)
>
> clang-6.0: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> F90-S-0070-Incorrect sequence of statements
> (/home/blubee/Downloads/test/fcvs21_tar_Z/FM517.FOR: 3)
>
>   0 inform,   0 warnings,   1 severes, 0 fatal for fm517
>
>
> ------------------------------
> 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.
>

I think I might have found a hint, looking at how my libpgmath was being
compiled it was the generic version.

I went through patching things up and generating the proper headers but now
I in a bit of uncharted waters with errors like these:
libpgmath/lib/common/sincosf.c:19:2: error: Single precision - generic
sincos() will not work on
      X86-64 systems.

I see where where the error is coming from but I have to figure out how to
properly implement those features and sort through bugs like these:
flang/runtime/libpgmath/lib/amd64/alog.c:62:14: error: use of undeclared
identifier 'SING'

I'll I think once libpgmath is built with native functions instead of
generic ones, those issues should go away; I hope.

Best,
Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20180903/c1c8b89b/attachment-0001.html>


More information about the flang-dev mailing list