[Beowulf] A start in Parallel Programming?

Ed Hill ed at eh3.com
Tue Mar 13 10:58:19 PDT 2007


On Tue, 13 Mar 2007 12:54:46 -0400 (EDT) "Robert G. Brown"
<rgb at phy.duke.edu> wrote:

> On Tue, 13 Mar 2007, Kyle Spaans wrote:
> 
> > Do I really need MPI/OpenMPI/OpenMP/PVM? If so, does that mean I
> > should suck it up and learn Fortran/C/C++? Or can I just devise my
> > own message passing system to help me parallelize the workload? For
> > example, TCP sockets were mentioned. In my CS class I learned Scheme
> > [a dialect of LISP], and I know Scheme can work with TCP sockets. It
> > has also gotten me very interested in the Functional Programming
> > paradigm [but is it ideal for parallel programming?]. If possible,
> > I'd like to stick with Scheme for now, as it'll make my CS class
> > coming up this summer all the more interesting.

>    a) Learn C.  No matter what you do, if you plan to be a "real
> coder" you will sooner or later need to learn C. 


Hi Kyle,

RGB's advice is both good-quality and voluminous.  :-)

I'd like to add one key point though and it is "Libraries".  So much
good software already exists in the world that it is very limiting and
terribly inefficient to take a "roll your own" approach to writing
anything other than trivial projects.

C (and C++ through its inherent C compatibility) allow easy use of
***VAST*** libraries of Free and Open Source (and commercial) code.  If
there is some area that you would like to work in (basically *ANY*
area you can imagine) then chances are excellent that you can find
helpful C/C++ libraries that will save you a lot of the unnecessary
pain that comes with the "starting from scratch" approach.

The same can not be said for Fortran.  Fortran is an increasingly
unfashionable language and many critical topics (e.g. 3D geometry and
visualization, image processing, database manipulation, text
processing, etc.) have either far fewer or nearly non-existent Fortran
support.

Using libraries is also a good idea for a beginner since good library
examples are just that -- good examples!  Seeing how libraries work can
help you learn how to become a better programmer.

Ed

ps - Its not all that difficult to call Fortran routines from
     C/C++.  The Gnu autotools even include helpful macros to 
     make it easier -- see the autoconf and automake docs for
     examples.  With these methods, almost every existing Fortran 
     library becomes, by extension, a C/C++ library.

pps - It is not a trivial exercise to supply Fortran language
      bindings for arbitrary C/C++ libraries.


-- 
Edward H. Hill III, PhD  |  ed at eh3.com  |  http://eh3.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.scyld.com/pipermail/beowulf/attachments/20070313/4ebb64ed/signature.bin


More information about the Beowulf mailing list