[Email Ahmad Faraj at faraja@us.ibm.com
or Xin Yuan at xyuan@cs.fsu.edu in case of any
questions regarding STAR-ALLTOALL]
The adaptive MPI_Alltoall routine is part of the STAR-MPI library developed
at Florida State University by Ahmad Faraj and Xin Yuan in a research project
"Delayed Finalization of MPI Collective Routines", funded by National Science
Foundation (CCF-0541096). Although STAR-MPI includes routines
for many MPI collective operations, this particular page has the
source file(s) for the
STAR_Alltoall routine and some testing benchmarks.
Here are the instructions once the package
STAR-MPI.tar.gz is downloaded. NOTE:
the code works with any MPI library (MPICH, LAM, MVAPICH,
OPENMPI, ..etc). This will create a directory
named STAR-MPI with these contents: algorithms (directory),
benchmarks (directory), star-mpi.c, and star-mpi.h. The
directory benchmarks contains the benchmarks used in the paper. We will
discuss the benchmarks at the end. Next we see how to setup and use
STAR_Alltoall routine. setenv STAR_HOME /home/faraj/STAR-MPI mpicc -o exec file.c -DSTAR
-I$(STAR_HOME) -I$(STAR_HOME)/algorithms for FORTRAN, mpicc -c star-mpi.c -DSTAR
-I$(STAR_HOME) -I$(STAR_HOME)/algorithms then, you can link the
star-mpi.o with your file. mpicc -o executable file.c
star-mpi.o *** Some FORTRAN compilers will complain about
the number of underscores after a routine being called in C. If that is
the case, then compile star-mpi.c with an extra flag -DSUNSCORE Description of Benchmarks: Under the benchmark directory, there is a directory for micro-bench
and applications. Let us start with the micro-bench. micro-bench: Under this directory, there are Makefile, test-native.c, and
test-star.c.
Issueing Make will result in two executables micro-star and
micro-native. Please refer to the paper to read more about these
micro-benchmarks. Both executables take four parameters: msize (message
size), comp_time (computation time in milliseconds), imf (imbalance factor),
and
ppn (number of processor per node). Assume msize = 8000, comp_time =
50,
imf = 10, and ppn = 2. To run the executables on 16 processors,
type: mpirun -np 16 micro-star 8000 50 10
2 mpirun -np 16 micro-native 8000 50 10
2 applications: There are three directories: ft, matrix, and vh. The
total number of applications in all directories is four. To create the
FT
executables, cd to ft directory. To make both native and star versions
of
ft benchmark, type: make ft_star CLASS=C NPROCS=16, which
will
create a class "C" ft benchmark for 16 processors. make ft_native CLASS=C NPROCS=16 Both executables will be under the bin directory. Under the matrix directory, there are two benchmarks: mt and
fft2d.
Just type make to create the different executables. For the fft2d
benchmark, the problem size is set at compile time as a flag while the mt
benchmark takes the problem size as a command line argument. Finally, the vh directory contains the virginia hydrodynamics
code.
To create the star executable version, you need to issue: cp Makefile.star Makefile then
Make similarly, to get the native version, issue: cp
Makefile.native Makefile then Make the file zone.h is what defines the problem size.
int main(int argc, char ** argv){
.....
STAR_Alltoall(sbuff, .., comm, 0)
if (x == 10)
......
STAR_Alltoall(temp, ....., comm, 1);
.....
}
the parameter 0 and 1 at the end of the two STAR_Alltoall calls tell the routine that the first call
to STAR_Alltoall has a call_site_number 0 while the other is with a call_site_number 1. Note that each call site must have a unique
call_site_number. Note for FORTRAN users: the call_site_number parameter comes
before the last argument "err".