Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
131 Views

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

Jump to solution

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.

캡처.PNG

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

캡처.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

Accepted Solutions
Highlighted
Moderator
44 Views

>> 1. Yes, that’s correct intel compiler options. In the case, if you will use another Fortran compiler, these options would not be recognized and you have to link explicitly. Then, in that case, You need to check MKL Linker adviser’s recommendations or check MKL User Guide or use mkl_link_tool commandline tool …

>> 2. -mkl=cluster – use this option only if your application use some ScaLAPACK, CFFT of Cluster Direct Solver API and run this code by using mpiexec, mpiifort drivers….

>> if you like to see the differences, I would recommend you to check our profiling tool (vTune) which is dedicated to solving such kind of tasks


View solution in original post

0 Kudos
13 Replies
Highlighted
Black Belt
121 Views
0 Kudos
Highlighted
Employee
112 Views

Hello,

1) Link line really does not change much between versions so using the link line for 2017 is fine.

2) What you see is a generic segmentation fault error which happens in runtime and says almost nothing about the issue.

3) There are such options: https://software.intel.com/content/www/us/en/develop/documentation/mkl-linux-developer-guide/top/lin...
However, these options on Linux, as well as on Windows, link only against LP64 interfaces. So if you had a code which worked on Windows with /Qmkl=? then you should use LP64 interface in your link line.
As I noticed, you are using ilp64. Please, double check that you're using correct interface library.

I'm afraid there is not enough information to give a more specific advice.

Thanks,
Kirill

0 Kudos
Highlighted
Beginner
102 Views

Thank you for your comments!!

 

As follow your comments, I think I should use below link line.

kim__seongik_0-1599532111958.png

 

However I don't know How to adopt that line in my make file.

 

Below is my make file :

# 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) $?

 

 

How can I solve this problem??

 

And also I'm using 64bit so ilp64 is no problem.
However, which information is needed for getting advise.

0 Kudos
Highlighted
Employee
97 Views

Hi again,

As the link line advisor says, you need also to specify -i8 flag for compilation, do you have it? What is the value of FFLAGS?

If you have correct compilation options, I suggest the following: first identify which MKL functionality is causing a segfault (by some way of debugging), then try to run an MKL example for it.  If an example works, check the input in your code, maybe you're passing incorrect parameters. Also, if the example works, try to use your makefile for the example instead of the shipped one and see if anything changes (a newly observed failure would indicate that smth is wrong with your makefile).

A functionality can segfault either because it has a bug or you're using it wrong. It could be simply that you are passing incorrect parameters. 

Best,
Kirill

0 Kudos
Highlighted
Beginner
90 Views

Thank you for your comments .

 

In my case LLFLGS is just link line from link advisor.

However there are no i8 compilation option.

How can I append that option in my make file.

 

Thank you for reading!!!

0 Kudos
Highlighted
Black Belt
80 Views

kim__seongik wrote: "And also I'm using 64bit so ilp64 is no problem."

That is a non-sequitor.

What do you mean by "using 64 bit"? Address size? Integer size? Character size?

Do you require 8-byte integers, and do you have good reasons for doing so?

Regarding the makefile and FFLAGS: you have not told us why you need to use a makefile and how many source files and libraries you have to use when building.

If you do need to use make for building, you need to spend some time to learn about make and makefiles before you can start changing makefiles. After that, you will know whether the -i8 option should be part of FFLAGS or LLFLAGS, and will not find yourself testing incorrect combinations of flags and makefiles.

0 Kudos
Highlighted
Beginner
76 Views

Thank you for your comment!!

 

I checked again and I made following two options 1 is for 32bit 2 is for 64bit

 

1 : mpif90 -mcmodel=large -shared-intel -c -I${MKLROOT}/include FE_code2.f90

   mpif90 -mcmodel=large -shared-intel -o run FE_code2.o -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

 

2: mpif90 -mcmodel=large -shared-intel -c -i8 -I${MKLROOT}/include FE_code2.f90

mpif90 -mcmodel=large -shared-intel -o run FE_code2.o -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

 

Both of them work. 

However I have a question.

In case 2 (64bit) the computing time is long . 
Is it makes sense??

0 Kudos
Highlighted
Moderator
73 Views

Do you see the corrected ( expected) results with both of these linking modes?

What is the computation time differences do you see?




0 Kudos
Highlighted
Beginner
69 Views

Yes I got the same result.

I mean the full computing time for solving large matrix.
In window, /Qmkl=parallel is faster than /Qmkl=sequential in my code.


So I just want to check same problem in Linux cluster.

 

So is this  working in cluster  :

mpif90 -mcmodel=large -shared-intel -c -mkl=parallel -I${MKLROOT}/include FE_code2.f90
mpif90 -mcmodel=large -shared-intel -c -mkl=sequential -I${MKLROOT}/include FE_code2.f90
mpif90 -mcmodel=large -shared-intel -c -mkl=cluster -I${MKLROOT}/include FE_code2.f90

I mean Can I see the different computing time in these 3 cases??

 

 

0 Kudos
Highlighted
Moderator
64 Views

yes, that's expected behavior as in sequential mode the code will execute in 1 thread, in parallel - in all threads available. You need to check the MKL User Guide to check more details.


0 Kudos
Highlighted
Beginner
57 Views

Thank you for your comment!!

I have 2 questions.

1. Can you check my compile expression:

mpif90 -mcmodel=large -shared-intel -c -mkl=parallel -I${MKLROOT}/include FE_code2.f90
mpif90 -mcmodel=large -shared-intel -c -mkl=sequential -I${MKLROOT}/include FE_code2.f90
mpif90 -mcmodel=large -shared-intel -c -mkl=cluster -I${MKLROOT}/include FE_code2.f90

 

for each case on the shell  .

IS it right?

 

2. And ALso I want to check the difference by checking load of the CPU core.

By using "top" I can check load of each cpu, but I want to check load of each cores.

How can I see this??

 

Thank you for reading

0 Kudos
Highlighted
Moderator
45 Views

>> 1. Yes, that’s correct intel compiler options. In the case, if you will use another Fortran compiler, these options would not be recognized and you have to link explicitly. Then, in that case, You need to check MKL Linker adviser’s recommendations or check MKL User Guide or use mkl_link_tool commandline tool …

>> 2. -mkl=cluster – use this option only if your application use some ScaLAPACK, CFFT of Cluster Direct Solver API and run this code by using mpiexec, mpiifort drivers….

>> if you like to see the differences, I would recommend you to check our profiling tool (vTune) which is dedicated to solving such kind of tasks


View solution in original post

0 Kudos
Highlighted
Moderator
33 Views

This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only. 



0 Kudos