#include "Didasko_ConfigDefs.h"
#if defined(HAVE_DIDASKO_EPETRA)
#include "Epetra_ConfigDefs.h"
#ifdef HAVE_MPI
#include "mpi.h"
#include "Epetra_MpiComm.h"
#else
#include "Epetra_SerialComm.h"
#endif
#include "Epetra_Map.h"
#include "Epetra_Vector.h"
int main(int argc, char *argv[])
{
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#else
#endif
int NumElements = 5;
b.Random();
double minval = 0.0;
double maxval = 0.0;
double aveval = 0.0;
x.MinValue( &minval );
x.MaxValue( &maxval );
x.MeanValue( &aveval );
cout << " min(x) = " << minval << endl;
cout << " max(x) = " << maxval << endl;
cout << " ave(x) = " << aveval << endl;
double xdotb;
cout << "x dot b = " << xdotb << endl;
int NVecs, MySize, GloSize;
NVecs = x.NumVectors();
MySize = x.MyLength();
GloSize = x.GlobalLength();
cout << "Number of vectors = " << NVecs << endl;
cout << "Local Size = " << MySize << endl;
cout << "Global Size = " << GloSize << endl;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return( EXIT_SUCCESS );
}
#else
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("Please configure Didasko with:\n"
"--enable-epetra");
return 0;
}
#endif