<?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 Calling FFTW3 by Fortran with MPI, types of variables by using iso_c_binding in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-FFTW3-by-Fortran-with-MPI-types-of-variables-by-using/m-p/1079783#M22740</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am working on a complicated fortran code, which uses MPI and calls FFTW3 functions directly.&lt;/P&gt;

&lt;P&gt;As FFTW3 manual pdf file says, the integer is replaced by integer(c_intptr_t), the complex becomes complex(c_double_complex). What's the difference between integer type and&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;integer(c_intptr_t) type data (also the difference between complex and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;complex(c_double_complex)&amp;nbsp;)? Whether I can use&amp;nbsp;integer(c_intptr_t) the same as integer, or vice versa? Moreover, can I pass values to each other?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;For example,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;integer :: a&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;integer(c_intptr_t) :: b&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;a=1&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;b=a&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;What's the value and type of b now?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2017 21:53:49 GMT</pubDate>
    <dc:creator>dyun</dc:creator>
    <dc:date>2017-01-25T21:53:49Z</dc:date>
    <item>
      <title>Calling FFTW3 by Fortran with MPI, types of variables by using iso_c_binding</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-FFTW3-by-Fortran-with-MPI-types-of-variables-by-using/m-p/1079783#M22740</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am working on a complicated fortran code, which uses MPI and calls FFTW3 functions directly.&lt;/P&gt;

&lt;P&gt;As FFTW3 manual pdf file says, the integer is replaced by integer(c_intptr_t), the complex becomes complex(c_double_complex). What's the difference between integer type and&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;integer(c_intptr_t) type data (also the difference between complex and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;complex(c_double_complex)&amp;nbsp;)? Whether I can use&amp;nbsp;integer(c_intptr_t) the same as integer, or vice versa? Moreover, can I pass values to each other?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;For example,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;integer :: a&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;integer(c_intptr_t) :: b&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;a=1&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;b=a&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;What's the value and type of b now?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:53:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-FFTW3-by-Fortran-with-MPI-types-of-variables-by-using/m-p/1079783#M22740</guid>
      <dc:creator>dyun</dc:creator>
      <dc:date>2017-01-25T21:53:49Z</dc:date>
    </item>
    <item>
      <title>In general, pointers and</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-FFTW3-by-Fortran-with-MPI-types-of-variables-by-using/m-p/1079784#M22741</link>
      <description>&lt;P&gt;In general, pointers and integers are different kinds of integers and should not be mixed. The distinctions may be based on storage size (i.e., 4, 8, etc. bytes), signed/unsigned (from the C point of view) and the restrictions on what can be done with/to pointers versus integers. The C_INTPTR_T of Fortran is the same as the intptr_t type of C.&lt;/P&gt;

&lt;P&gt;Here is a small test program that you can run in your environment to establish storage sizes.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program tst
use iso_c_binding
integer :: i4
integer(8) :: i8
integer(c_intptr_t) :: ix
!
write(*,*)sizeof(i4),sizeof(i8),sizeof(ix)
end program&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:15:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Calling-FFTW3-by-Fortran-with-MPI-types-of-variables-by-using/m-p/1079784#M22741</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-01-27T12:15:07Z</dc:date>
    </item>
  </channel>
</rss>

