<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The following remarks may not in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100709#M23878</link>
    <description>&lt;P&gt;The following remarks may not apply to the old versions of ICC and MKL that you are using.&lt;/P&gt;

&lt;P&gt;Your Parasails.c seems to contain one or more calls to the Fortran subroutine DGELS of Lapack, rather than calling LAPACKE_dgels(), which would be more natural for using from C. However, as long as you pass the arguments to dgels() that the Fortran subroutine expects, that should be OK.&lt;/P&gt;

&lt;P&gt;I tried with an example code in C that contained a call to dgels_(), using just the simple -mkl option to &lt;STRONG&gt;icc&lt;/STRONG&gt;. The program was compiled and linked with the Intel C compiler with no problems. Perhaps you should report the build messages in full.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2015 17:45:35 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2015-12-09T17:45:35Z</dc:date>
    <item>
      <title>Modification of Makefile for Parallel Studio XE 2015</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100707#M23876</link>
      <description>&lt;P&gt;Dear smart MKL friends,&lt;BR /&gt;
	I have a very large C++ code written by someone else in MS visual studio. I converted the code in a way that it worked perfectly on UNIX clusters. Now, I want it to work on my Laptop’s Kubuntu Kernel. However, I couldn’t make it work and I decided to seek some online help.&lt;BR /&gt;
	Here is my software environment on my laptop:&lt;BR /&gt;
	•&amp;nbsp;&amp;nbsp; &amp;nbsp;Kubuntu 14.04 LTS&lt;BR /&gt;
	•&amp;nbsp;&amp;nbsp; &amp;nbsp;Compiler: Mpic++&lt;BR /&gt;
	•&amp;nbsp;&amp;nbsp; &amp;nbsp;Intel® Parallel Studio XE 2015 Composer Edition for Linux&lt;BR /&gt;
	•&amp;nbsp;&amp;nbsp; &amp;nbsp;Terminal (no Eclipse)&lt;/P&gt;

&lt;P&gt;Necessary part of the makefile and how I linked the libraries can be found below:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;#compiler
CC=mpic++
CFLAGS=-c -g -O0 -I./ParaSails
LFLAGS= -L/usr/global/intel/mkl/2011.4/lib/intel64/ 
-L/usr/global/intel/mkl/10.3.1.107/mkl/lib/intel64 -L./ParaSails 
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lguide 
-openmp -lParaSails

all : cbm.x
cbm.x : frprop.o gmres.o input.o  mtxslv.o resvoir.o ccoal.o  
$(CC) $(LFLAGS) -fPIC frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o -o cbm.x -lParaSails&lt;/PRE&gt;

&lt;P&gt;Linking part of the makefile for the solver (Parasails) can be found below:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;BLASLIBFLAGS = -L/usr/global/intel/mkl/2011.4/lib/intel64/ 
-L/usr/global/intel/mkl/10.3.1.107/mkl/lib/intel64 
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread –openmp&lt;/PRE&gt;

&lt;P&gt;When I make my executable on my laptop, I receive the following fatal error:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;./Parasails.c 1319: undefined reference to `dgels_'&lt;/PRE&gt;

&lt;P&gt;I believe it is a problem with Lapack or Blas libraries. I tried different linkings to make it work but I couldn’t solve the problem. I spent good 4 days on this issue, searched every possible answer on the Internet, but I think it is time to seek for some help. I was wondering, maybe, someone could create sometime for my problem and help me to modify the links on my makefile for the given software environment above.&lt;BR /&gt;
	Thanks you in advance and best regards,&lt;BR /&gt;
	Burak&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 23:53:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100707#M23876</guid>
      <dc:creator>burak_k_</dc:creator>
      <dc:date>2015-12-08T23:53:51Z</dc:date>
    </item>
    <item>
      <title>The long ago libguide and</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100708#M23877</link>
      <description>&lt;P&gt;The long ago libguide and more recent libiomp5 are mutually exclusive. If your mpi was built with icpc, the openmp option takes care of the openmp and pthread requirements.&lt;/P&gt;

&lt;P&gt;The authority on mkl lin&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;king is the mkl link advisor.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;if you continue to have difficulty, please quote at least the actual link command passed to ld.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 02:45:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100708#M23877</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2015-12-09T02:45:32Z</dc:date>
    </item>
    <item>
      <title>The following remarks may not</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100709#M23878</link>
      <description>&lt;P&gt;The following remarks may not apply to the old versions of ICC and MKL that you are using.&lt;/P&gt;

&lt;P&gt;Your Parasails.c seems to contain one or more calls to the Fortran subroutine DGELS of Lapack, rather than calling LAPACKE_dgels(), which would be more natural for using from C. However, as long as you pass the arguments to dgels() that the Fortran subroutine expects, that should be OK.&lt;/P&gt;

&lt;P&gt;I tried with an example code in C that contained a call to dgels_(), using just the simple -mkl option to &lt;STRONG&gt;icc&lt;/STRONG&gt;. The program was compiled and linked with the Intel C compiler with no problems. Perhaps you should report the build messages in full.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 17:45:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100709#M23878</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-12-09T17:45:35Z</dc:date>
    </item>
    <item>
      <title>Dear all,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100710#M23879</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I have been playing with the links by using Intel® Math Kernel Library Link Line Advisor. Still working on it. Here is the build messages in full.&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;$.../pcbm$ make
mpic++ -c -g -O0 -I./ParaSails  frprop.cpp
mpic++ -c -g -O0 -I./ParaSails  gmres.cpp
mpic++ -c -g -O0 -I./ParaSails  input.cpp
mpic++ -c -g -O0 -I./ParaSails  mtxslv.cpp
mpic++ -c -g -O0 -I./ParaSails  resvoir.cpp
mpic++ -c -g -O0 -I./ParaSails  ccoal.cpp
mpic++ -L/opt/intel/mkl/lib/intel64/ -L./ParaSails -lmkl_rt -lpthread -lParaSails -lm -fPIC frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o -o cbm.x -lParaSails
./ParaSails/libParaSails.a(ParaSails.o): In function `ComputeValuesNonsym':
/home/burakkulga/Phd/pcbm/ParaSails/ParaSails.c:1319: undefined reference to `dgels_'
collect2: error: ld returned 1 exit status
make: *** [cbm.x] Error 1
&lt;/PRE&gt;

&lt;P&gt;Thank you and best regards,&lt;/P&gt;

&lt;P&gt;Burak&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 18:05:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100710#M23879</guid>
      <dc:creator>burak_k_</dc:creator>
      <dc:date>2015-12-09T18:05:04Z</dc:date>
    </item>
    <item>
      <title>I think that that the order</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100711#M23880</link>
      <description>&lt;P&gt;I think that that the order in which the libraries are listed on line-8 of the shell commands in #4 is incorrect. The .o files must be listed before the library files. For example, try:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;mpic++ -fPIC frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o -L/opt/intel/mkl/lib/intel64/ -L./ParaSails  -lParaSails -lmkl_rt -lpthread -lm  -o cbm.x
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:06:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100711#M23880</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-12-09T19:06:22Z</dc:date>
    </item>
    <item>
      <title>Dear mecej4,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100712#M23881</link>
      <description>&lt;P&gt;Dear mecej4,&lt;/P&gt;

&lt;P&gt;I tried your last recommendation, I received the same error. Here is my makefile that was working on my university's UNIX clusters:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;CC=mpic++
CFLAGS=-c -g -O0 -I./ParaSails
LFLAGS=-L/usr/global/intel/mkl/2011.4/lib/intel64/
-L/usr/global/intel/mkl/10.3.1.107/mkl/lib/intel64
-L./ParaSails
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lguide -openmp
-lParaSails

all : cbm.x

cbm.x : frprop.o gmres.o input.o  mtxslv.o resvoir.o ccoal.o  
    $(CC) $(LFLAGS) -fPIC frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o -o cbm.x -lParaSails
    rm -rf *.o
    rm -rf *.cbm *.txt&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;
	&lt;/P&gt;&lt;P&gt;Thank you for your time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Burak&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:17:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100712#M23881</guid>
      <dc:creator>burak_k_</dc:creator>
      <dc:date>2015-12-09T19:17:00Z</dc:date>
    </item>
    <item>
      <title>If you are asking make to do</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100713#M23882</link>
      <description>&lt;P&gt;If you are asking &lt;STRONG&gt;make &lt;/STRONG&gt;to do the build, the line in the makefile that causes linking to occur needs to be fixed.&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;$(CC) -fPIC frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o $(LFLAGS) -o cbm.x&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100713#M23882</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-12-09T19:42:00Z</dc:date>
    </item>
    <item>
      <title>Dear mecej4,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100714#M23883</link>
      <description>&lt;P&gt;Dear mecej4,&lt;/P&gt;

&lt;P&gt;I have tried your suggestion. Unfortunately, I received the same error.&lt;/P&gt;

&lt;P&gt;Do you think I should add the following linkers?&lt;/P&gt;

&lt;P&gt;-lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Burak&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 19:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100714#M23883</guid>
      <dc:creator>burak_k_</dc:creator>
      <dc:date>2015-12-09T19:56:00Z</dc:date>
    </item>
    <item>
      <title>No, unless you are using 8</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100715#M23884</link>
      <description>&lt;P&gt;No, unless you are using 8-byte integer variables as arguments to MKL routines, you should not use ILP libraries.&lt;/P&gt;

&lt;P&gt;Please post the output from &lt;STRONG&gt;make&lt;/STRONG&gt; as in #4, after changing the makefile as suggested in #7.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 20:04:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100715#M23884</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-12-09T20:04:02Z</dc:date>
    </item>
    <item>
      <title>Dear all,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100716#M23885</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I fixed my problem by fixing the makefile as follows:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;MKLROOT = /opt/intel/mkl
LIBS = -L$(MKLROOT)/lib/intel64
INCLUDES = -m64 -I${MKLROOT}/include
#compiler
CC=mpic++

#cflags
CFLAGS=-c -g -O0 -I./ParaSails 

LFLAGS=  -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -L./ParaSails
  -lmkl_rt -lpthread -lm -lParaSails

all : cbm.x

cbm.x : frprop.o gmres.o input.o  mtxslv.o resvoir.o ccoal.o  
	$(CC) $(LIBS) $(INCLUDES) frprop.o gmres.o input.o resvoir.o mtxslv.o ccoal.o $(LFLAGS) -o cbm.x -lParaSails&lt;/PRE&gt;

&lt;P&gt;I had to export some files as folows:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH&lt;/PRE&gt;

&lt;P&gt;Thank you for helping me. You guys are awesome.&lt;/P&gt;

&lt;P&gt;Happy Holidays!&lt;/P&gt;

&lt;P&gt;Burak&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 22:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Modification-of-Makefile-for-Parallel-Studio-XE-2015/m-p/1100716#M23885</guid>
      <dc:creator>burak_k_</dc:creator>
      <dc:date>2015-12-09T22:30:00Z</dc:date>
    </item>
  </channel>
</rss>

