<?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 Want to link MKL to existing code in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Want-to-link-MKL-to-existing-code/m-p/1001046#M18564</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;I am replacing certain operations specifically vector dot product,matrix vector multiplication and solve AX=b in existing code by calls to lapack subroutines. Do I need to link the MKL in the makefile explicitly?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;The following is content of my makefile&lt;/P&gt;

&lt;P&gt;!-----------------------------------------------------------&lt;/P&gt;

&lt;P&gt;.SUFFIXES: .o .f90&lt;BR /&gt;
	.f90.o:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) $&amp;lt;&lt;BR /&gt;
	F90 = ifort -warn -WB -C&lt;BR /&gt;
	LD &amp;nbsp;= $(F90)&lt;BR /&gt;
	LIBS = -ldl&lt;BR /&gt;
	PROFILE = -fast&lt;BR /&gt;
	OPTFLAGS = -g&lt;BR /&gt;
	CFLAGS = $(OPTFLAGS) $(PROFILE)&lt;BR /&gt;
	F90FLAGS = $(CFLAGS)&lt;BR /&gt;
	LDFLAGS = &amp;nbsp;&lt;/P&gt;

&lt;P&gt;PROGRAM = fadd2d&lt;BR /&gt;
	F90SRCS = global.f90 main.f90 nrtype.f90 nrutil.f90 remesh_module.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prep.f90 elem_charles.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assemb_charles.f90 formakf_charles.f90 gauss.f90 shape.f90 solver.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; post_remesh.f90 proc.f90 volume_solver.f90 pressure_solver.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rearge.f90 sif.f90 sifaniso.f90 root.f90 kernel1_c.f90 kernel2.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tstress.f90 tstress1.f90 tstress2.f90 tstress2a.f90 tstress3.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assemb_tstress.f90 rigidinner4.f90&lt;/P&gt;

&lt;P&gt;SRCS = $(F90SRCS)&amp;nbsp;&lt;/P&gt;

&lt;P&gt;OBJS = $(F90SRCS:.f90=.o)&lt;/P&gt;

&lt;P&gt;all: $(PROGRAM)&lt;/P&gt;

&lt;P&gt;$(PROGRAM): $(OBJS)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)&lt;/P&gt;

&lt;P&gt;elem_charles.o: elem_charles.f90 ekc_8.f90 ekd_8_temp.f90 ek_b2.f90 ek_at2.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eatts2.f90 eattip.f90 eat3.f90 ebts2.f90 ebtip.f90 eb3.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eat_rigid.f90 eb_rigid.f90&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) elem_charles.f90&lt;/P&gt;

&lt;P&gt;#Dec10_09: add prep.f90 to following line to recompile prep.f90&lt;BR /&gt;
	prep.o: prep.f90 setint.f90&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) prep.f90&lt;BR /&gt;
	clean:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f $(OBJS) $(PROGRAM)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm *.mod&lt;BR /&gt;
	tidy:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f *.BAK *.bak *.CKP *~&lt;/P&gt;

&lt;P&gt;undepend:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f $(OBJS:%.o=.%.d)&amp;nbsp;&lt;/P&gt;

&lt;P&gt;spotless: tidy clean undepend&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;!-----------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Saumik Dana.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Sep 2014 18:55:28 GMT</pubDate>
    <dc:creator>Saumik_D_</dc:creator>
    <dc:date>2014-09-22T18:55:28Z</dc:date>
    <item>
      <title>Want to link MKL to existing code</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Want-to-link-MKL-to-existing-code/m-p/1001046#M18564</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;I am replacing certain operations specifically vector dot product,matrix vector multiplication and solve AX=b in existing code by calls to lapack subroutines. Do I need to link the MKL in the makefile explicitly?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;The following is content of my makefile&lt;/P&gt;

&lt;P&gt;!-----------------------------------------------------------&lt;/P&gt;

&lt;P&gt;.SUFFIXES: .o .f90&lt;BR /&gt;
	.f90.o:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) $&amp;lt;&lt;BR /&gt;
	F90 = ifort -warn -WB -C&lt;BR /&gt;
	LD &amp;nbsp;= $(F90)&lt;BR /&gt;
	LIBS = -ldl&lt;BR /&gt;
	PROFILE = -fast&lt;BR /&gt;
	OPTFLAGS = -g&lt;BR /&gt;
	CFLAGS = $(OPTFLAGS) $(PROFILE)&lt;BR /&gt;
	F90FLAGS = $(CFLAGS)&lt;BR /&gt;
	LDFLAGS = &amp;nbsp;&lt;/P&gt;

&lt;P&gt;PROGRAM = fadd2d&lt;BR /&gt;
	F90SRCS = global.f90 main.f90 nrtype.f90 nrutil.f90 remesh_module.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prep.f90 elem_charles.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assemb_charles.f90 formakf_charles.f90 gauss.f90 shape.f90 solver.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; post_remesh.f90 proc.f90 volume_solver.f90 pressure_solver.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rearge.f90 sif.f90 sifaniso.f90 root.f90 kernel1_c.f90 kernel2.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tstress.f90 tstress1.f90 tstress2.f90 tstress2a.f90 tstress3.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assemb_tstress.f90 rigidinner4.f90&lt;/P&gt;

&lt;P&gt;SRCS = $(F90SRCS)&amp;nbsp;&lt;/P&gt;

&lt;P&gt;OBJS = $(F90SRCS:.f90=.o)&lt;/P&gt;

&lt;P&gt;all: $(PROGRAM)&lt;/P&gt;

&lt;P&gt;$(PROGRAM): $(OBJS)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)&lt;/P&gt;

&lt;P&gt;elem_charles.o: elem_charles.f90 ekc_8.f90 ekd_8_temp.f90 ek_b2.f90 ek_at2.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eatts2.f90 eattip.f90 eat3.f90 ebts2.f90 ebtip.f90 eb3.f90 \&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eat_rigid.f90 eb_rigid.f90&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) elem_charles.f90&lt;/P&gt;

&lt;P&gt;#Dec10_09: add prep.f90 to following line to recompile prep.f90&lt;BR /&gt;
	prep.o: prep.f90 setint.f90&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;$(F90) -c $(F90FLAGS) prep.f90&lt;BR /&gt;
	clean:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f $(OBJS) $(PROGRAM)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm *.mod&lt;BR /&gt;
	tidy:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f *.BAK *.bak *.CKP *~&lt;/P&gt;

&lt;P&gt;undepend:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;rm -f $(OBJS:%.o=.%.d)&amp;nbsp;&lt;/P&gt;

&lt;P&gt;spotless: tidy clean undepend&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;!-----------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Saumik Dana.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2014 18:55:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Want-to-link-MKL-to-existing-code/m-p/1001046#M18564</guid>
      <dc:creator>Saumik_D_</dc:creator>
      <dc:date>2014-09-22T18:55:28Z</dc:date>
    </item>
    <item>
      <title>Yes. You do need to link MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Want-to-link-MKL-to-existing-code/m-p/1001047#M18565</link>
      <description>&lt;P&gt;Yes. You do need to link MKL explicitly in your makefile. There is an online tool to help you figure out how to do it:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor" target="_blank"&gt;https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The tool generates a link line that is appropriate for your situation, based on the input you give it. You then copy/paste the link line into your makefile.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2014 20:25:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Want-to-link-MKL-to-existing-code/m-p/1001047#M18565</guid>
      <dc:creator>Zhang_Z_Intel</dc:creator>
      <dc:date>2014-09-22T20:25:31Z</dc:date>
    </item>
  </channel>
</rss>

