<?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: ifort+macosx+mpich2+libtools =&amp;gt; _$non_lazy_ptr in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749165#M6137</link>
    <description>We have determined what the issue is:&lt;BR /&gt;For ifort: One must initialize at least 1 declared common variable before using any of the variables in the module within a main program. Gfortran automatically initializes variables. This is the $non_lazy_ptr common variable conflict that the Mac OS X assembler documentation refers to (read the book...;). It seems that if 1 used common variable is initialized, then the ifort compiler initializes the rest to default values. We have some sample code to demonstrate this (requires use of libraries):&lt;BR /&gt;&lt;BR /&gt; module lazyptr_private&lt;BR /&gt; implicit none&lt;BR /&gt; INTEGER, PARAMETER :: i4=SELECTED_INT_KIND(9)&lt;BR /&gt;&lt;BR /&gt; integer(i4) :: test3&lt;BR /&gt; real :: test4&lt;BR /&gt; real*8 :: test5&lt;BR /&gt; character*8 :: test6&lt;BR /&gt; integer :: test10&lt;BR /&gt; integer :: test1&lt;BR /&gt; integer :: test2=0&lt;BR /&gt;&lt;BR /&gt; end module lazyptr_private&lt;BR /&gt;----------------------------&lt;BR /&gt; &lt;BR /&gt; SUBROUTINE test1sub&lt;BR /&gt; USE lazyptr_private&lt;BR /&gt;&lt;BR /&gt; write(*,*) "this is test1 = ",test1&lt;BR /&gt; test1=4&lt;BR /&gt; write(*,*) "this is test1 = ",test1&lt;BR /&gt; test2=2&lt;BR /&gt; write(*,*) "this is test2 = ",test2&lt;BR /&gt; test3=3&lt;BR /&gt; write(*,*) "this is test3 = ",test3&lt;BR /&gt; test4=4&lt;BR /&gt; write(*,*) "this is test4 = ",test4&lt;BR /&gt; write(*,*) "this is test5 = ",test5&lt;BR /&gt; test6='six'&lt;BR /&gt; write(*,*) "this is test6 = ",test6&lt;BR /&gt; test10=10&lt;BR /&gt; write(*,*) "this is test10 = ",test10&lt;BR /&gt;&lt;BR /&gt; END SUBROUTINE&lt;BR /&gt;----------------------------&lt;BR /&gt; PROGRAM lazyptr&lt;BR /&gt;&lt;BR /&gt; IMPLICIT NONE&lt;BR /&gt;&lt;BR /&gt; CALL test1sub&lt;BR /&gt; END PROGRAM&lt;BR /&gt;---------the Makefile vvv---------------&lt;BR /&gt;FC=ifort&lt;BR /&gt;#FC=gfortran&lt;BR /&gt;&lt;BR /&gt;all: lazyptr_test&lt;BR /&gt;&lt;BR /&gt;liblazyptr.a: lazyptr_sub.o lazyptr_private.o&lt;BR /&gt; libtool -o liblazyptr.a lazyptr_private.o lazyptr_sub.o&lt;BR /&gt;&lt;BR /&gt;lazyptr_test: lazyptr_test.o liblazyptr.a &lt;BR /&gt; $(FC) -o $(@) $(^)&lt;BR /&gt;&lt;BR /&gt;.f90.o:&lt;BR /&gt; $(FC) -c $(&amp;lt;)&lt;BR /&gt;&lt;BR /&gt;lazyptr_private.o: &lt;BR /&gt;lazyptr_sub.o: lazyptr_private.o&lt;BR /&gt;lazyptr_test.o: liblazyptr.a&lt;BR /&gt;&lt;BR /&gt;clean:&lt;BR /&gt; rm lazy*.o lazyptr_test lazy*.mod&lt;BR /&gt;&lt;BR /&gt;.SUFFIXES: .f90&lt;BR /&gt;---------------------------------&lt;BR /&gt;You can play with different combinations of initializations, which variables are used in the subroutine, and compiler. Mystery solved! Ifort will default initialize all uninitialized variables declared in a module for "common/global" use, only after you explicitly initialize any one or more variables, and make sure that variable is used in the program.&lt;BR /&gt;</description>
    <pubDate>Wed, 09 Jul 2008 22:32:18 GMT</pubDate>
    <dc:creator>srinath</dc:creator>
    <dc:date>2008-07-09T22:32:18Z</dc:date>
    <item>
      <title>ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749159#M6131</link>
      <description>I will admit that it is quite difficult to explain what I'm experiencing, but subsequent questions will help.&lt;BR /&gt;OS: Mac OS X 10.5.4&lt;BR /&gt;compiler: Ifort 10.1.15&lt;BR /&gt;MPICH: mpich2-1.0.7&lt;BR /&gt;libtool: Apple Computer, Inc. version cctools-667.3&lt;BR /&gt;&lt;BR /&gt;Using the autotools to build the project I can successfully build only with building shared libraries. If I try building with static libraries, variables that are common to modules get a "_$non_lazy_ptr" appended to their reference from the mpich wrappers for ifort before being sent to ld. This does not happen with a gfortran build of mpich2. The similar happenings occur with ifort/gfortran builds of OpenMPI. &lt;BR /&gt;&lt;BR /&gt;Searching on the interweb shows that the intel compiler on macs is the only one doing the appending of wierd symbols. Note: "nm-ing" the libraries reveal that there is no symbol with the "$" suffix.&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Jul 2008 19:52:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749159#M6131</guid>
      <dc:creator>srinath</dc:creator>
      <dc:date>2008-07-07T19:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749160#M6132</link>
      <description>I'm not sure if you are using Autoconf or the pre-packaged configure script with Mpich and OpenMPI. &lt;BR /&gt;&lt;BR /&gt;We have an OpenMPI doc at &lt;A href="http://support.intel.com/support/performancetools/sb/CS-026988.htm" target="_blank"&gt;http://support.intel.com/support/performancetools/sb/CS-026988.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I haven't tried mpich2 on a Mac lately. I've been pretty happy with OpenMPI. I'll give it a try and let you know what I find. Is there a reason you are forcing the static build and not creating the dynamic libs? &lt;BR /&gt;&lt;BR /&gt;What does your configure line look like for mpich - that will save me some time.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;ron&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Jul 2008 20:08:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749160#M6132</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2008-07-07T20:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749161#M6133</link>
      <description>I have been forcing static libraries builds because visual debuggers such as totalview seem to like it better than trying to traverse dynamically loaded libraries.&lt;BR /&gt;&lt;BR /&gt;The following is obliviously project specific, but may guide you:&lt;BR /&gt;&lt;I&gt;/bin/sh ../../libtool --mode=link /usr/local/openmpi/1.2.6rc2/ifort32/bin/mpif90 -autodouble -I ../../gyro/src/src -I ../../gyro/ORB -I ../../gyro/BLEND -I ../../gyro/math -I ../../gyro/TRANSPOSE -I ../../gyro/SSUB -I ../../gyro/GEO -I ../../gyro/UMFPACK -L/usr/local/lib -lrfftw -lfftw -framework Accelerate -framework Accelerate -g -o BigScience BigScience_globals.o get_inputpath.o BigScience.o ../../gyro/src/src/libgyro.la ../../gyro/src/ORB/libORB.la ../../gyro/src/BLEND/libBLEND.la ../../gyro/src/math/libgyromath.la ../../gyro/src/TRANSPOSE/libTRANSP.la ../../gyro/src/SSUB/libSSUB.la ../../gyro/src/GEO/libGEO.la ../../gyro/src/UMFPACK/libUMFPACK.la &lt;BR /&gt;mkdir .libs&lt;BR /&gt;/usr/local/openmpi/1.2.6rc2/ifort32/bin/mpif90 -autodouble -I ../../gyro/src/src -I ../../gyro/ORB -I ../../gyro/BLEND -I ../../gyro/math -I ../../gyro/TRANSPOSE -I ../../gyro/SSUB -I ../../gyro/GEO -I ../../gyro/UMFPACK -framework Accelerate -framework Accelerate -g -o BigScience BigScience_globals.o get_inputpath.o BigScience.o -L/usr/local/lib /usr/local/lib/librfftw.dylib /usr/local/lib/libfftw.dylib -lm ../../gyro/src/src/.libs/libgyro.a ../../gyro/src/ORB/.libs/libORB.a ../../gyro/src/BLEND/.libs/libBLEND.a ../../gyro/src/math/.libs/libgyromath.a ../../gyro/src/TRANSPOSE/.libs/libTRANSP.a ../../gyro/src/SSUB/.libs/libSSUB.a ../../gyro/src/GEO/.libs/libGEO.a ../../gyro/src/UMFPACK/.libs/libUMFPACK.a&lt;BR /&gt;&lt;/I&gt;&lt;BR /&gt;Also:&lt;BR /&gt;&lt;I&gt;srinath@proton:~$ automake --version&lt;BR /&gt;automake (GNU automake) 1.10&lt;BR /&gt;Written by Tom Tromey &lt;TROMEY&gt;&lt;BR /&gt; and Alexandre Duret-Lutz &lt;ADL&gt;.&lt;BR /&gt;&lt;BR /&gt;Copyright 2006 Free Software Foundation, Inc.&lt;BR /&gt;This is free software; see the source for copying conditions. There is NO&lt;BR /&gt;warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/ADL&gt;&lt;/TROMEY&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;srinath@proton:~$ autoconf --version&lt;BR /&gt;autoconf (GNU Autoconf) 2.61&lt;BR /&gt;Copyright (C) 2006 Free Software Foundation, Inc.&lt;BR /&gt;This is free software. You may redistribute copies of it under the terms of&lt;BR /&gt;the GNU General Public License &lt;&gt;.&lt;BR /&gt;There is NO WARRANTY, to the extent permitted by law.&lt;/&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;Written by David J. MacKenzie and Akim Demaille.&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;These have been upgraded from the cctools 667.3. Note: the newest autoconf does not play well with any of the newer automakes...GNU community is really dropping the ball on this....can anyone say SCONS? &lt;BR /&gt;</description>
      <pubDate>Mon, 07 Jul 2008 20:43:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749161#M6133</guid>
      <dc:creator>srinath</dc:creator>
      <dc:date>2008-07-07T20:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749162#M6134</link>
      <description>my search of the internal database only found some old references, old being v9.0 timeframe, for the C++ compiler on Linux - this seemed totally unrelated to what you are seeing. Further research on the web shows that the non_lazy_ptr is definitely a C++ symbol. Another interesting web find was that this only seems to affect Leopard, not Tiger nor Linux. Unfortunately, of the 2 pages of hits I searched from a search on 'non_lazy_ptr' there seems to be no clear solution, just a lot of vague handwaving and blaming Leopard. Also, this does not appear to be an Intel Fortran issue, as most of the hits had nothing to do with Fortran, except a curiously similar issue with LAM-MPI's interfaces to Fortran.&lt;BR /&gt;&lt;BR /&gt;Here is what I found to be the most definitive and interesting one:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.macosxhints.com/showthread.php?p=480533" target="_blank"&gt;http://forums.macosxhints.com/showthread.php?p=480533&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Note that this is strictly C++ compiled on Leopard with the recent C++ compiler. This thread implies that the newer Mac C++ compiler is not allowing static const double, which the older Mac C++ compilers allowed. Perhaps both LAM-MPI and MPICH2 are using this construct? Or perhaps your application is using this construct? It would be interesting for you to try installing an older Xcode 2.4 w/ compilers and tools and see if the problem persists.&lt;BR /&gt;&lt;BR /&gt;And our Fortran compiler does not use 'non_lazy_ptr' in any of it's symbol decoration, as your 'nm' has shown.&lt;BR /&gt;&lt;BR /&gt;I'll dig into the MPICH code a bit to see if I can find anything, but at this point I'm stumped.&lt;BR /&gt;&lt;BR /&gt;Other interesting web references:&lt;BR /&gt;&lt;BR /&gt;LAM-MPI plus Intel compilers , but Leopard and Xcode 3.0:&lt;BR /&gt;&lt;A href="http://www.lam-mpi.org/MailArchives/lam/2007/10/13457.php" target="_blank"&gt;http://www.lam-mpi.org/MailArchives/lam/2007/10/13457.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;A non-Intel, non-fortran case:&lt;BR /&gt;&lt;A href="http://newsgroups.derkeiler.com/Archive/Comp/comp.sys.mac.programmer.help/2008-03/msg00002.html" target="_blank"&gt;http://newsgroups.derkeiler.com/Archive/Comp/comp.sys.mac.programmer.help/2008-03/msg00002.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Postgres 8.2 issue: non-Fortran, non-Intel:&lt;BR /&gt;&lt;A href="http://lists.macosforge.org/pipermail/macports-users/2007-October/006550.html" target="_blank"&gt;http://lists.macosforge.org/pipermail/macports-users/2007-October/006550.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;and about 2 more pages of search hits with no clear common thread other than Leopard and Xcode 3.0.&lt;BR /&gt;&lt;BR /&gt;ron&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Jul 2008 14:40:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749162#M6134</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2008-07-08T14:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749163#M6135</link>
      <description>Thank you for the results of your investigation. I see that the compiler (Intel ifort) does not supply the $non_lazy_ptr, but it seems to be inserted when the mpif90 script hands things over to ld. I'm starting to believe that this may be a Leopard ld issue, because this also happens with my ifort-OpenMPI implemented MPICH.&lt;BR /&gt;&lt;BR /&gt;I'll continue to hunt. Thank you again. I am a little werry of depricating Xcode (and cctools) because of modern application builds.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Jul 2008 19:13:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749163#M6135</guid>
      <dc:creator>srinath</dc:creator>
      <dc:date>2008-07-08T19:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749164#M6136</link>
      <description>It looks like the "as" assembler is the culprit. It seems to be adding this $non_lazy_ptr suffix to symbols before handing things over to the linker. I'm not sure why it adds this suffix for the symbols created by the intel compiler, and not gfortran.&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Jul 2008 21:33:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749164#M6136</guid>
      <dc:creator>srinath</dc:creator>
      <dc:date>2008-07-08T21:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: ifort+macosx+mpich2+libtools =&gt; _$non_lazy_ptr</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749165#M6137</link>
      <description>We have determined what the issue is:&lt;BR /&gt;For ifort: One must initialize at least 1 declared common variable before using any of the variables in the module within a main program. Gfortran automatically initializes variables. This is the $non_lazy_ptr common variable conflict that the Mac OS X assembler documentation refers to (read the book...;). It seems that if 1 used common variable is initialized, then the ifort compiler initializes the rest to default values. We have some sample code to demonstrate this (requires use of libraries):&lt;BR /&gt;&lt;BR /&gt; module lazyptr_private&lt;BR /&gt; implicit none&lt;BR /&gt; INTEGER, PARAMETER :: i4=SELECTED_INT_KIND(9)&lt;BR /&gt;&lt;BR /&gt; integer(i4) :: test3&lt;BR /&gt; real :: test4&lt;BR /&gt; real*8 :: test5&lt;BR /&gt; character*8 :: test6&lt;BR /&gt; integer :: test10&lt;BR /&gt; integer :: test1&lt;BR /&gt; integer :: test2=0&lt;BR /&gt;&lt;BR /&gt; end module lazyptr_private&lt;BR /&gt;----------------------------&lt;BR /&gt; &lt;BR /&gt; SUBROUTINE test1sub&lt;BR /&gt; USE lazyptr_private&lt;BR /&gt;&lt;BR /&gt; write(*,*) "this is test1 = ",test1&lt;BR /&gt; test1=4&lt;BR /&gt; write(*,*) "this is test1 = ",test1&lt;BR /&gt; test2=2&lt;BR /&gt; write(*,*) "this is test2 = ",test2&lt;BR /&gt; test3=3&lt;BR /&gt; write(*,*) "this is test3 = ",test3&lt;BR /&gt; test4=4&lt;BR /&gt; write(*,*) "this is test4 = ",test4&lt;BR /&gt; write(*,*) "this is test5 = ",test5&lt;BR /&gt; test6='six'&lt;BR /&gt; write(*,*) "this is test6 = ",test6&lt;BR /&gt; test10=10&lt;BR /&gt; write(*,*) "this is test10 = ",test10&lt;BR /&gt;&lt;BR /&gt; END SUBROUTINE&lt;BR /&gt;----------------------------&lt;BR /&gt; PROGRAM lazyptr&lt;BR /&gt;&lt;BR /&gt; IMPLICIT NONE&lt;BR /&gt;&lt;BR /&gt; CALL test1sub&lt;BR /&gt; END PROGRAM&lt;BR /&gt;---------the Makefile vvv---------------&lt;BR /&gt;FC=ifort&lt;BR /&gt;#FC=gfortran&lt;BR /&gt;&lt;BR /&gt;all: lazyptr_test&lt;BR /&gt;&lt;BR /&gt;liblazyptr.a: lazyptr_sub.o lazyptr_private.o&lt;BR /&gt; libtool -o liblazyptr.a lazyptr_private.o lazyptr_sub.o&lt;BR /&gt;&lt;BR /&gt;lazyptr_test: lazyptr_test.o liblazyptr.a &lt;BR /&gt; $(FC) -o $(@) $(^)&lt;BR /&gt;&lt;BR /&gt;.f90.o:&lt;BR /&gt; $(FC) -c $(&amp;lt;)&lt;BR /&gt;&lt;BR /&gt;lazyptr_private.o: &lt;BR /&gt;lazyptr_sub.o: lazyptr_private.o&lt;BR /&gt;lazyptr_test.o: liblazyptr.a&lt;BR /&gt;&lt;BR /&gt;clean:&lt;BR /&gt; rm lazy*.o lazyptr_test lazy*.mod&lt;BR /&gt;&lt;BR /&gt;.SUFFIXES: .f90&lt;BR /&gt;---------------------------------&lt;BR /&gt;You can play with different combinations of initializations, which variables are used in the subroutine, and compiler. Mystery solved! Ifort will default initialize all uninitialized variables declared in a module for "common/global" use, only after you explicitly initialize any one or more variables, and make sure that variable is used in the program.&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jul 2008 22:32:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/ifort-macosx-mpich2-libtools-gt-non-lazy-ptr/m-p/749165#M6137</guid>
      <dc:creator>srinath</dc:creator>
      <dc:date>2008-07-09T22:32:18Z</dc:date>
    </item>
  </channel>
</rss>

