Results 1 to 3 of 3

Thread: error linking with libHYPRE

  1. #1

    Default error linking with libHYPRE

    Hi All

    When trying to link using libHYPRE, I get the following "undefined reference" errors

    mpic++ ff.c -lHYPRE -lmpi_cxx -lsuperlu -lopenblas
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/mpi/gcc/openmpi/lib64/libHYPRE.so: undefined reference to `hypre_blas_xerbla'
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/mpi/gcc/openmpi/lib64/libHYPRE.so: undefined reference to `hypre_blas_lsame'
    collect2: error: ld returned 1 exit status

    , where ff.c is a simple dummy file with just main().

    Those reference seems to be something that should have been defined internally.

    The same error occur if using serial version libHYPRE.

    Eventually I'm trying to build elmerfem.

    Any help is appriciated.

    Torben

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,483
    Blog Entries
    15

    Default Re: error linking with libHYPRE

    On Tue 19 Feb 2019 01:53:58 PM CST, torhans wrote:

    Hi All

    When trying to link using libHYPRE, I get the following "undefined
    reference" errors

    mpic++ ff.c -lHYPRE -lmpi_cxx -lsuperlu -lopenblas
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
    /usr/lib64/mpi/gcc/openmpi/lib64/libHYPRE.so: undefined reference to
    `hypre_blas_xerbla'
    /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
    /usr/lib64/mpi/gcc/openmpi/lib64/libHYPRE.so: undefined reference to
    `hypre_blas_lsame'
    collect2: error: ld returned 1 exit status

    , where ff.c is a simple dummy file with just main().

    Those reference seems to be something that should have been defined
    internally.

    The same error occur if using serial version libHYPRE.

    Eventually I'm trying to build elmerfem.

    Any help is appriciated.

    Torben


    Hi
    Sometimes the order makes a difference, try add -lHYPRE at the end.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.28-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3

    Default Re: error linking with libHYPRE

    Thanks

    However it is a bug. I have reported it and given a quick fix here https://bugzilla.opensuse.org/show_bug.cgi?id=1126367

    Torben

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •