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

Limited Success with Shark, ifort and MKL

Raph
Beginner
534 Views
I'm looking for pointers to improve my limited success using Apple's Shark tool with ifort and MKL.
First my success.

As you can see in thisimage, I'm getting timing info from the code in shark.

I used the following compiler options -ipo -O3 -xSSSE3 -mdynamic-no-pic -no-prec-div -g -save-temps -assume nounderscore -autodouble -u -c
The problems are three
1) the top of the call tree is "NO_SRC_FILE", even though the second element should be a line in full_net.f90 a file it finds further down the call tree.
2) Inspite of the line listings in the Profile view, I can't get a Source view.
3) Most of the computation is done by MKL routines, but these do not show up. Instead they seem to be lumped into the topmost element of the call tree. I tried -static-intel but it made no difference.
Any suggestions?
0 Kudos
4 Replies
TimP
Honored Contributor III
535 Views
No doubt, you will get a lot less information with -ipo than you would get with -no-ip. Did you also use -g at the link step? -static-intel doesn't affect the choice of static or dynamic MKL libraries; if you want static, you must follow the advice of the link adviser at the top of the MKL forum.
0 Kudos
Raph
Beginner
535 Views
Thanks for the followup.
Following your suggestion, I tried -no-ip, but the problems remain.

The linker options are
-no-ip -O3 -xSSSE3 -mdynamic-no-pic -no-prec-div -g -save-temps -assume nounderscore -static-intel -autodouble
I prefer to use dynamic libraries, but tried -static-intel to see if that would allow Shark to profile them.
Any other ideas?
0 Kudos
Ron_Green
Moderator
535 Views
As Tim said, -static-intel has no effect on MKL linkage, it only affects the compiler runtime libraries. The MKL link line advisor can help with getting a static MKL link:

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

ron
0 Kudos
Raph
Beginner
535 Views
Hi-
So I addressed by previous problem by switching to the Cray compiler and Apprentice, but I'd really like to be able to use Shark and ifort on my laptop for this purpose. So I have come back to this problem (and thread). Unfortunately, it looks like things have gone backward as now every line in the profile is labeled NO_SRC_FILE:?
I'm currently using Mac OS X 10.6.8, XCode 3.2.6 and ifort 11.1.091. A sample compile line is
ifort -no-ip -O3 -xSSSE3 -mdynamic-no-pic -no-prec-div -g -save-temps -assume nounderscore -autodouble -u -c jacobian_dense.f90
The link line isifort -no-ip -O3 -xSSSE3 -mdynamic-no-pic -no-prec-div -g -save-temps -assume nounderscore -autodouble -o xnet control.o data.o common.o net_preprocess.o ffn.o full_net.o solve_be.o solve_bd.o match.o net.o flux.o eosnom90.o screen.o jacobian_dense.o -I/Library/Frameworks/Intel_MKL.framework/Versions/Current/include /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_intel_lp64.a /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_sequential.a /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_core.a -lpthread
This runs fine from the command line, but I really want to dig into the performance.
Can you tell me what I'm doing wrong?
Raph
0 Kudos
Reply