<?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 munmap_chunk():invalid pointer in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803705#M3262</link>
    <description>Hi,&lt;BR /&gt;I'm trying to test a simple program that uses OpenMP directives along with the threaded MKL library. However, I am getting a runtime error just before the program exits. Below is the error. I've also attached my code and the makefile. I'm not quite sure if there a problem with the libraries I'm linking to. I've set the environment variable OMP_NUM_THREADS=1. I am testing the code on Intel 64 architecture with SUSE Linux Enterprise Server 9.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*** glibc detected *** ./p1: munmap_chunk(): invalid pointer: 0x000000001dc5f0a0 ***&lt;BR /&gt;======= Backtrace: =========&lt;BR /&gt;/lib64/libc.so.6(cfree+0x166)[0x352d472856]&lt;BR /&gt;./p1[0x41560d]&lt;BR /&gt;./p1[0x4146c8]&lt;BR /&gt;./p1[0x440df7]&lt;BR /&gt;./p1[0x4071ae]&lt;BR /&gt;./p1[0x403bd1]&lt;BR /&gt;/lib64/libc.so.6(__libc_start_main+0xf4)[0x352d41d994]&lt;BR /&gt;./p1[0x403ad9]&lt;BR /&gt;======= Memory map: ========&lt;BR /&gt;00400000-004bd000 r-xp 00000000 00:19 3288420770 /home/kkarco2/FortranPrograms/makefileExample/p1&lt;BR /&gt;006bc000-006c4000 rw-p 000bc000 00:19 3288420770 /home/kkarco2/FortranPrograms/makefileExample/p1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I've removed some of the information for the sake of making my post smaller.&lt;BR /&gt;Here is my makefile &lt;A onclick="ndownload('http://software.intel.com/file/31360')"&gt;makefile&lt;/A&gt; &lt;BR /&gt;Here is my &lt;A onclick="ndownload('http://software.intel.com/file/31352')"&gt;&lt;/A&gt;mainfile &lt;A onclick="ndownload('http://software.intel.com/file/31359')"&gt;main.f90&lt;/A&gt;&lt;BR /&gt;And here is an additional file &lt;A onclick="ndownload('http://software.intel.com/file/31358')"&gt;add.f90&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated.&lt;BR /&gt;&lt;BR /&gt;EDIT: I apologize for posting this under the wrong forum.</description>
    <pubDate>Tue, 19 Oct 2010 20:09:44 GMT</pubDate>
    <dc:creator>kkarco2</dc:creator>
    <dc:date>2010-10-19T20:09:44Z</dc:date>
    <item>
      <title>munmap_chunk():invalid pointer</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803705#M3262</link>
      <description>Hi,&lt;BR /&gt;I'm trying to test a simple program that uses OpenMP directives along with the threaded MKL library. However, I am getting a runtime error just before the program exits. Below is the error. I've also attached my code and the makefile. I'm not quite sure if there a problem with the libraries I'm linking to. I've set the environment variable OMP_NUM_THREADS=1. I am testing the code on Intel 64 architecture with SUSE Linux Enterprise Server 9.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*** glibc detected *** ./p1: munmap_chunk(): invalid pointer: 0x000000001dc5f0a0 ***&lt;BR /&gt;======= Backtrace: =========&lt;BR /&gt;/lib64/libc.so.6(cfree+0x166)[0x352d472856]&lt;BR /&gt;./p1[0x41560d]&lt;BR /&gt;./p1[0x4146c8]&lt;BR /&gt;./p1[0x440df7]&lt;BR /&gt;./p1[0x4071ae]&lt;BR /&gt;./p1[0x403bd1]&lt;BR /&gt;/lib64/libc.so.6(__libc_start_main+0xf4)[0x352d41d994]&lt;BR /&gt;./p1[0x403ad9]&lt;BR /&gt;======= Memory map: ========&lt;BR /&gt;00400000-004bd000 r-xp 00000000 00:19 3288420770 /home/kkarco2/FortranPrograms/makefileExample/p1&lt;BR /&gt;006bc000-006c4000 rw-p 000bc000 00:19 3288420770 /home/kkarco2/FortranPrograms/makefileExample/p1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I've removed some of the information for the sake of making my post smaller.&lt;BR /&gt;Here is my makefile &lt;A onclick="ndownload('http://software.intel.com/file/31360')"&gt;makefile&lt;/A&gt; &lt;BR /&gt;Here is my &lt;A onclick="ndownload('http://software.intel.com/file/31352')"&gt;&lt;/A&gt;mainfile &lt;A onclick="ndownload('http://software.intel.com/file/31359')"&gt;main.f90&lt;/A&gt;&lt;BR /&gt;And here is an additional file &lt;A onclick="ndownload('http://software.intel.com/file/31358')"&gt;add.f90&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated.&lt;BR /&gt;&lt;BR /&gt;EDIT: I apologize for posting this under the wrong forum.</description>
      <pubDate>Tue, 19 Oct 2010 20:09:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803705#M3262</guid>
      <dc:creator>kkarco2</dc:creator>
      <dc:date>2010-10-19T20:09:44Z</dc:date>
    </item>
    <item>
      <title>munmap_chunk():invalid pointer</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803706#M3263</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Your makefile is correct enough (except option -openmp is not needed for sequential MKL case) and I can see usages of ifort compiler option -i8 for MKL ILP64 libraries:&lt;BR /&gt;&lt;BR /&gt;Compiling add.f90&lt;BR /&gt;ifort -c -debug full -i8 -openmp -openmp-report1 -fpp -o add.o add.f90&lt;BR /&gt;Compiling main.f90&lt;BR /&gt;ifort -c -debug full -i8 -openmp -openmp-report1 -fpp -o main.o main.f90&lt;BR /&gt;main.f90(62) (col. 7): remark: OpenMP DEFINED LOOP WAS PARALLELIZED.&lt;BR /&gt;main.f90(55) (col. 7): remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;Linking...&lt;BR /&gt;ifort main.o add.o -o p1 -L/.../mkl1026/__release_lnx/lib/em64t/ -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lpthread -openmp&lt;BR /&gt;&lt;BR /&gt;and output:&lt;BR /&gt;&lt;BR /&gt;% ./p1&lt;BR /&gt;A = (1.00000000000000,1.00000000000000)&lt;BR /&gt;B = (1.00000000000000,1.00000000000000)&lt;BR /&gt;A = (1.00000000000000,2.00000000000000)&lt;BR /&gt;B = (2.00000000000000,1.00000000000000)&lt;BR /&gt;A = (2.00000000000000,1.00000000000000)&lt;BR /&gt;B = (1.00000000000000,2.00000000000000)&lt;BR /&gt;A = (2.00000000000000,2.00000000000000)&lt;BR /&gt;B = (2.00000000000000,2.00000000000000)&lt;BR /&gt;Number of threads = 8&lt;BR /&gt;Thread 0 starting...&lt;BR /&gt;Thread 7 starting...&lt;BR /&gt;Thread 0: C( 1)= 2.00&lt;BR /&gt;Thread 0: C( 3)= 6.00&lt;BR /&gt;Thread 0: C( 4)= 8.00&lt;BR /&gt;Thread 0: C( 5)= 10.00&lt;BR /&gt;Thread 0: C( 6)= 12.00&lt;BR /&gt;Thread 0: C( 7)= 14.00&lt;BR /&gt;Thread 0: C( 8)= 16.00&lt;BR /&gt;Thread 0: C( 9)= 18.00&lt;BR /&gt;Thread 0: C( 10)= 20.00&lt;BR /&gt;Thread 4 starting...&lt;BR /&gt;Thread 3 starting...&lt;BR /&gt;Thread 1 starting...&lt;BR /&gt;Thread 5 starting...&lt;BR /&gt;Thread 6 starting...&lt;BR /&gt;Thread 2 starting...&lt;BR /&gt;Thread 7: C( 2)= 4.00&lt;BR /&gt;Thread 0 done.&lt;BR /&gt;Thread 4 done.&lt;BR /&gt;Thread 5 done.&lt;BR /&gt;Thread 7 done.&lt;BR /&gt;Thread 2 done.&lt;BR /&gt;Thread 1 done.&lt;BR /&gt;Thread 3 done.&lt;BR /&gt;Thread 6 done.&lt;BR /&gt;I am here*****************************&lt;BR /&gt;FORTRAN PAUSE&lt;BR /&gt;&lt;BR /&gt;PAUSE prompt&amp;gt;&lt;BR /&gt;*** glibc detected *** ./p1: munmap_chunk(): invalid pointer: 0x000000001db0ea60 ***&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;Root cause of the problem is in your file main.f90 line #29&lt;BR /&gt; call add(i,j, N)&lt;BR /&gt;where N was changed to &lt;STRONG&gt;&lt;EM&gt;N = i + j&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;However, MatrixMaltiply needs argument N to be equal to 2 according to A,B,C allocations&lt;/SNIP&gt;</description>
      <pubDate>Wed, 20 Oct 2010 06:37:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803706#M3263</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-10-20T06:37:07Z</dc:date>
    </item>
    <item>
      <title>munmap_chunk():invalid pointer</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803707#M3264</link>
      <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=93649" class="basic" href="https://community.intel.com/en-us/profile/93649/"&gt;Victor Pasko (Intel)&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Your makefile is correct enough (except option -openmp is not needed for sequential MKL case) and I can see usages of ifort compiler option -i8 for MKL ILP64 libraries:&lt;BR /&gt;&lt;BR /&gt;Compiling add.f90&lt;BR /&gt;ifort -c -debug full -i8 -openmp -openmp-report1 -fpp -o add.o add.f90&lt;BR /&gt;Compiling main.f90&lt;BR /&gt;ifort -c -debug full -i8 -openmp -openmp-report1 -fpp -o main.o main.f90&lt;BR /&gt;main.f90(62) (col. 7): remark: OpenMP DEFINED LOOP WAS PARALLELIZED.&lt;BR /&gt;main.f90(55) (col. 7): remark: OpenMP DEFINED REGION WAS PARALLELIZED.&lt;BR /&gt;Linking...&lt;BR /&gt;ifort main.o add.o -o p1 -L/.../mkl1026/__release_lnx/lib/em64t/ -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lpthread -openmp&lt;BR /&gt;&lt;BR /&gt;and output:&lt;BR /&gt;&lt;BR /&gt;% ./p1&lt;BR /&gt;A = (1.00000000000000,1.00000000000000)&lt;BR /&gt;B = (1.00000000000000,1.00000000000000)&lt;BR /&gt;A = (1.00000000000000,2.00000000000000)&lt;BR /&gt;B = (2.00000000000000,1.00000000000000)&lt;BR /&gt;A = (2.00000000000000,1.00000000000000)&lt;BR /&gt;B = (1.00000000000000,2.00000000000000)&lt;BR /&gt;A = (2.00000000000000,2.00000000000000)&lt;BR /&gt;B = (2.00000000000000,2.00000000000000)&lt;BR /&gt;Number of threads = 8&lt;BR /&gt;Thread 0 starting...&lt;BR /&gt;Thread 7 starting...&lt;BR /&gt;Thread 0: C( 1)= 2.00&lt;BR /&gt;Thread 0: C( 3)= 6.00&lt;BR /&gt;Thread 0: C( 4)= 8.00&lt;BR /&gt;Thread 0: C( 5)= 10.00&lt;BR /&gt;Thread 0: C( 6)= 12.00&lt;BR /&gt;Thread 0: C( 7)= 14.00&lt;BR /&gt;Thread 0: C( 8)= 16.00&lt;BR /&gt;Thread 0: C( 9)= 18.00&lt;BR /&gt;Thread 0: C( 10)= 20.00&lt;BR /&gt;Thread 4 starting...&lt;BR /&gt;Thread 3 starting...&lt;BR /&gt;Thread 1 starting...&lt;BR /&gt;Thread 5 starting...&lt;BR /&gt;Thread 6 starting...&lt;BR /&gt;Thread 2 starting...&lt;BR /&gt;Thread 7: C( 2)= 4.00&lt;BR /&gt;Thread 0 done.&lt;BR /&gt;Thread 4 done.&lt;BR /&gt;Thread 5 done.&lt;BR /&gt;Thread 7 done.&lt;BR /&gt;Thread 2 done.&lt;BR /&gt;Thread 1 done.&lt;BR /&gt;Thread 3 done.&lt;BR /&gt;Thread 6 done.&lt;BR /&gt;I am here*****************************&lt;BR /&gt;FORTRAN PAUSE&lt;BR /&gt;&lt;BR /&gt;PAUSE prompt&amp;gt;&lt;BR /&gt;*** glibc detected *** ./p1: munmap_chunk(): invalid pointer: 0x000000001db0ea60 ***&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;Root cause of the problem is in your file main.f90 line #29&lt;BR /&gt; call add(i,j, N)&lt;BR /&gt;where N was changed to &lt;B&gt;&lt;I&gt;N = i + j&lt;BR /&gt;&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;However, MatrixMaltiply needs argument N to be equal to 2 according to A,B,C allocations&lt;/SNIP&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;Damn! I didn't notice that. I had meant to comment out the call to add(i,j,N)". Stupid mistake. Thanks for pointing it out. It works now.</description>
      <pubDate>Wed, 20 Oct 2010 14:47:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/munmap-chunk-invalid-pointer/m-p/803707#M3264</guid>
      <dc:creator>kkarco2</dc:creator>
      <dc:date>2010-10-20T14:47:44Z</dc:date>
    </item>
  </channel>
</rss>

