Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CRAY-style vector functions in AltiVec?



On 4-jun-04, at 16:23, Marc Balcells wrote:

Hello,

I have compiled a f77 gravitational N-body tree-code on my PBook G4 (OSX10.2.8, g77), and its performance is not great - similar to the same code running on a Sun ultra5. I have found plenty documentation about the G4 only being competitive for HPC when using AltiVec, which makes sense, and learned the basics of writing C wrapper functions to allow a call to altivec from fortran. This was tricky with g77 but managed to make it work using an example given in a useful posting by Craig Hunter (fortran lists, April 2002). BTW I noted a nasty feature, subroutine names with underscores within the name do not seem to be acceptable - the linker does not find the corresponding C functions.

I have been doing some Fortran wrapping myself the last couple of days. And this is what I noticed:
g77 adds an additional '_' to the end if your identifier contains any '_' of itself. So if you add an additional '_' to your wrapped C function it should work (e.g. use foo_bar__ instead of foo_bar_ to wrap the function foo_bar).

Best regards,
Sander Niemeijer
_______________________________________________
fortran-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/fortran-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >CRAY-style vector functions in AltiVec? (From: Marc Balcells <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.