Sunday, June 27, 2010

Intel 11.1, OS X 10.6.4, Xcode 3.2.2, and WRF seg faults

This post was kindly provided by Dr. Lou Wicker of the National Severe Storms Laboratory. Though I have updated to WRFv3.2, I'm still on ifort 11.0, Xcode 3.0 and Mac OS X 10.5.8.

===================================

When compiling WRF 3.2.1 [3.2 ?] using Intel 11.1 (v088) on Mac OS X 10.6.4, we recently kept having segmentation faults during runtime. I managed to track down the problem to memory allocated in Thompson microphysics, where some arrays were allocated (successfully, I checked the status flag), and then a bad address to memory to the first element in the array in a nested do-loop caused the segmentation fault. I "fixed" the Thompson code with static allocations of these arrays for a test (they were small), and then the segmentation fault occured in the solver_em routine.

I then compiled WRF with a beta version of Intel v12 compiler (which I am testing), and this behavior does NOT occur.

I posted to Intel Premier, which I have to say is pretty responsive to the 2-3 issues I have ever posted. The got back to me within a few hours. They pointed me to this 9 May 2010 note:

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

Which basically says that Apple, in version 3.2.2 of Xcode changed the loader in some way which is incompatible with Intel v11.1 which causes these segmentation faults. Their simple answer is to either remain at Xcode v 3.2.1, although they say the compiler flag "-use-asm" might fix the problem. In any event, this might save people a lot of hours of time and frustration. BTW, the WRF code ran 10-20 time steps using WSM5 with no problem using the "bad" Xcode version.

Hope that is helpful to all the WRF'ers.

Lou

4 comments:

Anonymous said...

Thanks!

I was facing this same problem and I was going nuts!

regards,

Luis

Unknown said...

The -use-asm flag worked for me! Thanks Lou and Rob.

Unknown said...

It was very useful now with that flag also I could compile the ARWpost and have some output for grads

Thanks Lou and Robert

Regards,

Agustin

Robert Fovell said...

Folks,

Lou Wicker has kindly informed me that the 11.1.089 update of Intel Fortran has resolved the Xcode 3.2.2 incompatibility problem. Thanks Lou and Intel.