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?



> Message: 1
> Date: Fri, 4 Jun 2004 15:23:36 +0100
> Subject: CRAY-style vector functions in AltiVec?
> Cc: Marc Balcells <email@hidden>
> To: email@hidden
> From: Marc Balcells <email@hidden>
>
> 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.

Marc, this is an ongoing "reality" with mixing FORTRAN and C (or even
different FORTRAN compilers). Sometimes you need to use flags to force
underscore, case, and other naming conventions to be compatible. So don't
worry about it, there should be a compiler flag to make everything
compatible with your particular mix of compilers.

> My question is, does vecLib or AltiVec have all the functions the
> treecode calls? The code is Hernquist's (1990) fortran version of the
> Barnes-Hut (1996) treecode, which Hernquist vectorized for the CRAY by
> calling a number of CRAY vector functions. The functions and
> subroutines are listed below, in f77.

As far as I know, the answer is "no". This would have to be something you
build yourself. Or, you could potentially use VAST to compile pre-existing
library code. I have found that VAST does a pretty good job taking code
originally written for CRAY (where the CRAY compiler would auto-vecotrize)
and vectorizing it for AltiVec instead. This may be something you want to
discuss with the VAST guys (www.crescentbaysoftware.com) before going any
further. They have a lot of expertise in this area.

BTW, VAST works well with IBM XLF and the NAG compiler in addition to the
Absoft compiler.

Craig


--
Dr. Craig A. Hunter
NASA Langley Research Center
AAAC / Configuration Aerodynamics Branch
(757) 864-3020
email@hidden (NEW!!)
_______________________________________________
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.




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.