You'll need a login specific to Marvel first. You can't log in using your HCS account due to a limitation in Tru64's NIS implementation. Also, you will have read-only access to your files in your HCS home directory. If you want to compile a program, you'll need to copy it to your home directory specific to Marvel, which is ~ (or /usr/users/loginname). CVS is installed on Marvel, which is handy for tracking changes when you have copies of files spread out all over the place.
Once you have a login to marvel, SSH into marvel-1.hcs.ufl.edu. Then you should be able to compile and run your code using the commands below. In the commands listed below, the term $NT is used to refer to the number of UPC threads (number of processes) you want to run your program with. $EXE is the filename that the resulting executable will be placed in.
Note: Marvel has 4 CPUs available.
upc -o $EXE -fthreads $NT -smp -O2 [*.upc or *.c]
I've found using -O2 gives best performance, you might
want to experiment with your particular apps if -O3 is better.
upcrun -n4 ./$EXE
upc -o helloworld -fthreads 4 -smp -O2 helloworld.upc upcrun -n4 ./helloworld
Log into any lambda machine using your HCS account. Then type:
setenv $PATH ${PATH}:/usr/local64/bin
(you can also place that line in your ~/.cshrc file).
Note: BUPC compilation is slow and takes 5-10 seconds for even trivial applications.
First you need to choose which conduit you want to use. Valid choices are SMP, vapi, and MPI, in addition to whatever else has been compiled into the installed version of MLD. The SMP conduit is useful for testing, the MPI conduit is worthless because it has some oddities, so it's best to use the VAPI conduit to get decent performance.
You can also choose to use pthreads to reduce the cost of communication between threads running on the same host machine. Beware: this has some oddities too.
In the commands listed below, the term $NT is used to refer to the number of UPC threads (number of processes) you want to run your program with. $EXE is the filename that the resulting executable will be placed in.
upcc -o $EXE -T=2 --pthreads=2 --network=smp [*.upc or *.c]
You use a higher number of pthreads, but it is useless for the lambdas since they only have 2 physical CPUs.
upcc -o $EXE -T=$NT --network=vapi [*.upc or *.c]
upcc -o $EXE -T=$NT --pthreads=2 --network=vapi [*.upc or *.c]
You use a higher number of pthreads, but it is useless for the lambdas since they only have 2 physical CPUs. Also see this page if you want to mix VAPI and pthreads.
upcc -o $EXE -T=$NT --network=mpi [*.upc or *.c] upcc -o $EXE -T=$NT --pthreads=2 --network=mpi [*.upc or *.c]
First create a file in your home directory called hostfile. The
contents of the file should be this if you use the VAPI conduit (partially displayed):
lambda-1 lambda-1 lambda-2 lambda-2 lambda-3 lambda-3 lambda-4 lambda-4 ... lambda-16 lambda-16or this if you use the VAPI conduit with pthreads (partially displayed):
lambda-1 lambda-2 lambda-3 lambda-4 ... lambda-16The file is your standard, run-of-the-mill hostfile which the MPI frontend uses to start jobs. Note that the VAPI conduit uses MPI to start the jobs on each machine, but rest assured that after it starts the VAPI conduit doesn't use MPI anymore.
Once the hostfile is in place, you can run your program using:
upcrun -n $NT ./$EXE
upcc -o helloworld -T=4 --pthreads=2 --network=vapi helloworld.upc upcrun -n4 ./helloworld
mupcc -O3 -o helloworld -fthreads 4 helloworld.c mupcrun -n 4 ./helloworld
For Marvel:
UPCC=upc
UPCTHREADS=4
UPCFLAGS=-O2 -fthreads ${UPCTHREADS} -smp
.SUFFIXES: .upc
.upc:
${UPCC} ${UPCFLAGS} -o $@ $<
all: a b c
a: a.upc
b: b.upc b.h
c: c.upc b.h
runall:
upcrun -n ${UPCTHREADS} a
upcrun -n ${UPCTHREADS} b
upcrun -n ${UPCTHREADS} c
For Lambda:
UPCC=upcc
UPCNETWORK=--network=vapi --pthreads=2
UPCTHREADS=4
UPCFLAGS=${UPCNETWORK} -T=${UPCTHREADS}
.SUFFIXES: .upc
.upc:
${UPCC} ${UPCFLAGS} -o $@ $<
all: a b c
a: a.upc
b: b.upc b.h
c: c.upc b.h
runall:
upcrun -n ${UPCTHREADS} a
upcrun -n ${UPCTHREADS} b
upcrun -n ${UPCTHREADS} c
First download the latest version of the Berkeley UPC compiler and save it somewhere. Untar it, then as root:
./configure --prefix=/usr/local64/bupc-vapi --enable-vapi --with-mpi-cc=/usr/voltaire/mpi/bin/mpicc --with-mpirun-cmd='/usr/voltaire/mpi/bin/mpirun_ssh -np %N -hostfile $HOME/hostfile %C' make
Now remove the previous version of the BUPC compiler (in /usr/local64/bupc-vapi) and then:
make install
You can also make a local install of the BUPC compiler in your home directory
by changing the prefix and adjusting your $PATH accordingly. Probably best
to avoid this if you can though, unless you need to test out a specific
version of the UPC compiler (use ./configure --help to see what's
available, or read the README file that comes with the UPC compiler).
Also, beware that the compiler takes a long time to build (15-20 minutes).