The Split-C on NOW HOWTO


NEW!

Split-C now runs exclusively on AM2, the new version of Active Messages!!

What you must do now to run Split-C programs

How this affects you


This document provides an overview on how to compile and run Split-C programs on the various NOW clusters. This HOWTO assumes you are familiar with Unix commands and changing your shell environment.

This document is *not* a tutorial on the language. For a good tutorial on the language itself, see Jim Demmel's Lecture on Split-C

This document is organized as follows:


Setting Your Environment

Type:
source /usr/castle/proj/cs267/cs267.cshrc


Compiling a Program

Now that you have set-up your Split-C environment you are ready to compile a program. The first thing to do is create a sub-directory where you want to compile the program. Then, copy a simple
Makefile into the directory and let the system makefile take care of the rest. When using the system makefile, you must use the gmake program instead of the standard make. This link shows a sample Split-C program .

Here is an example session which should get you started. Make sure you're logged into a NOW machine first!

now:>cd
now:>mkdir sc_example
now:>cd sc_example 
now:>cp /usr/castle/share/proj/split-c/develop/examples/pi/Makefile . 
now:>cp /usr/castle/share/proj/split-c/develop/examples/pi/pi.sc . 
now:>gmake 
/usr/castle/share/proj/split-c/install/LAM/bin/split-cc -g -O2 -o bin-LAM/pi.o -c pi.sc
Compiling for 2^N processors
/usr/castle/share/proj/split-c/install/LAM/bin/split-cc -o pi bin-LAM/pi.o -L/usr/sww/X11/lib -lX11 -lm

Running a Program

Assuming you have your environment variables correctly set-up, running a Split-C program is very easy. Parallel programs are invoked with the glurun program (see the
NOW Tutorial for a description of glunix commands). The format for glurun is: glurun -[#of nodes] [program to run] [arguements to the program]. To see all the options for glurun, do a glurun -help.

NOTE: For most Split-C programs, you'll have to run on a power of 2 number of processors (e.g. 1,2,4,8,16)

Below is an example session of running a Split-C program.

now:>glurun -4 pi
PI estimated at 3.139500 from 1000000 trials on 4 processors.

If you have problems with Split-C, send email to split-c@boing.cs.berkeley.edu.