<?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 items in common are zero in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843824#M61793</link>
    <description>We are new to the Compaq Visual Fortran (CVF) Compiler and have found something that we can't explain. We are merging 2 programs together with all data transfer between them via a shared common block. We are linking an object (from Program A) provided by CVF developer A with another 3 objects from Program B provided by CVF developer B.  The developers do not share their source code. As noted, the programs share a common block (via include) which contains all of the variables needed to pass back and forth between programs.  The group A and B objects are linked by CVF developer A and an program executable is created. Upon execution, Program A initializes two variables in the shared common (an integer*4 and a character*180) to specific non-zero values, then calls Program B as a subroutine.  When Program B prints these variables, they are both zero (as if they have been reset to zero).&lt;BR /&gt;&lt;BR /&gt;We have done some similar tests linking 2 small test program object files with this same ?shared common? method of passing variables and it seems to work fine.    Developer A has also successfully tested this approach using a small callable ?dummy? version of Program B (that returns some dummy variables back just like Program B would have).  Similarly,  Developer B has successfully tested this approach using a small dummy ?caller? version of Program A (that sends  some dummy variables like Program A would have).&lt;BR /&gt;&lt;BR /&gt;Has anyone encountered this before? What could we be missing?  Any ideas/suggestions are welcome.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
    <pubDate>Sat, 22 Jun 2002 06:03:40 GMT</pubDate>
    <dc:creator>jameshart</dc:creator>
    <dc:date>2002-06-22T06:03:40Z</dc:date>
    <item>
      <title>items in common are zero</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843824#M61793</link>
      <description>We are new to the Compaq Visual Fortran (CVF) Compiler and have found something that we can't explain. We are merging 2 programs together with all data transfer between them via a shared common block. We are linking an object (from Program A) provided by CVF developer A with another 3 objects from Program B provided by CVF developer B.  The developers do not share their source code. As noted, the programs share a common block (via include) which contains all of the variables needed to pass back and forth between programs.  The group A and B objects are linked by CVF developer A and an program executable is created. Upon execution, Program A initializes two variables in the shared common (an integer*4 and a character*180) to specific non-zero values, then calls Program B as a subroutine.  When Program B prints these variables, they are both zero (as if they have been reset to zero).&lt;BR /&gt;&lt;BR /&gt;We have done some similar tests linking 2 small test program object files with this same ?shared common? method of passing variables and it seems to work fine.    Developer A has also successfully tested this approach using a small callable ?dummy? version of Program B (that returns some dummy variables back just like Program B would have).  Similarly,  Developer B has successfully tested this approach using a small dummy ?caller? version of Program A (that sends  some dummy variables like Program A would have).&lt;BR /&gt;&lt;BR /&gt;Has anyone encountered this before? What could we be missing?  Any ideas/suggestions are welcome.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Sat, 22 Jun 2002 06:03:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843824#M61793</guid>
      <dc:creator>jameshart</dc:creator>
      <dc:date>2002-06-22T06:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: items in common are zero</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843825#M61794</link>
      <description>Here's what I would do.  In "program A", print out LOC(common-variable-name).  In "program B", do the same.  See if you get the same value printed in both parts of the application.  If you don't, then a link map, searching for the common name, might be enlightening.&lt;BR /&gt;&lt;BR /&gt;Either your two parts of the program really aren't sharing the common, or your code violates the Fortran standard in a way that makes the compiler think it doesn't need to fetch from the common (for example, if you pass the common variable as an argument and reference it both ways.)&lt;BR /&gt;&lt;BR /&gt;I wonder if the two sets of objects are being compiled with different switch settings - for example, if one was compiled with /names:lowercase and the other wasn't, you'd get two sets of commons.  The link map would tell you this. (Project..Settings..Link..Generate map file)&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sat, 22 Jun 2002 07:11:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843825#M61794</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2002-06-22T07:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: items in common are zero</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843826#M61795</link>
      <description>Steve; &lt;BR /&gt;&lt;BR /&gt;Some of the parameters used to size things in the common from program A were different than those used to size things in the common for program B - whiched caused a major misalignment.&lt;BR /&gt;&lt;BR /&gt;Also, we did have to change to /names:lowercase.&lt;BR /&gt;&lt;BR /&gt;Thanks for your suggestions.&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Thu, 27 Jun 2002 07:34:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/items-in-common-are-zero/m-p/843826#M61795</guid>
      <dc:creator>jameshart</dc:creator>
      <dc:date>2002-06-27T07:34:07Z</dc:date>
    </item>
  </channel>
</rss>

