CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

LAPACK with SU2

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2017, 11:05
Question LAPACK with SU2
  #1
New Member
 
Join Date: Apr 2016
Posts: 3
Rep Power: 10
Joel Ho is on a distinguished road
Hi there,

I have looked at an earlier post regarding how to enable LAPACK in SU2 and am following the steps. (Link: Using LAPACK in SU2).

Firstly, I compiled blas, lapack and lapacke, and was able to call the functions in LAPACKE/lapacke.h.

I then ran configure with the following options:
--enable-mpi --with-cc=/path/to/mpicc --with-cxx=/path/to/mpicxx
--with-LAPACK-lib=/path/to/lapack
--with-LAPACK-include=/path/to/lapack/LAPACKE/include
The following message was printed after running configure, confirming that I have the required include file and library:
checking for /path/to/lapack/liblapacke.a... yes
checking for /path/to/lapack/LAPACKE/include/lapacke.h... yes
I then added a line "#include <lapacke.h>" in one of the header files in "SU2/Common/include" just to test if LAPACK is indeed enabled on SU2.

When running make, the following error appears:
fatal error: lapacke.h: No such file or directory
Even if I use the full path in the header file, i.e. "#include "/path/to/lapack/LAPACKE/include/lapacke.h", the compiler is unable to find the function when I called LAPACK_dgetrf in the .cpp file. Seems like the include and library paths are not set up correctly in the Makefile.

I am not sure what is missing here and what else do I need to do to get access to the LAPACK subroutines. Any help would be greatly appreciated.

I am using SU2 version 5.0.0 on my Thinkpad with Ubuntu 16.04.2 installed. Also, the LAPACK version is 3.7.1.

Thanks
Joel
Joel Ho is offline   Reply With Quote

Old   July 31, 2017, 13:20
Default
  #2
New Member
 
Join Date: Apr 2016
Posts: 3
Rep Power: 10
Joel Ho is on a distinguished road
I found a way around it in case anyone runs into the same problem. I'm still a beginner with C++ so it may seem trivial. Anyways...

Running ./configure with the following options on top of those needed for MPI etc. worked for me (with gnu compiler):
CPPFLAGS="-DHAVE_LAPACK -I/path/to/lapack/LAPACKE/include"
LDFLAGS="-L/path/to/lapack/lib"
LIBS="-llapacke -llapack -lblas -lgfortran"
Joel Ho is offline   Reply With Quote

Reply

Tags
compilation error, lapack, linking, su2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile SU2 with LAPACK in MKL chengdi SU2 Installation 2 October 23, 2015 10:51
Using LAPACK in SU2 shainath SU2 2 November 28, 2014 00:34
Pointwise-SU2 joint webinar (April 29th) and SU2 v3.1.0 new release fpalacios SU2 News & Announcements 1 April 30, 2014 02:40
Official release of SU2 V3.0 and SU2 Educational V1.0 fpalacios SU2 News & Announcements 2 January 22, 2014 05:28
Welcome to the Stanford University Unstructured (SU2) forum! economon SU2 0 January 7, 2013 02:48


All times are GMT -4. The time now is 02:40.