<?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 Re: Passing character args from C++ to Fortran with 64-bit buil in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864713#M70319</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You declared the character lengths as "int" in C. They need to be an "address-sized int".&lt;BR /&gt;</description>
    <pubDate>Fri, 11 Dec 2009 00:31:30 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2009-12-11T00:31:30Z</dc:date>
    <item>
      <title>Passing character args from C++ to Fortran with 64-bit build</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864712#M70318</link>
      <description>In the attached (64-bit build) solution, I am passing C++ character strings into FORTRAN by passing a char* and int.&lt;BR /&gt;Inside the FORTRAN (at line 12), I set a substring of one of the arguments to some value.&lt;BR /&gt;What I would like to know is this:&lt;BR /&gt;Why do I get the following error message when the /check:bounds option is on?&lt;BR /&gt;The error message is: forrtl: severe (408): fort: (19): Dummy character variable 'HERR' has length 255 which is greater then actual variable length -3689348818177883905&lt;BR /&gt;This error did not happen with a 32-bit build. Why the long negative integer? Is it a compiler bug?&lt;BR /&gt;I am using IVF 11.1.051 (w_cprof_p_11.1.051)</description>
      <pubDate>Fri, 11 Dec 2009 00:13:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864712#M70318</guid>
      <dc:creator>John6</dc:creator>
      <dc:date>2009-12-11T00:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864713#M70319</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You declared the character lengths as "int" in C. They need to be an "address-sized int".&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 00:31:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864713#M70319</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-11T00:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864714#M70320</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/336209"&gt;Steve Lionel (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;You declared the character lengths as "int" in C. They need to be an "address-sized int".&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Shouldn't size_t work? I've had a customer who refused to work with a compiler where size_t and int weren't the same, but that rules out 64-bit Windows for sure.&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 02:21:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864714#M70320</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-12-11T02:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864715#M70321</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
size_t usually works, but I think intptr_t is more "correct".&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 14:33:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864715#M70321</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-12-11T14:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864716#M70322</link>
      <description>&lt;DIV style="margin:0px;"&gt;Thanks Steve. The intptr_t works perfectly with all builds. I will use this as my standard for passing C++ strings to FORTRAN.&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 16:15:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864716#M70322</guid>
      <dc:creator>John6</dc:creator>
      <dc:date>2009-12-11T16:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864717#M70323</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;I am getting the very same error as described above however I have not been able to implement the suggested solution.&lt;/P&gt;
&lt;P&gt;The following line is where I'm getting the error. This works successfully in x32.&lt;/P&gt;
&lt;P&gt;DPBSV("U", &amp;amp;n,&amp;amp;kd,&amp;amp;nrhs,Aptr,&amp;amp;ldA,Xptr,&amp;amp;ldB,&amp;amp;info);&lt;/P&gt;
&lt;P&gt;I would be grateful if someone could post an example of the code utilising intptr_t.&lt;/P&gt;
&lt;P&gt;Kind Regards,&lt;/P&gt;
&lt;P&gt;Shane&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2010 11:33:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864717#M70323</guid>
      <dc:creator>shanemoneill</dc:creator>
      <dc:date>2010-03-02T11:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864718#M70324</link>
      <description>&lt;P&gt;If you have a recent copy of Intel C, the header file is provided:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;void DPBSV( char* uplo, MKL_INT* n, MKL_INT* kd, MKL_INT* nrhs, double* ab, MKL&lt;BR /&gt;_INT* ldab, double* b, MKL_INT* ldb, MKL_INT* info );&lt;/P&gt;
&lt;P&gt;(#define MKL_INT int for the case where you use default integers in Fortran)&lt;/P&gt;
&lt;P&gt;It's OK when using the standard Fortran source for this function to omit the string length argument. If you wish to access the length of uplo, which the standard code doesn't do, the string length is appended to the argument list.&lt;/P&gt;
&lt;P&gt;void DPBSV( char* uplo, MKL_INT* n, MKL_INT* kd, MKL_INT* nrhs, double*  ab, MKL&lt;BR /&gt; _INT* ldab, double* b, MKL_INT* ldb, MKL_INT* info, MKL_INT *uplo_len );&lt;/P&gt;
&lt;P&gt;MKL_INT uplo_len = 1;&lt;/P&gt;
&lt;P&gt;DPBSV("U",  &amp;amp;n,&amp;amp;kd,&amp;amp;nrhs,Aptr,&amp;amp;ldA,Xptr,&amp;amp;ldB,&amp;amp;info,&amp;amp;uplo_len);&lt;/P&gt;
&lt;P&gt;As the standard Fortran source doesn't handle the interface, and by default you have disagreement between the names used in Fortran and C (unless using Windows), you might consider adding the iso_c_binding declaration on the Fortran side, but that suppresses the hidden length argument.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2010 14:01:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864718#M70324</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-03-02T14:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Passing character args from C++ to Fortran with 64-bit buil</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864719#M70325</link>
      <description>&lt;P&gt;Thanks Tim your suggestion helped alot!&lt;/P&gt;
&lt;P&gt;Kind Regards,&lt;/P&gt;
&lt;P&gt;Shane.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2010 08:33:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Passing-character-args-from-C-to-Fortran-with-64-bit-build/m-p/864719#M70325</guid>
      <dc:creator>shanemoneill</dc:creator>
      <dc:date>2010-03-03T08:33:25Z</dc:date>
    </item>
  </channel>
</rss>

