<?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 Replacing a comment with a in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146195#M138623</link>
    <description>&lt;P&gt;Replacing a comment with a single space is the standard behaviour for the C preprocessor.&amp;nbsp; A vendor specific "Fortran preprocessor" may have different rules, but then it is vendor specific.&lt;/P&gt;

&lt;P&gt;The dummy argument for the right hand side in the defined assignment having the pointer attribute is an error with that source.&lt;/P&gt;

&lt;P&gt;The approach taken with this code assumes that a uniquely named module will be generated for each type - when you delete the &lt;CODE class="plain"&gt;/**/SHORTNAME part you break that assumption.&amp;nbsp; &lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain"&gt;You might be able to chop the module statement out of the fhash.f90 file, and set up the naming yourself, i.e.&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;....

module you_choose_the_name_manually
! Delete the opening module statement out of the included file
#include "fhash.f90"

...&lt;/PRE&gt;

&lt;P&gt;I prefer to just avoid the preprocessor, and rely instead on Fortran INCLUDE and use statement renaming for this sort of stuff, but there are some limitations.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 09:43:44 GMT</pubDate>
    <dc:creator>IanH</dc:creator>
    <dc:date>2018-06-26T09:43:44Z</dc:date>
    <item>
      <title>Problems compiling preprocessor code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146194#M138622</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm investigating to use a hash map implementation I found on github (https://github.com/jl2922/fhash).&lt;BR /&gt;
	The project -as is- compiles fine on my linux machine using gfortran.&lt;/P&gt;

&lt;P&gt;If I add the relevant files to an empty intel visual fortran project, enable preprocessing the compiler produces lots of errors all around lines like the following:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;public :: fhash_type__/**/SHORTNAME&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://github.com/jl2922/fhash/blob/master/fhash.f90#L21" target="_blank"&gt;https://github.com/jl2922/fhash/blob/master/fhash.f90#L21&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It seems that the preprocessor includes a whitespace:&lt;BR /&gt;
	&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;error #5082: Syntax error, found IDENTIFIER 'INTS_DOUBLE' when expecting one of: , (/ ( &amp;lt;END-OF-STATEMENT&amp;gt; ;&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;&amp;nbsp; public :: fhash_type__ ints_double&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;If I remove all "&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px;"&gt;/**/&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;" , the compiler produces only 5 errors, all of them being "&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em;"&gt;The procedure whose second dummy argument has the ALLOCATABLE or POINTER attribute cannot be invoked via defined assignment (=) [INTS_PTR_ASSIGN]"&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;If I change the defined assignment function to not use pointer assingment, the project still does not compile because now there are two of this errors&amp;nbsp;&lt;/P&gt;

&lt;PRE style="color: rgb(0, 0, 0);"&gt;error #5509: Declaration of module 'FHASH_MODULE__SHORTNAME' conflicts with a previous declaration
module fhash_module__SHORTNAME&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I'm&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif;"&gt;Compiling with Intel(R) Visual Fortran Compiler 18.0.2.185 [IA-32]...&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Felix&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 06:46:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146194#M138622</guid>
      <dc:creator>fobermaier</dc:creator>
      <dc:date>2018-06-26T06:46:53Z</dc:date>
    </item>
    <item>
      <title>Replacing a comment with a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146195#M138623</link>
      <description>&lt;P&gt;Replacing a comment with a single space is the standard behaviour for the C preprocessor.&amp;nbsp; A vendor specific "Fortran preprocessor" may have different rules, but then it is vendor specific.&lt;/P&gt;

&lt;P&gt;The dummy argument for the right hand side in the defined assignment having the pointer attribute is an error with that source.&lt;/P&gt;

&lt;P&gt;The approach taken with this code assumes that a uniquely named module will be generated for each type - when you delete the &lt;CODE class="plain"&gt;/**/SHORTNAME part you break that assumption.&amp;nbsp; &lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain"&gt;You might be able to chop the module statement out of the fhash.f90 file, and set up the naming yourself, i.e.&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;....

module you_choose_the_name_manually
! Delete the opening module statement out of the included file
#include "fhash.f90"

...&lt;/PRE&gt;

&lt;P&gt;I prefer to just avoid the preprocessor, and rely instead on Fortran INCLUDE and use statement renaming for this sort of stuff, but there are some limitations.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 09:43:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146195#M138623</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2018-06-26T09:43:44Z</dc:date>
    </item>
    <item>
      <title>I was able to follow your</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146196#M138624</link>
      <description>&lt;P&gt;I was able to follow your advice and make the precompiler fhash.f90 in the specific type modules.&lt;/P&gt;

&lt;P&gt;The code compiles all right, works all right but compared to the original benchmark in fhash_test.f90 it takes more than twice as long.&lt;BR /&gt;
	Any idea what could be the cause for this?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:29:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Problems-compiling-preprocessor-code/m-p/1146196#M138624</guid>
      <dc:creator>fobermaier</dc:creator>
      <dc:date>2018-06-27T13:29:45Z</dc:date>
    </item>
  </channel>
</rss>

