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

Link MKL in CentOS (intel fortran version : compressor_xe_2013_sp1.3.174)

kim__seongik
Beginner
876 Views

Hello

 

I have some questions about the linking mkl in linux CentOS 6.7 (intel fortran version : compressor _xe_2013_sp1.3.174)

1. I used  'Intel Math Kernel Library Link Line Advisor' for linking and making makefile.
However, there is no version for compressor xe 2013. So I want to check my link line in 2013 ver.

2. I tried making binary file (exe file)  by using below link line.

kim__seongik_0-1599453378237.png

 

Compiling is passed. However, If I run this binary file then the below error is printed..

kim__seongik_1-1599453466354.png

How can I solve this problem??

3. Is there any option like window '/Qmkl=sequential, /Qmkl=parallel' in Linux??  

 

 

Thank you for reading!!

0 Kudos
1 Solution
mecej4
Honored Contributor III
862 Views

Using the MKL link advisor's recommendation may not work with an older compiler, because the libraries and directories may have been reorganized between versions.

Try the -mkl option, which has the same function as the /Qmkl option on Windows.

Rather than showing a screenshot of the MKL advisor, when you reply please report the exact command line that you used to produce the executable "run". It would also help to see the output of ls -l ./run .

View solution in original post

0 Kudos
4 Replies
mecej4
Honored Contributor III
863 Views

Using the MKL link advisor's recommendation may not work with an older compiler, because the libraries and directories may have been reorganized between versions.

Try the -mkl option, which has the same function as the /Qmkl option on Windows.

Rather than showing a screenshot of the MKL advisor, when you reply please report the exact command line that you used to produce the executable "run". It would also help to see the output of ls -l ./run .

0 Kudos
kim__seongik
Beginner
859 Views

Thank you for your replying!!

My make file is below:

 

# Make File JHS 1st Script
# Sourced from Cho, H.S. Makefile
F77 = mpif90 -mcmodel=large -shared-intel
F90 = mpif90 -mcmodel=large -shared-intel


#LIBPATH = /opt/mpi/intel/mpich-1.2.7p1/lib
#LIBPATH1 = /opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64
MKLROOT = /opt/intel/composer_xe_2013_sp1.3.174/mkl

#LLFAGS = $(LIBPATH)/libmpichf90.a
#LLFLAGS = $(LIBPATH)
LLFLAGS = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl
#LLFAGS4 = $(LIBPATH1)/$(wildcard *.a)


OBJS = $(wildcard code/*.f90) $(wildcard code/*.F90)

all : run

run : $(OBJS)
$(F90) -o run $(OBJS) $(LLFLAGS)


clean :
- rm *.o *.mod *.out result/*.out run
- rmdir result

.SUFFIXES : .f .f90 .o

.f.o: ; $(F77) -c $(FFLAGS) $?

.f90.o: ; $(F90) -c $(FFLAGS) $?

 

 

 

 

can you check my makefile??

0 Kudos
mecej4
Honored Contributor III
854 Views

You are probably passing 4-byte integer arguments in your calls to MKL routines. Your linking with libmkl_intel_ilp64.a would be appropriate if you were passing 8-byte integer arguments.

0 Kudos
kim__seongik
Beginner
844 Views

Thank you for your reply !!

 

As you said, I checked my list of links.

Below LLFLAGS is my link list.

LLFLAGS = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

 

In the LLFLAGS, I already include libmkl_intel_ilp64.a.

 

In this case, what is the problem??

 

 

 

 

0 Kudos
Reply