<?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 BLOCK DATA in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741637#M1069</link>
    <description>hi ,&lt;BR /&gt;&lt;BR /&gt;i'm new to fortran and hope any of you could help me.&lt;BR /&gt;&lt;BR /&gt;i'm involved in modifiying an exisiting fortran code ( using ifort in fedora)&lt;BR /&gt;&lt;BR /&gt;I'm using multiple source files and when complied it gives no error. &lt;BR /&gt;when object files are linked it gives the following error.&lt;BR /&gt;&lt;BR /&gt;k2lib/hklib.o:(.data+0x0): multiple definition of `lek_'&lt;BR /&gt;k2lib/fuelib.o:(.bss+0x0): first defined here&lt;BR /&gt;&lt;BR /&gt;and i have shown here the files associated in error.&lt;BR /&gt;&lt;BR /&gt;the content of the file 1&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;block data fuelib&lt;BR /&gt;&lt;BR /&gt; include 'main.h'&lt;BR /&gt; &lt;BR /&gt; integer n&lt;BR /&gt; data (hk(n,1),n=1,51) / 51*0.0 /&lt;BR /&gt;&lt;BR /&gt; end&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;content of the file 2&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;block data hklib&lt;BR /&gt;&lt;BR /&gt; include 'main.h'&lt;BR /&gt; integer n&lt;BR /&gt;&lt;BR /&gt; data (hk(n,2),n=1,51) /-2.075,-1.381,-.685,.013,.724,1.455,2.21,2.&lt;BR /&gt; 1 988,3.786,4.6,5.427,6.266,7.114,7.971,8.835,9.706,10.583,11.465,1&lt;BR /&gt; 2 2.354,13.249,14.149,15.054,15.966,16.882,17.804,18.732,19.664,20.&lt;BR /&gt; 3 602,21.545,22.493,23.446,24.403,25.365,26.331,27.302,28.276,29.25&lt;BR /&gt; 4 4,30.236,31.221,32.209,33.201,34.196,35.193,36.193,37.196,38.201,&lt;BR /&gt; 5 39.208,40.218,41.229,42.242,43.257/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data (hk(n,3),n=1,51) / values same as above .../&lt;BR /&gt;data (hk(n,2),n=1,51) /bvalues same as above .../&lt;BR /&gt;....... &lt;BR /&gt;&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;----------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;notes : in the header file main.h the array has difined as shown below &lt;BR /&gt;&lt;BR /&gt;real*8 	   ek,eliq,pvap,visliq,hk(51,lnsp),hlat0(51)&lt;BR /&gt; common /lek/ ek(51,lnsp),eliq(51),pvap(lvap),visliq(lvap)&lt;BR /&gt; equivalence (ek,hk),(eliq,hlat0)&lt;BR /&gt;&lt;BR /&gt;** values for lnsp etc have been assigned appropriately&lt;BR /&gt;&lt;BR /&gt;also , if i comment the data statements in file 2 it works fine.&lt;BR /&gt;&lt;BR /&gt;therefore i guess this a problem as they are difned in 2 files . but i can not change that since the array is called by many of other routines included in many other multiple files.&lt;BR /&gt;&lt;BR /&gt;I really appricitae your help in this&lt;BR /&gt;&lt;BR /&gt;thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 25 Nov 2009 13:44:15 GMT</pubDate>
    <dc:creator>chat1983</dc:creator>
    <dc:date>2009-11-25T13:44:15Z</dc:date>
    <item>
      <title>BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741637#M1069</link>
      <description>hi ,&lt;BR /&gt;&lt;BR /&gt;i'm new to fortran and hope any of you could help me.&lt;BR /&gt;&lt;BR /&gt;i'm involved in modifiying an exisiting fortran code ( using ifort in fedora)&lt;BR /&gt;&lt;BR /&gt;I'm using multiple source files and when complied it gives no error. &lt;BR /&gt;when object files are linked it gives the following error.&lt;BR /&gt;&lt;BR /&gt;k2lib/hklib.o:(.data+0x0): multiple definition of `lek_'&lt;BR /&gt;k2lib/fuelib.o:(.bss+0x0): first defined here&lt;BR /&gt;&lt;BR /&gt;and i have shown here the files associated in error.&lt;BR /&gt;&lt;BR /&gt;the content of the file 1&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;block data fuelib&lt;BR /&gt;&lt;BR /&gt; include 'main.h'&lt;BR /&gt; &lt;BR /&gt; integer n&lt;BR /&gt; data (hk(n,1),n=1,51) / 51*0.0 /&lt;BR /&gt;&lt;BR /&gt; end&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;content of the file 2&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;block data hklib&lt;BR /&gt;&lt;BR /&gt; include 'main.h'&lt;BR /&gt; integer n&lt;BR /&gt;&lt;BR /&gt; data (hk(n,2),n=1,51) /-2.075,-1.381,-.685,.013,.724,1.455,2.21,2.&lt;BR /&gt; 1 988,3.786,4.6,5.427,6.266,7.114,7.971,8.835,9.706,10.583,11.465,1&lt;BR /&gt; 2 2.354,13.249,14.149,15.054,15.966,16.882,17.804,18.732,19.664,20.&lt;BR /&gt; 3 602,21.545,22.493,23.446,24.403,25.365,26.331,27.302,28.276,29.25&lt;BR /&gt; 4 4,30.236,31.221,32.209,33.201,34.196,35.193,36.193,37.196,38.201,&lt;BR /&gt; 5 39.208,40.218,41.229,42.242,43.257/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data (hk(n,3),n=1,51) / values same as above .../&lt;BR /&gt;data (hk(n,2),n=1,51) /bvalues same as above .../&lt;BR /&gt;....... &lt;BR /&gt;&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;----------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;notes : in the header file main.h the array has difined as shown below &lt;BR /&gt;&lt;BR /&gt;real*8 	   ek,eliq,pvap,visliq,hk(51,lnsp),hlat0(51)&lt;BR /&gt; common /lek/ ek(51,lnsp),eliq(51),pvap(lvap),visliq(lvap)&lt;BR /&gt; equivalence (ek,hk),(eliq,hlat0)&lt;BR /&gt;&lt;BR /&gt;** values for lnsp etc have been assigned appropriately&lt;BR /&gt;&lt;BR /&gt;also , if i comment the data statements in file 2 it works fine.&lt;BR /&gt;&lt;BR /&gt;therefore i guess this a problem as they are difned in 2 files . but i can not change that since the array is called by many of other routines included in many other multiple files.&lt;BR /&gt;&lt;BR /&gt;I really appricitae your help in this&lt;BR /&gt;&lt;BR /&gt;thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 13:44:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741637#M1069</guid>
      <dc:creator>chat1983</dc:creator>
      <dc:date>2009-11-25T13:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741638#M1070</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Compilers which reject multiple BLOCK DATA initializations are correct. As only one of them could take effect, even with a compiler which accepted it, you must eliminate (or comment out) the unwanted one.&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 13:50:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741638#M1070</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-11-25T13:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741639#M1071</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;I might add to Tim's comment that if you have two subroutines, each initializing the same named array, this may be in indication the each of the subroutines believe they are the only subroutines using that array. What this may mean, in some cases, the second routine called may have as its first time call data, data that has been modified since it was initialized but before the first run of the second subroutine. This may or may not be a problem. You have to look at this on a case by case basis. &lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 14:07:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741639#M1071</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-11-25T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741640#M1072</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/367365"&gt;tim18&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; Compilers which reject multiple BLOCK DATA initializations are correct. As only one of them could take effect, even with a compiler which accepted it, you must eliminate (or comment out) the unwanted one.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;thanks alot for your reply,&lt;BR /&gt;&lt;BR /&gt; could you pls explain your ans. ) and i'd lke to add these as well&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; in file 1,&lt;BR /&gt; data (hk(n,1),n=1,51) / 51*0.0 /&lt;BR /&gt;&lt;BR /&gt; file 2 &lt;BR /&gt; data (hk(n,2),n=1,51) /-2.075,-1.381,-.685,.013,.724,1.455,2.21,2.........&lt;BR /&gt;&lt;BR /&gt;here ,in both files it assigns the values for same array but different locations.&lt;BR /&gt;&lt;BR /&gt;hence no unwanted parts. &lt;BR /&gt;&lt;BR /&gt;also this is from a part of standard program ( but little bit old) .&lt;BR /&gt;&lt;BR /&gt;cheers!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 14:54:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741640#M1072</guid>
      <dc:creator>chat1983</dc:creator>
      <dc:date>2009-11-25T14:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741641#M1073</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
