From e2118a76b9e5bf88609e744dc0d9c913c0f15835 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sun, 25 Jan 2009 13:06:46 +0000 Subject: [PATCH] parallal restructure --- configure.ac | 7 +- libsrc/parallel/parallelmesh.cpp | 122 ++++++++++++++++--------------- libsrc/parallel/paralleltop.cpp | 80 ++++++++++---------- ng/ngappinit.cpp | 8 +- ng/ngpkg.cpp | 2 +- nglib/nglib.cpp | 6 +- 6 files changed, 117 insertions(+), 108 deletions(-) diff --git a/configure.ac b/configure.ac index 3059a245..f0cf7e0d 100644 --- a/configure.ac +++ b/configure.ac @@ -53,12 +53,13 @@ AC_ARG_ENABLE([nglib], AC_ARG_ENABLE([parallel], [ --enable-parallel enable mpi parallelization], - [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/usr/share/metis/Lib -DMETIS") - AC_SUBST([MPI_LIBS], "-lmetis -L/opt/mpich/ch-p4/lib -lmpich") + [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/home/joachim/download/metis-4.0/Lib -DMETIS") + AC_SUBST([MPI_LIBS], "-L/home/joachim/download/metis-4.0 -lmetis -L/opt/mpich/ch-p4/lib64 -lmpich") ] ) - +# [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/usr/share/metis/Lib -DMETIS") +# AC_SUBST([MPI_LIBS], "-lmetis -L/opt/mpich/ch-p4/lib -lmpich") # AC_HEADER_STDC diff --git a/libsrc/parallel/parallelmesh.cpp b/libsrc/parallel/parallelmesh.cpp index b536007d..bf559ef1 100644 --- a/libsrc/parallel/parallelmesh.cpp +++ b/libsrc/parallel/parallelmesh.cpp @@ -4,6 +4,14 @@ #include "parallel.hpp" #include "paralleltop.hpp" + +#ifdef METIS +namespace metis { extern "C" { +#include +} } +#endif + + using namespace metis; namespace netgen @@ -66,7 +74,7 @@ namespace netgen { NgProfiler::RegionTimer reg(timer_pts); - ARRAY pointarray; + Array pointarray; MyMPI_Recv ( pointarray, 0 ); int numvert = pointarray.Size() / 5; @@ -88,7 +96,7 @@ namespace netgen (*this)[PointIndex(vert+1)] .Singularity ( pointarray[vert*5+4] ); } - ARRAY dist_pnums; + Array dist_pnums; MyMPI_Recv ( dist_pnums, 0); for (int hi = 0; hi < dist_pnums.Size(); hi += 3) @@ -106,7 +114,7 @@ namespace netgen Element el; - ARRAY elarray; + Array elarray; MyMPI_Recv ( elarray, 0); int ind = 0; @@ -132,7 +140,7 @@ namespace netgen if (strcmp (st.c_str(), "facedescriptor") == 0) { - ARRAY doublebuf; + Array doublebuf; MyMPI_Recv( doublebuf, 0 ); int faceind = AddFaceDescriptor (FaceDescriptor(int(doublebuf[0]), int(doublebuf[1]), int(doublebuf[2]), 0)); GetFaceDescriptor(faceind).SetBCProperty (int(doublebuf[3])); @@ -472,7 +480,7 @@ namespace netgen - void Mesh :: PartHybridMesh () // ARRAY & neloc ) + void Mesh :: PartHybridMesh () // Array & neloc ) { int ne = GetNE(); @@ -494,7 +502,7 @@ namespace netgen xadj = new idxtype[nn+1]; part = new idxtype[nn]; - ARRAY cnt(nn+1); + Array cnt(nn+1); cnt = 0; for ( int edge = 1; edge <= nedges; edge++ ) @@ -533,7 +541,7 @@ namespace netgen metis :: METIS_PartGraphKway ( &nn, xadj, adjacency, v_weights, e_weights, &weightflag, &numflag, &nparts, options, &edgecut, part ); - ARRAY nodesinpart(ntasks); + Array nodesinpart(ntasks); for ( int el = 1; el <= ne; el++ ) { @@ -568,7 +576,7 @@ namespace netgen } - void Mesh :: PartDualHybridMesh ( ) // ARRAY & neloc ) + void Mesh :: PartDualHybridMesh ( ) // Array & neloc ) { int ne = GetNE(); @@ -587,15 +595,15 @@ namespace netgen int edgecut; idxtype * part; - ARRAY facevolels1(nfaces), facevolels2(nfaces); + Array facevolels1(nfaces), facevolels2(nfaces); facevolels1 = -1; facevolels2 = -1; - ARRAY elfaces; + Array elfaces; xadj = new idxtype[ne+1]; part = new idxtype[ne]; - ARRAY cnt(ne+1); + Array cnt(ne+1); cnt = 0; for ( int el=1; el <= ne; el++ ) @@ -650,7 +658,7 @@ namespace netgen NgProfiler::StopTimer (timermetis); - ARRAY nodesinpart(ntasks); + Array nodesinpart(ntasks); for ( int el = 1; el <= ne; el++ ) { @@ -682,11 +690,11 @@ namespace netgen int ne = GetNSE(); int nv = GetNV(); - ARRAY xadj(ne+1); - ARRAY adjacency(ne*4); + Array xadj(ne+1); + Array adjacency(ne*4); // first, build the vertex 2 element table: - ARRAY cnt(nv); + Array cnt(nv); cnt = 0; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) for (int j = 0; j < (*this)[sei].GetNP(); j++) @@ -700,7 +708,7 @@ namespace netgen // find all neighbour elements int cntnb = 0; - ARRAY marks(ne); // to visit each neighbour just once + Array marks(ne); // to visit each neighbour just once marks = -1; for (SurfaceElementIndex sei = 0; sei < ne; sei++) { @@ -742,7 +750,7 @@ namespace netgen int options[5]; options[0] = 0; int edgecut; - ARRAY part(ne); + Array part(ne); for ( int el = 0; el < ne; el++ ) BubbleSort (adjacency.Range (xadj[el], xadj[el+1])); @@ -759,7 +767,7 @@ namespace netgen - void Mesh :: SendMesh () const // Mesh * mastermesh, ARRAY & neloc ) const + void Mesh :: SendMesh () const // Mesh * mastermesh, Array & neloc ) const { const Mesh * mastermesh = this; // the original plan was different @@ -797,7 +805,7 @@ namespace netgen // MPI_Barrier (MPI_COMM_WORLD); - ARRAY num_els_on_proc(ntasks); + Array num_els_on_proc(ntasks); num_els_on_proc = 0; for (ElementIndex ei = 0; ei < mastermesh->GetNE(); ei++) num_els_on_proc[(*this)[ei].GetPartition()]++; @@ -817,8 +825,8 @@ namespace netgen // get number of vertices for each processor - ARRAY elarraysize(ntasks); - ARRAY nelloc ( ntasks ); + Array elarraysize(ntasks); + Array nelloc ( ntasks ); nelloc = 0; elarraysize = 1; @@ -830,10 +838,10 @@ namespace netgen els_of_proc.Add ( (*this)[ei].GetPartition(), ei); - ARRAY vert_flag ( GetNV() ); + Array vert_flag ( GetNV() ); - ARRAY num_verts_on_proc (ntasks); - ARRAY num_procs_on_vert ( GetNV() ); + Array num_verts_on_proc (ntasks); + Array num_procs_on_vert ( GetNV() ); num_verts_on_proc = 0; num_procs_on_vert = 0; @@ -903,7 +911,7 @@ namespace netgen } - ARRAY nvi5(ntasks); + Array nvi5(ntasks); for (int i = 0; i < ntasks; i++) nvi5[i] = 5 * num_verts_on_proc[i]; @@ -934,7 +942,7 @@ namespace netgen NgProfiler::StopTimer (timer3); NgProfiler::StartTimer (timer4); - ARRAY num_distpnums(ntasks); + Array num_distpnums(ntasks); num_distpnums = 0; for (int vert = 1; vert <= mastermesh -> GetNP(); vert++) @@ -1018,7 +1026,7 @@ namespace netgen PrintMessage ( 3, "Sending Face Descriptors" ); - ARRAY double6(6); + Array double6(6); for ( int dest = 1; dest < ntasks; dest++) for ( int fdi = 1; fdi <= mastermesh->GetNFD(); fdi++) { @@ -1048,7 +1056,7 @@ namespace netgen PrintMessage ( 3, "Sending Surface elements" ); - ARRAY nlocsel(ntasks), bufsize ( ntasks), seli(ntasks); + Array nlocsel(ntasks), bufsize ( ntasks), seli(ntasks); for ( int i = 0; i < ntasks; i++) { nlocsel[i] = 0; @@ -1088,7 +1096,7 @@ namespace netgen - ARRAY nselloc (ntasks); + Array nselloc (ntasks); nselloc = 0; for ( int dest = 1; dest < ntasks; dest++ ) @@ -1165,7 +1173,7 @@ namespace netgen MyMPI_Send ( "edgesegmentsgi", dest); - ARRAY nlocseg(ntasks), segi(ntasks); + Array nlocseg(ntasks), segi(ntasks); for ( int i = 0; i < ntasks; i++) { nlocseg[i] = 0; @@ -1175,7 +1183,7 @@ namespace netgen for ( int segi = 1; segi <= mastermesh -> GetNSeg(); segi ++ ) { - ARRAY volels; + Array volels; const MeshTopology & topol = mastermesh -> GetTopology(); topol . GetSegmentVolumeElements ( segi, volels ); const Segment & segm = mastermesh -> LineSegment (segi); @@ -1207,7 +1215,7 @@ namespace netgen // cout << "mastermesh " << mastermesh -> GetNSeg() << " lineseg " << mastermesh -> LineSegment (1) << endl; for ( int ls=1; ls <= mastermesh -> GetNSeg(); ls++) { - ARRAY volels; + Array volels; mastermesh -> GetTopology().GetSegmentVolumeElements ( ls, volels ); const Segment & seg = mastermesh -> LineSegment (ls); int dest; @@ -1290,7 +1298,7 @@ namespace netgen void Mesh :: UpdateOverlap() { (*testout) << "UPDATE OVERLAP" << endl; - ARRAY * globelnums; + Array * globelnums; #ifdef SCALASCA #pragma pomp inst begin(updateoverlap) @@ -1308,7 +1316,7 @@ namespace netgen int nfa = topology -> GetNFaces(); int nel = GetNE(); - ARRAY glob2loc_vert(nvglob); + Array glob2loc_vert(nvglob); glob2loc_vert = -1; for ( int locv = 1; locv <= GetNV(); locv++) @@ -1322,7 +1330,7 @@ namespace netgen addedpoint.Clear(); addedel.Clear(); - ARRAY distvert(ntasks), distel(ntasks), nsenddistel(ntasks); + Array distvert(ntasks), distel(ntasks), nsenddistel(ntasks); nsenddistel = 0; @@ -1346,7 +1354,7 @@ namespace netgen if ( node == cluster_rep ) continue; - ARRAY dests; + Array dests; int nneigh = 0; if ( node - GetNV() <= 0 ) // cluster representant is vertex { @@ -1403,16 +1411,16 @@ namespace netgen sendsel.Add(i, 0); } - ARRAY nsentsel (ntasks); + Array nsentsel (ntasks); nsentsel = 0; for ( int seli = 1; seli <= GetNSE(); seli++ ) { const Element2d & sel = SurfaceElement(seli); int selnp = sel.GetNP(); - ARRAY vert (selnp); + Array vert (selnp); - ARRAY alldests (0), dests; + Array alldests (0), dests; bool isparsel = false; for ( int i = 0; i < selnp; i++ ) @@ -1475,9 +1483,9 @@ namespace netgen { const Element & el = VolumeElement(eli); int elnp = el.GetNP(); - ARRAY vert (elnp); + Array vert (elnp); - ARRAY alldests (0), dests; + Array alldests (0), dests; for ( int i = 0; i < elnp; i++ ) { @@ -1515,19 +1523,19 @@ namespace netgen { const Element & el = VolumeElement(eli); int elnp = el.GetNP(); - ARRAY vert (elnp); + Array vert (elnp); // append to point list: // local pnum // global pnum // point coordinates - ARRAY points(elnp); + Array points(elnp); for ( int i = 0; i < elnp; i++ ) { vert[i] = el.PNum(i+1); points[i] = Point(vert[i]); - ARRAY knowndests; + Array knowndests; // send point to all dests which get the volume element for ( int dest = 0; dest < ntasks; dest ++ ) { @@ -1598,9 +1606,9 @@ namespace netgen distel = 0; // sizes of sendpoints, sendelements, sendsels - ARRAY sendsize_pts(ntasks), recvsize_pts(ntasks); - ARRAY sendsize_els(ntasks), recvsize_els(ntasks); - ARRAY sendsize_sels(ntasks), recvsize_sels(ntasks); + Array sendsize_pts(ntasks), recvsize_pts(ntasks); + Array sendsize_els(ntasks), recvsize_els(ntasks); + Array sendsize_sels(ntasks), recvsize_sels(ntasks); for (int i = 0; i < ntasks; i++) { @@ -1625,8 +1633,8 @@ namespace netgen recvsel.SetElementSizesToMaxSizes (); /* - ARRAY sendrequest(3*ntasks), recvrequest(3*ntasks); - ARRAY status(3*ntasks); + Array sendrequest(3*ntasks), recvrequest(3*ntasks); + Array status(3*ntasks); for ( int proc = 1; proc < ntasks; proc++) { @@ -1655,7 +1663,7 @@ namespace netgen } */ - ARRAY requests; + Array requests; for ( int proc = 1; proc < ntasks; proc++) { @@ -1682,12 +1690,12 @@ namespace netgen - ARRAY * distpnum2parpnum; - distpnum2parpnum = new ARRAY [2]; + Array * distpnum2parpnum; + distpnum2parpnum = new Array [2]; distpnum2parpnum[0].SetSize(0); distpnum2parpnum[1].SetSize(0); - ARRAY firstdistpnum (ntasks); + Array firstdistpnum (ntasks); for ( int sender = 1; sender < ntasks; sender++) @@ -1748,7 +1756,7 @@ namespace netgen int distelnum = (recvelements[sender])[ii++]; int globelnum = (recvelements[sender])[ii++] ; int elnp = (recvelements[sender])[ii++] ; - ARRAY pnums(elnp), globpnums(elnp); + Array pnums(elnp), globpnums(elnp); // append volel ELEMENT_TYPE eltype; @@ -1802,8 +1810,8 @@ namespace netgen int distselnum = (recvsel[sender])[ii++]; int selnp = (recvsel[sender])[ii++] ; - ARRAY globpnums(selnp); - ARRAY pnums(selnp); + Array globpnums(selnp); + Array pnums(selnp); // append volel ELEMENT_TYPE eltype; @@ -1840,7 +1848,7 @@ namespace netgen } - globelnums = new ARRAY; + globelnums = new Array; if ( id == 0 ) { for ( int dest = 1; dest < ntasks; dest++) diff --git a/libsrc/parallel/paralleltop.cpp b/libsrc/parallel/paralleltop.cpp index 3af1ea6d..ff8b12f5 100644 --- a/libsrc/parallel/paralleltop.cpp +++ b/libsrc/parallel/paralleltop.cpp @@ -216,7 +216,7 @@ int ParallelMeshTopology :: Glob2Loc_Segm (int globnum ) for ( int i = 1; i <= nfa; i++ ) if ( IsExchangeFace(i) ) { - ARRAY facevert; + Array facevert; mesh . GetTopology().GetFaceVertices(i, facevert); (*testout) << "exchange face " << i << ": global vertices " ; @@ -235,7 +235,7 @@ int ParallelMeshTopology :: Glob2Loc_Segm (int globnum ) for ( int i = 1; i < mesh.GetNE(); i++) { if ( !IsExchangeElement(i) ) continue; - ARRAY vert; + Array vert; const Element & el = mesh.VolumeElement(i); (*testout) << "parallel local element " << i << endl; @@ -333,7 +333,7 @@ int ParallelMeshTopology :: GetNDistantElNums ( int locelnum ) const // gibt anzahl an distant pnums zurueck - // * pnums entspricht ARRAY + // * pnums entspricht Array int ParallelMeshTopology :: GetDistantPNums ( int locpnum, int * distpnums ) const { // distpnums[0] = loc2distvert[locpnum][0]; @@ -520,7 +520,7 @@ int ParallelMeshTopology :: GetDistantElNums ( int locelnum, int * distelnums ) loc2distsegm.Add (locnum-1, distnum); } - void ParallelMeshTopology :: GetVertNeighbours ( int vnum, ARRAY & dests ) const + void ParallelMeshTopology :: GetVertNeighbours ( int vnum, Array & dests ) const { dests.SetSize(0); int i = 1; @@ -577,7 +577,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () *testout << "ParallelMeshTopology :: UpdateCoarseGridGlobal" << endl; const MeshTopology & topology = mesh.GetTopology(); - ARRAY sendarray, recvarray; + Array sendarray, recvarray; nfa = topology . GetNFaces(); ned = topology . GetNEdges(); @@ -611,7 +611,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () SetExchangeVert ( dest, el.PNum(i+1) ); SetExchangeVert ( el.PNum(i+1) ); } - ARRAY edges; + Array edges; topology . GetElementEdges ( eli, edges ); for ( int i = 0; i < edges.Size(); i++ ) { @@ -651,7 +651,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () recvface.Clear(); /* - ARRAY edges, pnums, faces; + Array edges, pnums, faces; for ( int el = 1; el <= ne; el++ ) { topology.GetElementFaces (el, faces); @@ -705,7 +705,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () */ // new version - ARRAY edges, pnums, faces, elpnums; + Array edges, pnums, faces, elpnums; sendarray.Append (ne); for ( int el = 1; el <= ne; el++ ) { @@ -739,8 +739,8 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () edgeisinit.Clear(); vertisinit.Clear(); - // ARRAY for temporary use, to find local from global element fast - ARRAY glob2loc_el; + // Array for temporary use, to find local from global element fast + Array glob2loc_el; if ( id != 0 ) { glob2loc_el.SetSize (neglob); @@ -789,8 +789,8 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () - ARRAY faces, edges; - ARRAY pnums, globalpnums; + Array faces, edges; + Array pnums, globalpnums; int recv_ne = recvarray[ii++]; for (int hi = 0; hi < recv_ne; hi++) @@ -866,9 +866,9 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () if ( id == 0 ) return; - ARRAY * sendarray, *recvarray; - sendarray = new ARRAY (0); - recvarray = new ARRAY; + Array * sendarray, *recvarray; + sendarray = new Array (0); + recvarray = new Array; nfa = topology . GetNFaces(); ned = topology . GetNEdges(); @@ -888,7 +888,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () if ( !IsExchangeFace ( fa ) ) continue; - ARRAY edges, pnums; + Array edges, pnums; int globfa = GetDistantFaceNum ( 0, fa ); topology.GetFaceEdges ( fa, edges ); @@ -934,11 +934,11 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () edgeisinit.Clear(); vertisinit.Clear(); - // ARRAY for temporary use, to find local from global element fast + // Array for temporary use, to find local from global element fast // only for not too big meshes // seems ok, as low-order space is treated on one proc - ARRAY * glob2locfa; - glob2locfa = new ARRAY ( nfaglob ); + Array * glob2locfa; + glob2locfa = new Array ( nfaglob ); (*glob2locfa) = -1; for ( int locfa = 1; locfa <= nfa; locfa++) @@ -988,10 +988,10 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () continue; } - ARRAY edges; + Array edges; int fa = locfa; - ARRAY pnums, globalpnums; + Array pnums, globalpnums; topology.GetFaceEdges ( fa, edges ); topology.GetFaceVertices ( fa, pnums ); @@ -1090,9 +1090,9 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () // receive distant distnum, v1, v2 // find matching - ARRAY * sendarray, *recvarray; - sendarray = new ARRAY (0); - recvarray = new ARRAY; + Array * sendarray, *recvarray; + sendarray = new Array (0); + recvarray = new Array; sendarray->SetSize (0); @@ -1101,7 +1101,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () for ( int el = 1; el <= ne; el++ ) { - ARRAY edges, pnums, faces; + Array edges, pnums, faces; topology.GetElementFaces (el, faces); int globeli = GetLoc2Glob_VolEl(el); for ( int fai = 0; fai < faces.Size(); fai++) @@ -1160,12 +1160,12 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () edgeisinit.Clear(); vertisinit.Clear(); - // ARRAY for temporary use, to find local from global element fast + // Array for temporary use, to find local from global element fast // only for not too big meshes // seems ok, as low-order space is treated on one proc - ARRAY * glob2loc_el; + Array * glob2loc_el; - glob2loc_el = new ARRAY ( neglob ); + glob2loc_el = new Array ( neglob ); (*glob2loc_el) = -1; for ( int locel = 1; locel <= mesh.GetNE(); locel++) (*glob2loc_el)[GetLoc2Glob_VolEl(locel)] = locel; @@ -1222,7 +1222,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () continue; } - ARRAY faces, edges; + Array faces, edges; topology.GetElementFaces( volel, faces); topology.GetElementEdges ( volel, edges); for ( int fai= 0; fai < faces.Size(); fai++ ) @@ -1231,7 +1231,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () if ( !IsExchangeFace ( fa ) && sender != 0 ) continue; // if ( recvface.Test ( fa-1 ) ) continue; - ARRAY pnums, globalpnums; + Array pnums, globalpnums; //topology.GetFaceEdges ( fa, edges ); topology.GetFaceVertices ( fa, pnums ); @@ -1339,8 +1339,8 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () // nsurfel = mesh.GetNSE(); if ( id != 0 ) { - ARRAY * sendarray; - sendarray = new ARRAY (4); + Array * sendarray; + sendarray = new Array (4); int sendnfa = 0, sendned = 0; @@ -1382,7 +1382,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () else { - ARRAY * recvarray = new ARRAY; + Array * recvarray = new Array; for ( int sender = 1; sender < ntasks; sender++ ) { @@ -1443,7 +1443,7 @@ void ParallelMeshTopology :: UpdateCoarseGridGlobal () } - ARRAY pnums; + Array pnums; for ( int fa = 1; fa <= nfa; fa++) { topology.GetFaceVertices ( fa, pnums ); @@ -1472,7 +1472,7 @@ void ParallelMeshTopology :: UpdateExchangeElements() { if ( ! IsExchangeElement ( eli ) ) continue; const Element & el = mesh.VolumeElement(eli); - ARRAY faces, edges; + Array faces, edges; int np = el.NP(); topology.GetElementEdges ( eli, edges ); @@ -1495,14 +1495,14 @@ void ParallelMeshTopology :: UpdateExchangeElements() - ARRAY ** elementonproc, ** recvelonproc; - elementonproc = new ARRAY*[ntasks]; - recvelonproc = new ARRAY*[ntasks]; + Array ** elementonproc, ** recvelonproc; + elementonproc = new Array*[ntasks]; + recvelonproc = new Array*[ntasks]; for ( int i = 1; i < ntasks; i++ ) { - elementonproc[i] = new ARRAY(0); - recvelonproc[i] = new ARRAY(0); + elementonproc[i] = new Array(0); + recvelonproc[i] = new Array(0); } diff --git a/ng/ngappinit.cpp b/ng/ngappinit.cpp index 07d436c3..85423372 100644 --- a/ng/ngappinit.cpp +++ b/ng/ngappinit.cpp @@ -20,9 +20,9 @@ namespace netgen { int id, ntasks; + MPI_Group MPI_HIGHORDER_WORLD; + MPI_Comm MPI_HIGHORDER_COMM; } -MPI_Group MPI_HIGHORDER_WORLD; -MPI_Comm MPI_HIGHORDER_COMM; #endif @@ -96,8 +96,8 @@ int main(int argc, char ** argv) process_ranks[i] = i+1; MPI_Comm_group ( MPI_COMM_WORLD, &MPI_GROUP_WORLD); - MPI_Group_incl ( MPI_GROUP_WORLD, n_ho, process_ranks, & MPI_HIGHORDER_WORLD); - MPI_Comm_create ( MPI_COMM_WORLD, MPI_HIGHORDER_WORLD, &MPI_HIGHORDER_COMM); + MPI_Group_incl ( MPI_GROUP_WORLD, n_ho, process_ranks, & netgen::MPI_HIGHORDER_WORLD); + MPI_Comm_create ( MPI_COMM_WORLD, netgen::MPI_HIGHORDER_WORLD, & netgen::MPI_HIGHORDER_COMM); #pragma pomp inst begin(main) #endif diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp index e7333844..c8439602 100644 --- a/ng/ngpkg.cpp +++ b/ng/ngpkg.cpp @@ -3651,7 +3651,7 @@ namespace netgen Tcl_Interp * interp, int argc, tcl_const char *argv[]) { -#ifdef METIS +#ifdef METISold if (!mesh) { diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index 649770d9..089499d7 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -35,10 +35,10 @@ namespace netgen { namespace netgen { int id, ntasks; -} -MPI_Group MPI_HIGHORDER_WORLD; -MPI_Comm MPI_HIGHORDER_COMM; + MPI_Group MPI_HIGHORDER_WORLD; + MPI_Comm MPI_HIGHORDER_COMM; +} #endif