32 int main (
int argc,
char **argv )
34 const unsigned int dblamount = 100;
39 MPI_Init ( &argc, &argv );
42 MPI_Comm_size ( MPI_COMM_WORLD, &tasks );
43 cout <<
"Starting mpi test on " << tasks <<
" tasks" << endl;
51 ADHERETOLOC (
double, data1, d1 );
52 for (
unsigned int i = 0; i < dblamount; ++i ) {
59 ADHERETOLOC (
double, data2, d2 );
60 for (
unsigned int i = 0; i < dblamount; ++i ) {
61 d2[i] = i * dblamount * 1.0;
66 ADHERETOLOC (
double, data1, d1 );
67 ADHERETOLOC (
double, data3, d3 );
68 MPI_Allreduce ( d1, d3, dblamount, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD );
69 for (
unsigned int i = 0; i < dblamount; ++i ) {
75 ADHERETOLOC (
double, data2, d2 );
76 ADHERETOLOC (
double, data3, d3 );
77 MPI_Allreduce ( d2, d3, dblamount, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD );
78 for (
unsigned int i = 0; i < dblamount; ++i ) {
84 ADHERETOLOC (
double, data1, d1 );
85 for (
unsigned int i = 0; i < dblamount; ++i ) {
86 if ( d1[i] != i * 1.0 * tasks ) {
87 cerr <<
"Result of allreduce not correct! Expected " << i * 1.0 * tasks <<
" at index d1[" << i <<
"], got " << d1[i] << endl;
94 ADHERETOLOC (
double, data2, d2 );
95 for (
unsigned int i = 0; i < dblamount; ++i ) {
96 if ( d2[i] != i * 1.0 * tasks * dblamount ) {
97 cerr <<
"Result of allreduce not correct! Expected " << i * 1.0 * dblamount *tasks <<
" at index d2[" << i <<
"], got " << d2[i] << endl;
105 cout <<
"Test done" << endl;
Main class to allocate memory that is managed by the rambrain memory defaultManager.
int main(int argc, char **argv)
Provides a test binary to check the behaviour of mpi in combination with the lib. ...
An implementation of managedSwap that is capable of kernel asynchronousIO.
scheduler working with a double linked cycle. Details see paper.