It is an unusual extension to support initializing different parts of an array in multiple BLOCK DATA procedures, and I would have doubts about the extent to which it was validated, even by a compiler which allows it. Definitely not a standard program.&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 16:06:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741641#M1073</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-11-25T16:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741642#M1074</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/453922"&gt;chat1983&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;also this is from a part of standard program ( but little bit old) .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;The program is non-standard. The standard says:&lt;BR /&gt;&lt;BR /&gt;"The same named common block shall not be specified in more than one block data program unit in a program."&lt;BR /&gt;&lt;BR /&gt;I could imagine an implementation that allowed this to work, but Intel's doesn't.&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2009 17:08:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741642#M1074</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-11-25T17:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: BLOCK DATA</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741643#M1075</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;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;The program is non-standard. The standard says:&lt;BR /&gt;&lt;BR /&gt;"The same named common block shall not be specified in more than one block data program unit in a program."&lt;BR /&gt;&lt;BR /&gt;I could imagine an implementation that allowed this to work, but Intel's doesn't.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;yep, u guys are right. I found that this is not the exact std program. std one is in a one single file. this is a split version of it. i trasfered the body of file 2 in to file 1 and made the array assignment in a file. now that rouitne works fine.&lt;BR /&gt;&lt;BR /&gt;thanks alot for you guys&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Nov 2009 14:26:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/BLOCK-DATA/m-p/741643#M1075</guid>
      <dc:creator>chat1983</dc:creator>
      <dc:date>2009-11-26T14:26:56Z</dc:date>
    </item>
  </channel>
</rss>

