From 46230f63c748797d2bcca93e82af70f6b06e535e Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 21 Mar 2011 15:09:33 +0100 Subject: [PATCH] MPI: check if multigrid and MPI setup is compatible --- FDTD/operator_cylindermultigrid.cpp | 12 ++++++++++++ FDTD/operator_mpi.cpp | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/FDTD/operator_cylindermultigrid.cpp b/FDTD/operator_cylindermultigrid.cpp index 3dbaae4..f8ecee5 100644 --- a/FDTD/operator_cylindermultigrid.cpp +++ b/FDTD/operator_cylindermultigrid.cpp @@ -148,12 +148,24 @@ void Operator_CylinderMultiGrid::SetTag(int tag) void Operator_CylinderMultiGrid::SetNeighborUp(int ny, int id) { + if (ny==0) + { + cerr << "Operator_CylinderMultiGrid::SetNeighborUp: Error: MPI segregation in radial direction not supported for a cylindircal multigrid. Exit!"; + MPI_Barrier(MPI_COMM_WORLD); + exit(-1); + } Operator_Cylinder::SetNeighborUp(ny,id); m_InnerOp->SetNeighborUp(ny,id); } void Operator_CylinderMultiGrid::SetNeighborDown(int ny, int id) { + if (ny==0) + { + cerr << "Operator_CylinderMultiGrid::SetNeighborDown: Error: MPI segregation in radial direction not supported for a cylindircal multigrid. Exit!"; + MPI_Barrier(MPI_COMM_WORLD); + exit(-1); + } Operator_Cylinder::SetNeighborDown(ny,id); m_InnerOp->SetNeighborDown(ny,id); } diff --git a/FDTD/operator_mpi.cpp b/FDTD/operator_mpi.cpp index 121f560..0d6635c 100644 --- a/FDTD/operator_mpi.cpp +++ b/FDTD/operator_mpi.cpp @@ -60,7 +60,6 @@ double Operator_MPI::CalcTimestep() return ret; } - void Operator_MPI::SetBoundaryCondition(int* BCs) { if (!m_MPI_Enabled)