[Users] Calling BLAS from Fortran

Erik Schnetter schnetter at cct.lsu.edu
Mon Nov 14 12:41:04 CST 2016


Ian

It's likely that Cactus does not contain a generic type-safe wrapper for
syev. In this case, you need to call the original Lapack routine directly,
e.g. dsyev if you are using double precision. (You need to add one
character depending on the type, either s, d, c, or z.)

-erik


On Mon, Nov 14, 2016 at 10:21 AM, Ian Hinder <ian.hinder at aei.mpg.de> wrote:

> Hi,
>
> What is the correct way to call a BLAS routine from a Fortran Cactus
> thorn? I am trying to compile the LlamaWaveToy, and it does this:
>
> subroutine LWT_min_spacing (CCTK_ARGUMENTS)
>   use lapack
> ...
>            call syev ('N', 'U', 3, gg, 3, ev, work, lwork, info)
>
> and at link time, I get
>
> /home/ianhin/Cactus/EinsteinToolkitGit/configs/etllama/lib/libthorn_
> LlamaWaveToy.a(min_spacing.F90.o): In function `lwt_min_spacing':
> /home/ianhin/Cactus/EinsteinToolkitGit/arrangements/Llama/
> LlamaWaveToy/src/min_spacing.F90:38: undefined reference to `syev_'
>
> Do I need to do something special to make the symbol found, or to convert
> Fortran to C names, etc?
>
> --
> Ian Hinder
> http://members.aei.mpg.de/ianhin
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20161114/64ed7c21/attachment.html 


More information about the Users mailing list