<?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 -assume nounderscore is in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125777#M132858</link>
    <description>&lt;P&gt;-assume nounderscore is probably the best bet for now. Adding interface blocks with BIND(C) is a lot more work, and may create other issues if some of the interfaces aren't "interoperable".&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2019 14:30:49 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2019-04-12T14:30:49Z</dc:date>
    <item>
      <title>Trying to link gcc and ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125773#M132854</link>
      <description>&lt;P&gt;I am trying to compile a complex ocean model with many dependencies and I need to link a set of c and fortran libraries that are being compiled with gcc.&amp;nbsp; From my understanding, the issue stems from ifort (and mpifort compiled with ifort) is looking for the libraries to have an underscore appended on both ends of the library name.&amp;nbsp;The issue is that gcc is compiling the libraries with only one underscore preappended to the front of the object name.&amp;nbsp; I have attempted to use -assume nounderscore compiler option, which works for these libraries but all the other dependencies (e.g. mpich, netcdf) then dont work.&amp;nbsp; I can't post all the code because it is too much, but I will give a sample output from listing the name of the c objects created using gcc, and also the error upon compilation of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;dates.o:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; U _FORT_Init&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000006f0 T _Jul_DUTCofJDN&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000000 T _Jul_DUTCofYMD&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000100 t _Jul_FixYM&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000300 t _Jul_GregYMDofJDN&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000005a0 T _Jul_Gregorian&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000610 T _Jul_IsLeapYear&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000710 T _Jul_JDNofDUTC&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000180 t _Jul_JDNofGregYMD&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000220 t _Jul_JDNofJulYMD&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000420 t _Jul_JulYMDofJDN&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000006a0 T _Jul_MonthDays&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000530 T _Jul_YDofDUTC&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000290 T _Jul_YMDofDUTC&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000660 T _Jul_YearDays&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000008d0 T _fjul_dutcofjdn&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000730 T _fjul_dutcofymd&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000007f0 T _fjul_gregorian&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000830 T _fjul_isleapyear&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000900 T _fjul_jdnofdutc&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000008a0 T _fjul_monthdays&lt;/P&gt;&lt;P&gt;&amp;nbsp;00000000000007b0 T _fjul_ydofdutc&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000870 T _fjul_yeardays&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000770 T _fjul_ymdofdutc&lt;/P&gt;&lt;P&gt;&amp;nbsp;000000000000092c d _gregorian_day&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000930 d _gregorian_dutc&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000928 d _gregorian_month&lt;/P&gt;&lt;P&gt;&amp;nbsp;0000000000000924 d _gregorian_year&lt;/P&gt;&lt;P&gt;Undefined symbols for architecture x86_64:&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_dutcoftai_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_write_datetime_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_formatpds_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_write_datetime_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_mjdoftai_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_read_datetime_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_parsedt_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_read_datetime_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_parsetime_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_read_time_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_taiofdutc_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_read_datetime_ in mod_time.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_taiofmjd_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _mod_time_mp_write_datetime_ in mod_time.o&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 23:44:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125773#M132854</guid>
      <dc:creator>Clark__Blake</dc:creator>
      <dc:date>2019-04-09T23:44:09Z</dc:date>
    </item>
    <item>
      <title>This is always a difficult</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125774#M132855</link>
      <description>&lt;P&gt;This is always a difficult business. It works out of the box if code is written in the correct way, namely using bind(C). Otherwise use the same Fortran compiler for all of the Fortran code.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 19:49:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125774#M132855</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2019-04-10T19:49:50Z</dc:date>
    </item>
    <item>
      <title>The trailing underscore is a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125775#M132856</link>
      <description>&lt;P&gt;The trailing underscore is a Linux/UNIX convention for Fortran routine decoration. If you're calling C routines, you're best off to declare them with BIND(C) as Juergen recommends. Don't try mixing ifort and gfortran code.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 20:03:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125775#M132856</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2019-04-10T20:03:29Z</dc:date>
    </item>
    <item>
      <title>Where does this BIND(C) go</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125776#M132857</link>
      <description>&lt;P&gt;Where does this BIND(C) go within the code/makefile?&lt;/P&gt;&lt;P&gt;As it stands now, I am able to compile the test fortran program that calls the library using the &lt;STRONG&gt;-assume nounderscore &lt;/STRONG&gt;option for&amp;nbsp;ifort, and I have installed a trial version of icc to test if I can make it work without that option.&amp;nbsp; It still gives the same error when trying to link the test program and the library.&amp;nbsp; So compiling with icc and ifort still gives the same error as gcc and ifort.&amp;nbsp;Below is the error message and the build script&lt;/P&gt;&lt;P&gt;here is the error message:&lt;/P&gt;&lt;P&gt;Undefined symbols for architecture x86_64:&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_etoftai_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _MAIN__ in ifortmBWvGW.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_jdoftai_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _MAIN__ in ifortmBWvGW.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_mjdoftai_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _MAIN__ in ifortmBWvGW.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_fjul_taiofdutc_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _MAIN__ in ifortmBWvGW.o&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_formatdate_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_formatdate_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_formatpds_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_formatpds_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_formatsql_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_formatsql_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_formattime_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_formattime_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_initleaps_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_initleaps_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_parsedate_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_parsedate_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_parsedt_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_parsedt_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;&amp;nbsp; "_gjul_parsetime_", referenced from:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _fjul_parsetime_ in libjulian.a(fjulian.o)&lt;/P&gt;&lt;P&gt;ld: symbol(s) not found for architecture x86_64&lt;/P&gt;&lt;P&gt;and this is the contents of the script used to build it.&lt;/P&gt;&lt;P&gt;icc -c \&lt;BR /&gt;dates.c \&lt;BR /&gt;format.c \&lt;BR /&gt;juldates.c \&lt;BR /&gt;leapsecs.c \&lt;BR /&gt;parse.c \&lt;BR /&gt;seconds.c \&lt;BR /&gt;tai_et.c \&lt;BR /&gt;utc_tai.c -c&lt;BR /&gt;ifort -c fjulian.for&lt;/P&gt;&lt;P&gt;icc -c fortran.c rlerrors.c rlmemory.c&amp;nbsp;&lt;BR /&gt;ifort -c fstrings.for&lt;/P&gt;&lt;P&gt;ar crv libjulian.a \&lt;BR /&gt;dates.o \&lt;BR /&gt;format.o \&lt;BR /&gt;juldates.o \&lt;BR /&gt;leapsecs.o \&lt;BR /&gt;parse.o \&lt;BR /&gt;seconds.o \&lt;BR /&gt;tai_et.o \&lt;BR /&gt;utc_tai.o \&lt;BR /&gt;fjulian.o \&lt;BR /&gt;fortran.o \&lt;BR /&gt;rlerrors.o \&lt;BR /&gt;rlmemory.o \&lt;BR /&gt;fstrings.o \&lt;/P&gt;&lt;P&gt;ranlib libjulian.a&lt;/P&gt;&lt;P&gt;#rm *.o&lt;BR /&gt;ifort &amp;nbsp;-o tconvert tconvert.for libjulian.a&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 13:49:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125776#M132857</guid>
      <dc:creator>Clark__Blake</dc:creator>
      <dc:date>2019-04-12T13:49:55Z</dc:date>
    </item>
    <item>
      <title>-assume nounderscore is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125777#M132858</link>
      <description>&lt;P&gt;-assume nounderscore is probably the best bet for now. Adding interface blocks with BIND(C) is a lot more work, and may create other issues if some of the interfaces aren't "interoperable".&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 14:30:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125777#M132858</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2019-04-12T14:30:49Z</dc:date>
    </item>
    <item>
      <title>I should also add that I was</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125778#M132859</link>
      <description>&lt;P&gt;I should also add that I was able to get this to compile completely on a Linux machine with Intel&amp;nbsp;mpiifort and mpicc.&lt;/P&gt;&lt;P&gt;I am having the issues on a MacOS using mpich that was built with the most recent versions of icc and ifort.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is I can get the julian libraries successfully built with -assume nounderscore, but when I try and compile the main ocean model code it gives the same, previous error.&amp;nbsp; Furthermore, if I use -assume no underscore for the main code, then it gives errors for tons of other functions related to mpi and netcdf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 15:03:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125778#M132859</guid>
      <dc:creator>Clark__Blake</dc:creator>
      <dc:date>2019-04-12T15:03:45Z</dc:date>
    </item>
    <item>
      <title>Which previous error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125779#M132860</link>
      <description>&lt;P&gt;Which previous error?&lt;/P&gt;&lt;P&gt;All the various sources need to be built so that they agree on name decoration. A lot of C libraries intended for use with Fortran have conditional code to adjust for how particular Fortran compilers do the decoration.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:21:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trying-to-link-gcc-and-ifort/m-p/1125779#M132860</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2019-04-12T17:21:30Z</dc:date>
    </item>
  </channel>
</rss>

