| Advanced Micro Devices offers a variety of development tools for the AMD64 platform. While the company doesn't have its own compiler, it does offer an excellent performance analyzer, CodeAnalyst. In "Getting In Touch With Your Inner Code", I examine the current release of the product, CodeAnalyst 2.1, for the AMD64 DevSource. AMD also offers a Core Math Library for 64-bit Linux, developed in partnership with the Numerical Algorithms Group. The library contains highly optimized Basic Linear Algebra Subprograms (BLAS), Linear Algebra Package (LAPACK) and Fast Fourier Transform (FFT) routines, as well as others needed for high-end numerical analysis. In "Achieving Peak Math Performance," my colleague Allan McNaughton discusses how to use the ACML. Note that CodeAnalyst and ACML are free to download and use in your development projects and deployed applications. |
While you can't judge a book by its cover, you can often judge a development platform by its tools. By that measure, the AMD64 platform demonstrates a maturity that exceeds the youth of its release, in early 2003. The breadth of 64-bit tools available for the Opteron processor, and its sibling the Athlon 64 processor, could be attributed to the AMD64 architecture, which extends the familiar 32-bit x86 instruction set with new registers and op- codes. It also could reflect the pent-up demand for an affordable 64-bit architecture that builds upon existing industry standard hardware and software designs.
But no matter the reason, the fact remains that there are a good number of development tools available for native 64-bit development using the AMD64 platforms.
Let's start with Linux, which thanks to offerings from Red Hat and SUSE is the more mature operating system for the AMD64 architecture. In a future article, we'll examine the toolchain for building 64-bit Windows and .NET applications.
Linux Compilers
The foundation of any platform is its binaries, and for AMD64, there are a number of solid choices available. For many Linux developers, the obvious first choice is the GNU C/C++ and Fortran compilers. The latest C/C++ release, as of the time of writing, is gcc 3.4.1. On the Fortran side, there's the g77 compiler, also in the gcc 3.4.1 distribution.
The gcc toolset supports the AMD64 architecture implemented by the Opteron and Athlon 64 processors on Linux, FreeBSD and NetBSD. On Linux, the compiler is able to generate both 64-bit and 32-bit x86 code (via the -m32 switch).
The Portland Group offers a high-performance C/C++ compiler as part of its PGI Workstation toolset. Those compilers are optimized for one- to four-processor systems, which certainly describes the bulk of AMD Opteron-based servers available today. Portland Group lets you mix and match which compilers you need -- you can get a C/C++-only package, a Fortran-only package and a complete suite. They also break Fortran out into separate F77 and F90 versions, if you only need one or the other.
Another high-speed compiler is from PathScale, whose PathScale EKO Compiler Suite also includes C/C++ and Fortran 77/90/95 components. Their compiler is completely GNU gcc compatible, and uses standard compiler flags, so you shouldn't have to modify any of your makefiles.
There are a couple of other Fortran compilers for AMD64 you should know about.
AbSoft's Fortran version 9.0 is designed to generate both 32-bit and 64-bit binaries, though the compiler itself is a 64-bit app. The compiler is with glibc, and GNU's g77 compiler switches and object formats. AbSoft includes a multi-language debugger for C/C++, Fortran and assembler as part of the toolchain.
The Numerical Algorithms Group has a well-regarded Fortran 95 compiler. The NAGWare f95 compiler has recently been updated to include many parts of the Fortran 2000 update to the language.

Figure 1. AbSoft's Fx2 debugger.
Linux Debuggers
Obviously, there's more to a toolchain than the compiler. AbSoft offers the Fx2 multiplatform debugger mentioned above. According to the company, the debugger not only works with their own compilers, but also with gcc/g77, PathScale and Portland Group.
Another offering is the Distributed Debugging Tool, a rather unimaginatively named product from Streamline Computing. It's designed to help debug parallel code, up to high-performance clusters. It works with C/C++ and Fortran 77/90 code.

Figure 2. Streamline's DDT
A powerful debugger is TotalView, from Etnus. It's designed to work on many 32-bit and 64-bit platforms, including AMD64, Itanium, Power and SPARC, which means you can standardize on one debugger for all Linux and Unix projects. On the Opteron and Athlon 64 processors, it plays well with Red Hat and SUSE Linux.
One of the unique features of the TotalView compiler is that often you can test fixes without recompiling. It also has features to let you explore and analyze data sets, to see if a problem with the data is the root cause of an application malfunction.

Figure 3. Etnus TotalView.
Finally, we can't forget GNU gdb, the standard for many Linux developers. The program being debugged can be written in C, C++, Pascal, Objective-C (and many other languages). Those programs might be executing on the same machine as GDB (native) or on another machine (remote). gdb can run on Linux and Unix.
More Tools for Linux -- and Windows and Unix too
We've merely scratched the surface of what's available for Linux running on the Opteron and Athlon 64 processors. On the AMD site, you'll find listings of other tools, including libraries, profilers and performance analyzers and more.
While this article has focused on Linux tools, there's also AMD64 support available for other platforms. Of course, the Windows and Solaris 10 support is still evolving, as those operating systems are in beta for the 64-bit AMD platform. We'll cover those in a future article.
A former mainframe software developer and systems analyst, Alan Zeichick is principal analyst at Camden Associates, an independent technology research firm focusing on networking, storage, and software development.