Makefile.inc to represent your system.
include/gthread.h to represent your system.
include/mpi.h.
cd src
make
make profile if you want to use profiling
libraries with TOMPI
cd ..
mpicc script (see
below), so compile the preprocessor:
cd mpicc
make
mpicc to reflect your system.
cd ..
hello -nthread n
where n is an integer should print many hellos.
Useful for testing how many threads you can use, ignoring the application's memory requirements (neglidgible for hello).
fanin -nthread n
where n is an integer does Cholesky factorization.
By default, solves a 100x100 system. This is very small, so it should run under a second or so for 4 processes.
mergesort -nthread 4
(to use another value, change NPROC
in mergesort.c)
A simple parallel merge sort using a local bubble sort (unless you define
QSORT to 1). By default only sorts an integer array of size
5,000, so it should run in a few seconds for 4 processes. Also checks for
correctness.
syseval -nthread 2
(or more, but this is useless)
Evaluates the speed of point-to-point communication. Uses a
sophisticated measurement algorithm to evaluate speeds for messages
of size 0, 1 byte, 10 bytes, 100 bytes, 1K, 10K, 100K, and 1Meg.
Stores the results in the file "syseval.stats".
-I/path/to/TOMPI/includeand using the following link switch:
-L/path/to/TOMPI/src -lmpiOtherwise, you have to compile all your code using the
mpicc
script in the mpicc directory, in place of your C compiler
(cc). Fortran isn't supported yet. For a list of
mpicc options, read mpicc/README.
To run your programs, add an -nthread argument followed by the
number of threads (MPI processes) you wish to use. Currently there is no
mpirun or mpiexec script. You can also set the
number of threads in an environment variable TOMPI_NTHREAD.
There is another option, -threadinfo (or by setting the
environment variable TOMPI_THREADINFO) which prints information
on the underlying thread system that your program is using.
For a list of supported MPI concepts, type "mpicmds" in the TOMPI
directory (or see the output for the latest
version). The collective communication hasn't been optimized anywhere near to
the level the point-to-point communication has; collective communication uses
several point-to-points.
In addition, there are two global variables you can play with. You can set the stack size of a process in a portable manner as follows:
#ifdef MPII_STACK_SIZE
MPII_Stack_size = number_of_bytes;
#endif
You can also set the number of physical processors to use.
#ifdef MPII_NUM_PROC
MPII_Num_proc = number_of_processors;
#endif
Note that these parameters may not supported by your thread system. Currently,
stack size is supported by all except possibly POSIX threads (it depends on
whether your implementation supports the stacksize attribute), and number
of processors is supported by Solaris threads and Cthreads.