Dear Rich,
I am certain that this message does not belong to here. Perhaps, I should have sent it to the MESA mailing list, or definitely somewhere like MESASDK forum, which for now does not exist
So, this forum is the only discussion place I find useful for my question.
Due to my serious addiction to MESA and its prerequisite SDK, the MESASDK is the only bundle of compiler and libraries that I install on all systems that I work with. Now, for a separate project (that you will hear about soon), I need to link to and use LAPACK library. However, I do not know how to do that in my makefile. Additionally, the HDF5 support that ships for free with the SDK is also very appealing to use.
I would like to kindly ask you to document that, and perhaps provide examples on how to link to these libraries in MESASDK, and call then from within our own fortran programs.
Thanks for your support.
Ehsan
Linking and Using LAPACK with MESASDK
- rhtownsend
- Site Admin
- Posts: 398
- Joined: Sun Mar 31, 2013 4:22 pm
Re: Linking and Using LAPACK with MESASDK
To use the MESASDK version of LAPACK, add the following to the command used to link the executable:ehsan wrote:Dear Rich,
I am certain that this message does not belong to here. Perhaps, I should have sent it to the MESA mailing list, or definitely somewhere like MESASDK forum, which for now does not exist
So, this forum is the only discussion place I find useful for my question.
Due to my serious addiction to MESA and its prerequisite SDK, the MESASDK is the only bundle of compiler and libraries that I install on all systems that I work with. Now, for a separate project (that you will hear about soon), I need to link to and use LAPACK library. However, I do not know how to do that in my makefile. Additionally, the HDF5 support that ships for free with the SDK is also very appealing to use.
I would like to kindly ask you to document that, and perhaps provide examples on how to link to these libraries in MESASDK, and call then from within our own fortran programs.
Thanks for your support.
Ehsan
Code: Select all
`mesasdk_lapack_link`
Code: Select all
foo : foo.o
gfortran -o $@ $< `mesasdk_lapack_link`
When compiling object files from Fortran 90/95/03 source code, you may have to tell the compiler where to find the appropriate .mod files for modules you use in your code. To do this, add the following to the code used to compile the object file:
Code: Select all
-I$(MESASDK_ROOT)/include
Code: Select all
foo.o : foo.f90
gfortran -I$(MESASDK_ROOT) -c $<
Rich