9.1 Programming Languages
While there are hundreds of
programming languages available, when it comes to writing code for
high-performance clusters, there are only a couple of realistic
choices. For pragmatic reasons, your choices are basically FORTRAN or
C/C++.
Like it or not, FORTRAN has always been the lingua
franca of high-performance computing. Because of the installed base
of software, this isn't likely to change soon. This
doesn't mean that you need to use FORTRAN for new
projects, but if you have an existing project using FORTRAN, then
you'll need to support it. This comes down to
knowing how your cluster will be used and knowing your
users' needs.
FORTRAN has changed considerably over the years, so the term can mean
different things to different people. While there are more recent
versions of FORTRAN, your choice will likely be between FORTRAN 77
and FORTRAN 90. For a variety of reasons, FORTRAN 77 is likely to get
the nod over FORTRAN 90 despite the greater functionality of FORTRAN
90. First, the GNU implementation of FORTRAN 77 is likely to already
be on your machine. If it isn't, it is freely
available and easily obtainable. If you really want FORTRAN 90,
don't forget to budget for it. But you should also
realize that you may face compatibility issues. When selecting
parallel programming libraries to use with your compiler, your
choices will be more limited with FORTRAN 90.
C and C++ are the obvious alternatives
to FORTRAN. For new applications that don't depend
on compatibility with legacy FORTRAN applications, C is probably the
best choice. In general, you have greater compatibility with
libraries. And at this point in time, you are likely to find more
programmers trained in C than FORTRAN. So when you need help, you are
more likely to find a helpful C than FORTRAN programmer. For this and
other reasons, the examples in this book will stick to C.
With most other languages you are out of luck. With very few
exceptions, the parallel programming libraries simply
don't have binding for other languages. This is
changing. While bindings for Python and Java are being developed, it
is probably best to think of these as works in progress. If you want
to play it safe, you'll stick to C or FORTRAN.
|