#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 = 10;
int MyLength = x.MyLength();
for( int i=0 ; i<MyLength ; ++i ) x[i] = 1.0*i;
double * pointer;
x.ExtractView( &pointer );
for( int i=0 ; i<MyLength ; ++i )
cout <<
"on proc " << Comm.
MyPID() <<
", x["
<< i << "] = " << pointer[i] << endl;
for( int i=0 ; i<MyLength ; ++i )
pointer[i] *= 10;
cout << x;
#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