Skip to content
Snippets Groups Projects
Commit decd2774 authored by Markus Blatt's avatar Markus Blatt
Browse files

Removed additional define and used HAVE_MPI to decide whether we are

sequential or not.

[[Imported from SVN: r1560]]
parent 8223cdf2
No related branches found
No related tags found
No related merge requests found
......@@ -102,11 +102,6 @@ if MPI
endif
seqmatrixmarkettest_SOURCES = matrixmarkettest.cc
seqmatrixmarkettest_CPPFLAGS = $(AM_CPPFLAGS) \
$(DUNEMPICPPFLAGS) -DMM_SEQUENTIAL
seqmatrixmarkettest_LDFLAGS = $(AM_LDFLAGS)
seqmatrixmarkettest_LDADD = \
$(LDADD)
if MPI
matrixredisttest_SOURCES = matrixredisttest.cc
......
......@@ -6,7 +6,7 @@
#include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/common/float_cmp.hh>
#ifndef MM_SEQUENTIAL
#if HAVE_MPI
#include <dune/istl/paamg/test/anisotropic.hh>
#include "mpi.h"
#include <dune/istl/schwarz.hh>
......@@ -21,7 +21,7 @@
int main(int argc, char** argv)
{
#ifndef MM_SEQUENTIAL
#if HAVE_MPI
MPI_Init(&argc, &argv);
int size;
MPI_Comm_size(MPI_COMM_WORLD, &size);
......@@ -40,7 +40,7 @@ int main(int argc, char** argv)
typedef Dune::FieldVector<double,BS> VectorBlock;
typedef Dune::BlockVector<VectorBlock> BVector;
#ifndef MM_SEQUENTIAL
#ifndef HAVE_MPI
typedef int GlobalId;
typedef Dune::OwnerOverlapCopyCommunication<GlobalId> Communication;
Communication comm(MPI_COMM_WORLD);
......@@ -64,7 +64,7 @@ int main(int argc, char** argv)
*sentry=i;
}
#ifndef MM_SEQUENTIAL
#ifndef HAVE_MPI
comm.remoteIndices().rebuild<false>();
comm.copyOwnerToAll(bv,bv);
......@@ -85,7 +85,7 @@ int main(int argc, char** argv)
BCRSMat mat1;
BVector bv1,cv1;
#ifndef MM_SEQUENTIAL
#ifndef HAVE_MPI
Communication comm1(MPI_COMM_WORLD);
loadMatrixMarket(mat1, std::string("testmat"), comm1);
......@@ -126,7 +126,7 @@ int main(int argc, char** argv)
cv1.resize(mat1.M());
#ifndef MM_SEQUENTIAL
#ifndef HAVE_MPI
Dune::OverlappingSchwarzOperator<BCRSMat,BVector,BVector,Communication> op1(mat1, comm1);
op1.apply(bv1, cv1);
......@@ -148,7 +148,7 @@ int main(int argc, char** argv)
++ret;
}
#ifndef MM_SEQUENTIAL
#ifndef HAVE_MPI
if(ret!=0)
MPI_Abort(MPI_COMM_WORLD, ret);
MPI_Finalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment