Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • New: __gfortran_random_r10 not found

    11 answers - 361 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    The programme
    program rand10
    real*10 x
    call random_number (x)
    end program rand10
    fails during linking with
    $ ~/gcc/bin/gfortran -o rand10 rand10.f90
    /usr/bin/ld: Undefined symbols:
    __gfortran_random_r10
    collect2: ld returned 1 exit status
    $ ~/gcc/bin/gfortran
    GNU Fortran 95 (GCC) 4.2.0 20060624 (experimental)
  • No.1 | | 452 bytes | |

    --

    fxcoudert at gcc dot gnu dot org changed:

    What |Removed |Added

    CC| |fxcoudert at gcc dot gnu dot
    | |org
    Status|UNCNFIRMED |NEW
    Component|fortran |libfortran
    Ever Confirmed|0 |1
    GCC build triplet|i386-apple-darwin8.7.1 |
    GCC host triplet|i386-apple-darwin8.7.1 |
    GCC target triplet|i386-apple-darwin8.7.1 |
    Last reconfirmed|0000-00-00 00:00:00 |2006-07-22 20:23:23
    date| |

  • No.2 | | 159 bytes | |

    Comment #1 from tkoenig at gcc dot gnu dot org 2006-07-23 17:14
    I'll take a look at this.
    See and
    follow-ups for the discussion of this bug.
  • No.3 | | 1057 bytes | |

    Comment #2 from tkoenig at gcc dot gnu dot org 2006-07-23 17:23
    While I work on this, I might as well tackle some other issues.

    Before I start work, some timings with a vanilla tree as of today.
    The timing isn't terrible (within a factor of two with Intel 8.1),
    but of course, I don't know Intel's quality of RNG.

    $ cat random-single.f90
    program main
    real, dimension(10**7) :: a
    call random_number(a)
    end program main
    $ gfortran random-single.f90
    $ ./a.out && time ./a.out

    real 0m0.765s
    user 0m0.730s
    sys 0m0.036s
    $ ifort random-single.f90
    $ ./a.out && time ./a.out

    real 0m0.362s
    user 0m0.313s
    sys 0m0.049s

    $ cat random-double.f90
    program main
    real(kind=8), dimension(10**7) :: a
    call random_number(a)
    end program main
    $ gfortran random-double.f90
    $ ./a.out && time ./a.out

    real 0m0.886s
    user 0m0.804s
    sys 0m0.077s
    $ ifort random-double.f90
    $ ./a.out && time ./a.out

    real 0m0.402s
    user 0m0.328s
    sys 0m0.074s
  • No.4 | | 484 bytes | |

    Comment #3 from tkoenig at gcc dot gnu dot org 2006-07-23 21:14
    Created an attachment (id=11926)
    ()
    patch

    This implements random for KIND=10 and KIND=16 REALs. It
    is regression-tested on i686-pc-linux-gnu, but not on a system
    with KIND=16 REALs.

    It also speeds up the random numbers for the real case:

    $ gfortran random-single.f90
    $ ./a.out && time ./a.out

    real 0m0.300s
    user 0m0.266s
    sys 0m0.034s

    (same program as before).
  • No.5 | | 336 bytes | |

    Comment #4 from kargl at gcc dot gnu dot org 2006-07-23 23:32
    Thomas,

    Don't you need a HAVE_GFC_REAL_16 section or is random_r10 used
    for random_r16?

    Also, I noticed that you've eliminated the normalize_* calls.
    I think may actually be able to remove these functions and
    the file that contains them.
  • No.6 | | 673 bytes | |

    Comment #5 from tkoenig at gcc dot gnu dot org 2006-07-24 20:12
    (In reply to comment #4)

    Don't you need a HAVE_GFC_REAL_16 section or is random_r10 used
    for random_r16?

    , I uploaded the wrong patch. Sorry 'bout that.

    However, I still need to think a bit about what constant to multiply
    with. What I currently have could also return 1.

    Also, I noticed that you've eliminated the normalize_* calls.
    I think may actually be able to remove these functions and
    the file that contains them.

    Correct. I would also have to remove the call to normalize_* from
    rand.c.

    Looks like a bit more work to be done.
  • No.7 | | 241 bytes | |

    Comment #6 from tkoenig at gcc dot gnu dot org 2006-07-24 20:23
    Created an attachment (id=11929)
    ()
    current status of patch
    This is the current status of the patch. As I wrote,
    this isn't yet complete.
    Thomas
  • No.8 | | 338 bytes | |

    Comment #7 from tkoenig at gcc dot gnu dot org 2006-07-26 19:49
    Created an attachment (id=11951)
    ()
    Current status of patch

    Here's the current patch. It regtests fine, and
    seems to do the Right Thing.

    I haven't been able to test it on a system with REAL(16), nor on
    an S/360 where FLT_RADIX == 16.
  • No.9 | | 457 bytes | |

    Comment #8 from tkoenig at gcc dot gnu dot org 2006-08-01 17:30
    Subject: Bug 28452

    Author: tkoenig
    Date: Tue Aug 1 17:29:50 2006
    New Revision: 115859

    URL:
    Log:
    2006-08-01 Thomas Koenig <Thomas.Koenig (AT) online (DOT) de>

    PR libfortran/28452
    * libgfortran/ChangeLog: Correct PR number.
    * gcc/testsuite/ChangeLog: Likewise.

    Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
  • No.10 | | 1701 bytes | |

    Comment #9 from tkoenig at gcc dot gnu dot org 2006-08-26 19:17
    Subject: Bug 28452

    Author: tkoenig
    Date: Sat Aug 26 19:17:35 2006
    New Revision: 116476

    URL:
    Log:
    2006-08-26 Thomas Koenig <Thomas.Koenig (AT) online (DOT) de>

    PR libfortran/28542
    * Makefile.am: Remove normalize.c.
    * aclocal.m4: Regenerate.
    * Makefile.in: Regenerate.
    * libgfortran.h: #include <float.h>.
    Define GFC_REALDIGITS and GFC_REALRADIX.
    Remove prototypes for normalize_r4_i4 and normalize_r8_i8.
    * intrinsics/random.c (top level): Add prototypes for
    random_r10, arandom_r10, random_r16 and arandom_r16.
    (rnumber_4): New static function.
    (rnumber_8): New static function.
    (rnumber_10): New static function.
    (rnumber_16): New static function.
    (top level): Set to kiss_size to 12 if we have
    REAL(KIND=16), to 8 otherwise.
    Define KISS_DEFAULT_SEED_1, KISS_DEFAULT_SEED_2 and
    KISS_DEFAULT_SEED_3.
    (kiss_random_kernel): Take argument to differentiate
    between different random number generators.
    (random_r4): Add argument to call to kiss_random_kernel,
    use rnumber
    (random_r8): Likewise.
    (random_r10): New function.
    (random_r16): New function.
    (arandom_r4): Add argument to call to kiss_random_kernel,
    use_rnumber
    (arandom_r8): Likewise.
    (arandom_r10): New function.
    (arandom_r16): New function.
    * intrinsics/rand.c (rand): Use shift and mask.
    * runtime/normalize.c: Remove.

    2006-08-28 Thomas Koenig <Thomas.Koenig (AT) online (DOT) de>

    PR libfortran/28452
    * gfortran.dg/random_3.f90: New test.

    Added:

    Removed:

    Modified:
  • No.11 | | 106 bytes | |

    Comment #10 from tkoenig at gcc dot gnu dot org 2006-08-26 19:18
    Fixed on 4.1 as well.
    Closing.

Re: New: __gfortran_random_r10 not found


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Development"

EMSDN.COM