Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

problems with makefile on Ubuntu

milenko1976
Beginner
1,057 Views

I am trying to compile FORTRAN code but I have some problems with files that link FORTRAN and MATLAB.

ifort  -stand f03 -g  -warn all -fstack-security-check -check all    -c -o RunOccam.o RunOccam.f90
ifort  -stand f03 -g  -warn all -fstack-security-check -check all -o OCCAM1DCSEM FilterModules.o Occam.o Dipole1D.o  CSEM1D.o   RunOccam.o   -L/opt/intel/composerxe-2011.1.107/mkl/lib/ia32 -lmkl_lapack95 -Wl,--start-group /opt/intel/composerxe-2011.1.107/mkl/lib/ia32/libmkl_lapack95.a /opt/intel/composerxe-2011.1.107/mkl/lib/ia32/libmkl_blacs.a -Wl,--end-group
Occam.o: In function `tofmu':
/home/milenko/Occam1DCSEM/Source/Occam.f90:2770: undefined reference to `dpotrf_'
/home/milenko/Occam1DCSEM/Source/Occam.f90:2771: undefined reference to `dpotrs_'
/home/milenko/Occam1DCSEM/Source/Occam.f90:2773: undefined reference to `spotrf_'
/home/milenko/Occam1DCSEM/Source/Occam.f90:2774: undefined reference to `spotrs_'
/home/milenko/Occam1DCSEM/Source/Occam.f90:2785: undefined reference to `dgesv_'
/home/milenko/Occam1DCSEM/Source/Occam.f90:2788: undefined reference to `sgesv_'
CSEM1D.o: In function `computecsem_opra':
/home/milenko/Occam1DCSEM/Source/CSEM1D.f90:2474: undefined reference to `dgesvd_'
make: *** [OCCAM1DCSEM] Error 1


My makefile is attached,the original was written for Mac ,I am on Ubuntu 12.04.What should I change?

 

 

0 Kudos
1 Reply
TimP
Honored Contributor III
1,057 Views

If you wish to use the detailed MKL link setup, rather than -mkl, you must take advice from MKL link advisor

https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

0 Kudos
Reply