[Beowulf] 32 - 64 Compatibility

Robert G. Brown rgb at phy.duke.edu
Wed May 26 09:14:02 PDT 2004


On Wed, 26 May 2004, Renato Silva wrote:

> Hi Folks
> 
> I'm contemplating building a small cluster 16 nodes,
> and some guys ask about the compatibility of a 32 bits with 64 bits
> machines
> Is there a easy way to check this compatibility ?

Sure.  Get machine A (32bit) , get machine B (64bit).  Install both,
being sure to install all "compatibility libraries" (which hopefully
exist and are prebuilt and packaged for your distribution) on B.
compile application on A.  Attempt to run application on B.  Go back and
add missing libraries, building and packaging as required, until 32 bit
A binary runs on B.

Well, ok, I don't know how EASY that all is... but it is
straightforward.

What is even easier is:

  cd Src/64
  cvs checkout myapp
  cd myapp
  make
  cp myapp ~/bin64

vs

  cd Src/32
  cvs checkout myapp
  cd myapp
  make
  cp myapp ~/bin32

Then all you have to do is write a teeny snippet for e.g. .bashrc that
runs uname -p and puts $HOME/bin64 first on your $PATH if it is equal to
x86_64, otherwise $HOME/bin32.  Or put the uname into your Makefile and
create myapp32 and myapp64.  And create a shell script called myapp that
uses uname -p to execute the correct binary on whichever architecture
and just build both versions whenever you are ready to go into
production.

This is a bit ugly, but it is very easy and it has the virtue of
compiling and linking for the actual platform being used; one HOPES that
64 bit libraries and code will outperform 32 bit libraries and code on
any 64 bit platform (at least on average) or we all have to ask
ourselves a great big why bother sort of question.  Eventually one
expects mixed environment to disappear as everything becomes 64 bit, but
it hasn't happened yet.

Back in the bad old days, when our physics department had Sun 3, Sun 4,
SGI/Irix, Sun 386i, and maybe some NeXTs, an Ultrix box or two, an AIX
loaner (you get the picture) I had a big old conditional tree at the
beginning of my rc files righteously ripped off from PVM's aimk that
would identify the architecture of whatever I was running on and set
some environment variables that I later used to vary path, reset various
aliases and so forth so all the platforms behaved as nearly as possibly
alike at the shell level and could run any binaries I built per
architecture.  Linux levelled the field and made this no longer
worthwhile, and I think most sites now try to run a single architecture,
although that is changing and will likely change some more with x86_64,
Itanium, and competitive PPC boxes joining the ubiquitous i386 boxes.

PVM was (and likely still is) a past master at this sort of juggling.
If you build and install your binaries once per architecture in their
PVM arch paths, pvm will parallelize applications transparently across
completely different binary architectures.  I've seen graphs of some of
the early PVM testbed computations where a computation ran on four or
five architectures including a Cray, with the Cray doing the vector
stuff and the workstation clusters doing non-vector stuff.

   rgb
  

> 
> 
> Thanks
> Renato
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> 

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu






More information about the Beowulf mailing list