Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28500 Discussions

Xcode 3.2.2 and 3.2.3 not supported and may cause errors

Ron_Green
Moderator
1,837 Views
UPDATE 12/2/2010: The underlying linker issue is fixed by Apple in Xcode 3.2.5. Please upgrade to this version of Xcode.



UPDATE 8/30/2010: This issue has a workaround in the 11.1 Update 7 compiler, posted to Intel Registration center (https://registrationcenter.intel.com). ALL users with Xcode 3.2.2 and above should upgrade to 11.1 Update 7, 11.1.089 or greater.







UPDATE 5/7/2010: Xcode 3.2.2 and Xcode 3.2.3 and ifort are not compatible and can cause incorrect runtime results or segmentation faults. A possible workaround is to add -use-asm option to all compile and ifort link commands (see below). We are continuing to work with Apple to resolve this issue.

READ THE PROBLEM WRITEUP HERE: http://software.intel.com/en-us/articles/intel-fortran-for-mac-os-x-incompatible-with-xcode-322/

The current Intel Compilers 11.1 officially support Mac OS* X 10.6.2 and Xcode* 3.2.1.

Unofficial testing indicates that Mac OS* X 10.6.3 and Xcode* 3.2.1 appear to work together with the compiler, however this configuration is not OFFICIALLY supported at this time.

However, Mac OS* X 10.6.3 and Xcode* 3.2.2 combination with the Intel Compilers v11.1 have at least 1 known critical issue under investigation. At this time we do not recommend upgrading Xcode to 3.2.2 (or later). This version of Xcode includes a new build of gcc/g++ and it's libraries that appear to affect the Fortran runtime library. We will post more information as the investigation continues.

If you are seeing unusual behavior for your previously working applications after the Xcode 3.2.2 please add a reply to this thread. Particularly if you see any Intel C or C++ issues. So far we only have reports from Fortran users.

Thanks

Ron W. Green, 28 April 2010

0 Kudos
30 Replies
martin_schuetzchemie
1,445 Views
Indeed it appears that there are severe problems when usingXcode* 3.2.2 in conjunction with the intel fortran
compiler 11.1. After going fromXcode* 3.2.1 to 3.2.2 I observe segmentation faults after recompilation
of the MOLPRO (www.molpro.net) program. The code works flawlessly when compiling on another (otherwise identical) machine, which was not yet updated to version 3.2.2. Compilation on the basis of gfortran works
on both machines.
Martin Schtz, Regensburg, 4 Mai 2010
0 Kudos
Christophe_Peyret
1,445 Views
I am running OSX 10.6.3 and Xcode 3.2.2. Can we donwload to Xcode 3.2.1 ?

Try this :
ifort bugg.f90 -o bugg
./bugg
here is the result !
size(u)= 28
size(v)= 28
i= 1 u,v= 0.111259634513577-307 0.111259634513577-307
i= 2 u,v= 0.452218665183552E-13 0.452218665183552E-13
i= 3 u,v= 0.212199580875164-313 0.212199580875164-313
i= 4 u,v= 0.116709768504572-311 0.116709768504572-311
i= 5 u,v= 0.111259634513577-307 0.111259634513577-307
i= 6 u,v= 0.452288054122591E-13 0.452288054122591E-13
i= 7 u,v= 0.212199580875164-313 0.212199580875164-313
i= 8 u,v= 0.116709768504572-311 0.116709768504572-311
i= 9 u,v= 0.278193648195574-308 0.278193648195574-308
i=10 u,v= 0.763918562419558-312 0.763918562419558-312
i=11 u,v= 0.424399158242461-313 0.424399158242461-313
i=12 u,v= 0.212199579788219-313 0.212199579788219-313
i=13 u,v= 0.556327880508949-308 0.556327880508949-308
i=14 u,v= 0.278253573535859-308 0.278253573535859-308
i=15 u,v= 0.224633149715818-313 0.224633149715818-313
i=16 u,v= 0.297079410843833-312 0.297079410843833-312
i=17 u,v= 0.212199579145934-313 0.212199579145934-313
i=18 u,v= 0.116709768531252-311 0.116709768531252-311
i=19 u,v= 0.000000000000000E+00 0.000000000000000E+00
i=20 u,v= 0.166666666666667E+00 0.166666666666667E+00
i=21 u,v= 0.333333333333333E+00 0.333333333333333E+00
i=22 u,v= 0.500000000000000E+00 0.500000000000000E+00
i=23 u,v= 0.666666666666667E+00 0.666666666666667E+00
i=24 u,v= 0.833333333333333E+00 0.833333333333333E+00
i=25 u,v= 0.100000000000000E+01 0.100000000000000E+01
i=26 u,v= 0.000000000000000E+00 0.000000000000000E+00
i=27 u,v= 0.166666666666667E+00 0.166666666666667E+00
i=28 u,v= 0.333333333333333E+00 0.333333333333333E+00
and here is the program bugg.f90
program bugg
real(8) :: u(28),v(28)
u( 1)= 0.00000000000000000d0
u( 2)= 0.16666666666666666d0
u( 3)= 0.33333333333333331d0
u( 4)= 0.50000000000000000d0
u( 5)= 0.66666666666666663d0
u( 6)= 0.83333333333333337d0
u( 7)= 0.10000000000000000d1
u( 8)= 0.00000000000000000d0
u( 9)= 0.16666666666666666d0
u( 10)= 0.33333333333333331d0
u( 11)= 0.50000000000000000d0
u( 12)= 0.66666666666666663d0
u( 13)= 0.83333333333333337d0
u( 14)= 0.00000000000000000d0
u( 15)= 0.16666666666666666d0
u( 16)= 0.33333333333333331d0
u( 17)= 0.50000000000000000d0
u( 18)= 0.66666666666666663d0
u( 19)= 0.00000000000000000d0
u( 20)= 0.16666666666666666d0
u( 21)= 0.33333333333333331d0
u( 22)= 0.50000000000000000d0
u( 23)= 0.00000000000000000d0
u( 24)= 0.16666666666666666d0
u( 25)= 0.33333333333333331d0
u( 26)= 0.00000000000000000d0
u( 27)= 0.16666666666666666d0
u( 28)= 0.00000000000000000d0
!
v( 1)= 0.00000000000000000d0
v( 2)= 0.00000000000000000d0
v( 3)= 0.00000000000000000d0
v( 4)= 0.00000000000000000d0
v( 5)= 0.00000000000000000d0
v( 6)= 0.00000000000000000d0
v( 7)= 0.00000000000000000d0
v( 8)= 0.16666666666666666d0
v( 9)= 0.16666666666666666d0
v( 10)= 0.16666666666666666d0
v( 11)= 0.16666666666666666d0
v( 12)= 0.16666666666666666d0
v( 13)= 0.16666666666666666d0
v( 14)= 0.33333333333333331d0
v( 15)= 0.33333333333333331d0
v( 16)= 0.33333333333333331d0
v( 17)= 0.33333333333333331d0
v( 18)= 0.33333333333333331d0
v( 19)= 0.50000000000000000d0
v( 20)= 0.50000000000000000d0
v( 21)= 0.50000000000000000d0
v( 22)= 0.50000000000000000d0
v( 23)= 0.66666666666666663d0
v( 24)= 0.66666666666666663d0
v( 25)= 0.66666666666666663d0
v( 26)= 0.83333333333333337d0
v( 27)= 0.83333333333333337d0
v( 28)= 0.10000000000000000d1
write(*,'("size(u)=",i3)')size(u)
write(*,'("size(v)=",i3)')size(v)
do i=1,28
write(*,'("i=",i2,3x,"u,v=",2(e22.15,1x))')i,u(i),v(i)
enddo
end program bugg
0 Kudos
Christophe_Peyret
1,445 Views
Can we donwload to Xcode 3.2.1 ?
0 Kudos
Matthew_Nelson
Beginner
1,445 Views
I have also been having trouble with OSX 10.6.3, Xcode 3.2.2, and ifort 11.1.088.
0 Kudos
Ron_Green
Moderator
1,445 Views
Xcode 3.2.2, specifically the linker 'ld' that came with this and is used by the Intel compiler, has broken the Intel Fortran compiler. We are still investigating and trying to determine how to work with this new linker.

In the meantime, yes, the fix is to go back to Xcode 3.2.1. Reinstalling this puts the older linker and header files on the system, overwriting the ones put on by Xcode 3.2.2.

You get the older Xcode from developer.apple.com. You will need an account with them, but the accounts are free.

ron
0 Kudos
Ron_Green
Moderator
1,445 Views
2010 May 7:

A workaround for the incompatibility of Xcode 3.2.2 and ifort has been found: Please add compiler option -use_asm to all compilation and ifort link commands.

ifort -use_asm ...rest of your options...

ron
0 Kudos
Benny_Lava
Beginner
1,445 Views
Do you mean -use-asm ?
0 Kudos
Ron_Green
Moderator
1,445 Views
yes, although both work it is probably best to use the documented option.
0 Kudos
Axel_B_
Beginner
1,445 Views
The work-around does not work in combination with other options:

ifort -static-intel -openmp -use-asm test.f
ld: warning: for symbol _message_catalog tentative definition of size 16 from /usr/bin/ifort-11.1-base/lib/libiomp5.a(iomp.o) is being replaced by a real definition of size 8 from /usr/bin/ifort-11.1-base/lib/libifcoremt.a(for_diags_intel.o)
ld: warning: _message_catalog has different visibility (default) in /usr/bin/ifort-11.1-base/lib/libifcoremt.a(for_diags_intel.o) and (hidden) in /usr/bin/ifort-11.1-base/lib/libiomp5.a(iomp.o)
ld: duplicate symbol ___intel_cpu_indicator$non_lazy_pointer in a.out and a.out
0 Kudos
mkluskens
Beginner
1,445 Views
To reinstall install Xcode 3.2.1 find your original Snow Leopard 10.6.0 DVD, the installer is in one of the folders.
0 Kudos
Benny_Lava
Beginner
1,445 Views
You can also download it from the Mac Dev Center. Click on Developer Downloads > Developer Tools, and search for Xcode 3.2.1.

After reinstalling Xcode, you should reinstall Intel Fortran to ensure it works correctly with all of the libraries.
0 Kudos
Ron_Green
Moderator
1,445 Views
0 Kudos
pbro1
Beginner
1,445 Views
Hi,

I have issues with a mixed fortran/C program. The error occurs in a C function, while the main program is fortran, if the code is compiled with -O2 or -O3. The symptom is the following error message.

malloc: *** mmap(size=9223372036854775808) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

The broken malloc is one in a series of malloc commands, and while the error insinuates that I try to allocate around 9EB, I am positive that I only request 1*sizeof(double) bytes. However, the constant that is guaranteed to be "1" is optimized out by the compiler with -O2 or -O3.

Funnily enough the error also disappears, if I insert printf("\n") statements before and after each malloc command in the sequence.

The problem goes away if I use the -use-asm in all icc and ifort commands. I could not yet downgrade to Xcode 3.2.1. If I can provide any other information, please let me know.

Peter
0 Kudos
Ron_Green
Moderator
1,445 Views
Peter,

We are aware of the problem with constant addresses in Fortran, this is the first report on our C/C++ compiler. I have the team look into this for C/C++. I though it odd that only Fortran would be impacted.

ron
0 Kudos
Ron_Green
Moderator
1,445 Views
now that I think about it, it probably is not surprising that the C++ code is affected. If Fortran is your main, it can be corrupting the memory space for the entire application, including the C code. Does your application stay in the C code, or are you calling/returning to Fortran in between the mallocs()? The Fortran can be blasting the value in the constant "1" in between calls to the C code.

If you stay in the C code for these mallocs without returning, then I have some investigation to do.


ron
0 Kudos
Dave_Allured
New Contributor I
1,445 Views
Is this an Xcode 3.2.2 problem, or something else? A simple program generates an uninitialized variable run time error:

[fortran]program test1
   integer j, k
   print *, 'Input j?'
   read (*,*) j
   if (j < 10) k = 1
   k = k + 1
end program test1
[/fortran]
With ifort 11.1 Update 4 and Mac OS 10.5.8 I get the expected run time message and a traceback:
[plain]mac56:~/bugs/ifort/traceback 62> ifort -check uninit -traceback undefined.f90
mac56:~/bugs/ifort/traceback 63> ./a.out 
 Input j?
13
forrtl: severe (193): Run-Time Check Failure. The variable 'test1_$K' is
   being used without being defined
Image              PC                Routine            Line        Source
a.out              0000000100073C9C  Unknown               Unknown  Unknown
a.out              00000001000727D4  Unknown               Unknown  Unknown
a.out              000000010004A147  Unknown               Unknown  Unknown
a.out              000000010001B3EA  Unknown               Unknown  Unknown
a.out              000000010001BE98  Unknown               Unknown  Unknown
a.out              000000010000131A  _MAIN__                     6  undefined.f90
a.out              000000010000123C  Unknown               Unknown  Unknown
a.out              00000001000011D4  Unknown               Unknown  Unknown
[/plain]
With ifort Update 6 and Mac OS 10.6.3 I get a generic runtime message, and no traceback. I tried -use_asm here, but it did not make any difference:
[bash]mac78:~/bugs/ifort/traceback 167> ifort -use_asm -check uninit 
   -traceback undefined.f90
mac78:~/bugs/ifort/traceback 168> ./a.out 
 Input j?
13
forrtl: error (76): Abort trap signal
Abort
[/bash]
Additional version info for Update 4, OS 10.5.8:
[plain]mac56:~/bugs/ifort/traceback 67> ifort -V
Intel Fortran Intel 64 Compiler Professional for applications
   running on Intel 64, Version 11.1    Build 20091130 Package ID:
   m_cprof_p_11.1.080
Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.

mac56:~/bugs/ifort/traceback 68> uname -v
Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
   root:xnu-1228.15.4~1/RELEASE_I386

mac56:~/bugs/ifort/traceback 69> otool -L a.out
a.out:
   /usr/lib/libgcc_s.1.dylib
       (compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libmx.A.dylib
       (compatibility version 1.0.0, current version 292.4.0)
   /usr/lib/libSystem.B.dylib
       (compatibility version 1.0.0, current version 111.1.5)
[/plain]
Additional version info for Update 6, OS 10.6.3:
[bash]mac78:~/bugs/ifort/traceback 171> ifort -V
Intel Fortran Intel 64 Compiler Professional for
   applications running on Intel 64, Version 11.1
   Build 20100401 Package ID: m_cprof_p_11.1.088
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

mac78:~/bugs/ifort/traceback 172> uname -v
Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010;
   root:xnu-1504.3.12~1/RELEASE_I386

mac78:~/bugs/ifort/traceback 173> otool -L a.out
a.out:
   /opt/local/lib/gcc44/libgcc_s.1.dylib
      (compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libmx.A.dylib
      (compatibility version 1.0.0, current version 315.0.0)
   /usr/lib/libSystem.B.dylib
      (compatibility version 1.0.0, current version 125.0.1)
[/bash]
0 Kudos
Dave_Allured
New Contributor I
1,445 Views
Correction. I wrote:
.
. "With ifort Update 6 and Mac OS 10.6.3 I get ..."
.
But I do not actually know the OS minor rev number. It might just be 10.6.0. The closest I can come is the Darwin kernel version number,10.3.0.
.
--Dave
0 Kudos
Ron_Green
Moderator
1,445 Views

Let me be clear: do not use Xcode 3.2.2 and Intel Fortran. They are currently not compatible. It is independent of the Mac OS version. The linker released with Xcode 3.2.2 is not handling the object files created by Intel Fortran (all versions) correctly.

We have a workaround that changes our object file format. This will work around the linker change. We will have an update compiler for 11.1 with this fix in the coming weeks and will post this compiler to registrationcenter.intel.com.
0 Kudos
Dave_Allured
New Contributor I
1,445 Views
Ron,
.
I understand your warning perfectly. My problem is that I do not have a clue as to what my Xcode version is in either of the two cases above, thus the reason for my original question.
.
How do I find the Xcode version number? I can not find this component anywhere -- Applications, man Xcode, or which Xcode. The version info that I gave above does not mention Xcode, and is otherwise incomprehensible to me. I work on a large network of remotely and somewhat anonymously managed computers. I have no access to or knowledge of an installation disk. Sorry if this is a Mac idiot question. Please assist.
.
--Dave
0 Kudos
Kevin_D_Intel
Employee
1,244 Views

Via the Mac Desktop GUI, starting Xcode displays the version otherwise use the Apple launchbar via feft-click the Xcode GUI to set the focus of the launchbar to Xcode and then select Xcode > About Xcode.

In the absence of the Xcode GUI, version information is available in the file: /Developer/Applications/Xcode.app/Contents/version.plist

cat the file and look for the value appearing after CFBundleShortVersionString.

For example, for Xcode 3.1.4 the file contains:

CFBundleShortVersionString
3.1.4

0 Kudos
Reply