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

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!

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