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
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
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
Hello,
On a system where Lapack is installed under /usr, simply use
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:
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
Thank you very much Yvan.
I managed to properly link Lapack!
Best regards,
Daniele