[Trilinos-Users] libblas

Eligiusz Postek ewpostek at googlemail.com
Sat Apr 29 07:35:34 EDT 2017


Hi James,
it works very well,
cheers, Elek


On Fri, Apr 28, 2017 at 5:43 PM, James Elliott <jjellio3 at ncsu.edu> wrote:

> Hi Elek,
>
> The best way is to require gfortran as a BLAS/LAPACK required library.
>
> To do this, you add gfortran to:
>
> -D TPL_ENABLE_BLAS:BOOL=ON \
> -D BLAS_LIBRARY_DIRS:PATH=" /users/kdm/ewpostek/LAPACK/lib" \
> -D BLAS_LIBRARY_NAMES:STRING="blas;gfortran" \
>
> Above assumes CMake will be able to find gfortran in some standard
> location. If it cannot find gfortran (you will get a configure error),
> then add the proper path to the list:
>
> -D TPL_ENABLE_BLAS:BOOL=ON \
> -D BLAS_LIBRARY_DIRS:PATH="/users/kdm/ewpostek/LAPACK/lib;
> /path/to/directory/with/gfortran"
> \
> -D BLAS_LIBRARY_NAMES:STRING="blas;gfortran" \
>
>
> You could also set the CMake variable CMAKE_EXE_LINKER_FLAGS, which
> will append these options to every executable linked.
> e.g.,
> -DCMAKE_EXE_LINKER_FLAGS="-lgfortran"
>
> or if you need to specify the path:
> -DCMAKE_EXE_LINKER_FLAGS="-L/path/to/directory/with/gfortran -lgfortran"
>
>
> I favor setting this in the BLAS/LAPACK libraries, because it will
> force CMake to make sure that libgfortran is present on the system.
> CMake will also show you the path it finds for this library, which is
> very useful information.
>
> Hope that helps!
>
> James
>
>
> On 4/28/17, Eligiusz Postek <ewpostek at googlemail.com> wrote:
> > Dear Colleagues,
> > I am building the Trilinos,
> > and I get the comments:
> >
> > [  4%] Built target teuchosnumerics
> > Linking CXX executable TeuchosNumerics_BLAS_ROTG_test.exe
> > /users/kdm/ewpostek/LAPACK/lib/libblas.a(xerbla.f.o): In function
> > `xerbla_':
> > xerbla.f:(.text+0x79): undefined reference to `_gfortran_st_write'
> > xerbla.f:(.text+0x90): undefined reference to `_gfortran_string_len_trim'
> >
> > Could you say where to put "-lgfortran" in the script,
> > or whatever else should be there?
> > Could you help with it?
> >
> > best regards, Elek
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170429/13e7f5fc/attachment.html>


More information about the Trilinos-Users mailing list