Re: wrapit architecture problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 25 2010 - 11:42:12 MDT

Hi Michael,

I actually meant to try the "-m64" without the "-g77". WRAPIT will try to use gfortran by default, and then g95, and then g77.
We recommend people use gfortran if possible.

You can check what mode your compiler is in by doing a "file" on the resultant executable. For example, on my Mac:

% mv size.f test.f
% gfortran test.f
ellabell[191] file a.out
a.out: Mach-O 64-bit executable x86_64
% gfortran -m32 test.f
% file a.out
a.out: Mach-O executable i386
% gfortran -m64 test.f
% file a.out
a.out: Mach-O 64-bit executable x86_64

The "x86_64" indicates it's compiling in 64-bit mode, and "i386" is 32-bit.

--Mary

On Aug 25, 2010, at 8:15 AM, Michael Notaro wrote:

> Thanks, Mary.
>
> This is what I get with g77 when trying with and without m64.
>
> When I try WRAPIT -g77 -m64 lpjmain_latest_cru.f
>
> WRAPIT Version: 100111
> COMPILING lpjmain_latest_cru.f
> LINKING
> ld: warning: in lpjmain_latest_cru.o, file was built for i386 which is not the architecture being linked (x86_64)
> ld: warning: in /sw/lib/libg2c.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
> END WRAPIT
>
>
> When I try WRAPIT -g77 lpjmain_latest_cru.f
>
> WRAPIT Version: 100111
> COMPILING lpjmain_latest_cru.f
> LINKING
> END WRAPIT
>
> Not sure what mode my g77 is using. How do I check?
> I believe the 32 versus 64 changed when I went to an intel mac.
> Perhaps the wrong g77 is installed.
>
> Michael
>
>
>
>
> On Aug 24, 2010, at 5:32 PM, Mary Haley wrote:
>
>> Hi Michael,
>>
>> This is a 64-bit NCL binary you're using. Did you try using -m64 on the WRAPIT line?
>>
>> I'm surprised that g77 even works. Is your g77 compiling in 32-bit or 64-bit mode by default?
>>
>> --Mary
>>
>> On Aug 24, 2010, at 2:45 PM, Michael Notaro wrote:
>>
>>> When I use WRAPIT -g77, I am able to produce a .so file OK.
>>> But when I use NCL, wrapped to this .so file, I get the following error:
>>>
>>> warning:An error occurred loading the external file lpjmain_latest_cru.so, file not loaded
>>> dlopen(lpjmain_latest_cru.so, 2): no suitable image found. Did find:
>>> lpjmain_latest_cru.so: mach-o, but wrong architecture
>>>
>>> I am on a new intel mac, using OS X 10.6.4.
>>> NCL version 5.2.0. WRAPIT version 100111.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Michael
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 25 11:42:20 2010

This archive was generated by hypermail 2.1.8 : Wed Aug 25 2010 - 11:50:26 MDT