Lapack with v6

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
daniele
Posts: 148
Joined: Wed Feb 01, 2017 11:42 am

Lapack with v6

Post by daniele »

Hello,

I would like to perform matrix operations inside a fortran user subroutine, with code_saturne v6. I need Lapack.
I read a post in this forum discussing how to install code_saturne v2 with Lapack.
What is the procedure you reccomend with v6?

Thank you very much for your help.
Best regards,
Daniele
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: Lapack with v6

Post by Yvan Fournier »

Hello,

Iy you use Lapack only in user subroutines, you can simply add the required compile and link flags in a cs_user_scripts.py file (under DATA), in the domain.compile_cflags, domain.compile_cxxflags, and domain.compile_libs entries.

Best regards,

Yvan
daniele
Posts: 148
Joined: Wed Feb 01, 2017 11:42 am

Re: Lapack with v6

Post by daniele »

Hello Yvan,

Thank you very much for your help.
I am not very good in compiling stuff, could you please help me further: what do I have to specify exactly for domain.compile_...? The location of the Lapack libraries etc?

Thanks a lot for your time.
Best regards,
Daniele
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: Lapack with v6

Post by Yvan Fournier »

Hello,

On a system where Lapack is installed under /usr, simply use

Code: Select all

    domain.compile_cflags = None
    domain.compile_cxxflags = None
    domain.compile_fcflags = None
    domain.compile_libs = -llapack
On a system where it is installed on, for example /opt/lapack, adapt this:

Code: Select all

    domain.compile_cflags = -I/opt/lapack
    domain.compile_cxxflags = None
    domain.compile_fcflags = None
    domain.compile_libs = "-L/opt/lapack -llapack"
You might then have other errors due to dependencies, and need to add other libriaries (i.E. BLAS) depending on your system.

Best regards,

Yvan
daniele
Posts: 148
Joined: Wed Feb 01, 2017 11:42 am

Re: Lapack with v6

Post by daniele »

Thank you very much Yvan.
I managed to properly link Lapack!
Best regards,
Daniele
Post Reply