Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
5d93fbe1
Commit
5d93fbe1
authored
Mar 22, 2010
by
mattijs
Browse files
ENH: Removed parmetis. Use ptscotch instead.
parent
658b7700
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/generation/snappyHexMesh/Make/options
View file @
5d93fbe1
...
...
@@ -11,7 +11,7 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-ldecompositionMethods \
-L$(FOAM_MPI_LIBBIN) -lptscotchDecomp
-lparMetisDecomp -lmetisDecomp
\
-L$(FOAM_MPI_LIBBIN) -lptscotchDecomp \
-lmeshTools \
-ldynamicMesh \
-lautoMesh
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
View file @
5d93fbe1
...
...
@@ -347,7 +347,7 @@ int main(int argc, char *argv[])
<<
"You have selected decomposition method "
<<
decomposer
.
typeName
<<
" which is not parallel aware."
<<
endl
<<
"Please select one that is (hierarchical, ptscotch
, parMetis
)"
<<
"Please select one that is (hierarchical, ptscotch)"
<<
exit
(
FatalError
);
}
...
...
applications/utilities/parallelProcessing/redistributeMeshPar/Make/options
View file @
5d93fbe1
...
...
@@ -7,6 +7,6 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-ldecompositionMethods \
-L$(FOAM_MPI_LIBBIN) -lptscotchDecomp
-lparMetisDecomp -lmetisDecomp
\
-L$(FOAM_MPI_LIBBIN) -lptscotchDecomp \
-lmeshTools \
-ldynamicMesh
src/dummyThirdParty/Allwmake
View file @
5d93fbe1
...
...
@@ -5,7 +5,6 @@ set -x
wmake libso scotchDecomp
wmake libso ptscotchDecomp
wmake libso metisDecomp
wmake libso parMetisDecomp
wmake libso MGridGen
...
...
src/dummyThirdParty/parMetisDecomp/Make/files
deleted
100644 → 0
View file @
658b7700
dummyParMetisDecomp.C
LIB = $(FOAM_LIBBIN)/dummy/libparMetisDecomp
src/dummyThirdParty/parMetisDecomp/Make/options
deleted
100644 → 0
View file @
658b7700
EXE_INC = \
-I$(FOAM_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(FOAM_SRC)/parallel/decompose/parMetisDecomp/lnInclude
LIB_LIBS =
src/dummyThirdParty/parMetisDecomp/dummyParMetisDecomp.C
deleted
100644 → 0
View file @
658b7700
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include
"parMetisDecomp.H"
#include
"addToRunTimeSelectionTable.H"
#include
"polyMesh.H"
#include
"Time.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace
Foam
{
defineTypeNameAndDebug
(
parMetisDecomp
,
0
);
addToRunTimeSelectionTable
(
decompositionMethod
,
parMetisDecomp
,
dictionaryMesh
);
}
static
const
char
*
notImplementedMessage
=
"You are trying to use parMetis but do not have the parMetisDecomp library "
"loaded.
\n
"
"This message is from the dummy parMetisDecomp stub library instead.
\n
"
"
\n
"
"Please install parMetis and make sure that libparMetis.so is in your "
"LD_LIBRARY_PATH.
\n
"
"The parMetisDecomp library can then be built in "
"$FOAM_SRC/parallel/decompose/decompositionMethods/parMetisDecomp
\n
"
;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
//- Does prevention of 0 cell domains and calls parmetis.
Foam
::
label
Foam
::
parMetisDecomp
::
decompose
(
Field
<
int
>&
xadj
,
Field
<
int
>&
adjncy
,
const
pointField
&
cellCentres
,
Field
<
int
>&
cellWeights
,
Field
<
int
>&
faceWeights
,
const
List
<
int
>&
options
,
List
<
int
>&
finalDecomp
)
{
FatalErrorIn
(
"label parMetisDecomp::decompose"
"("
"Field<int>&, "
"Field<int>&, "
"const pointField&, "
"Field<int>&, "
"Field<int>&, "
"const List<int>&, "
"List<int>&"
")"
)
<<
notImplementedMessage
<<
exit
(
FatalError
);
return
-
1
;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
parMetisDecomp
::
parMetisDecomp
(
const
dictionary
&
decompositionDict
,
const
polyMesh
&
mesh
)
:
decompositionMethod
(
decompositionDict
),
mesh_
(
mesh
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam
::
labelList
Foam
::
parMetisDecomp
::
decompose
(
const
pointField
&
cc
,
const
scalarField
&
cWeights
)
{
FatalErrorIn
(
"labelList parMetisDecomp::decompose"
"("
"const pointField&, "
"const scalarField&"
")"
)
<<
notImplementedMessage
<<
exit
(
FatalError
);
return
labelList
();
}
Foam
::
labelList
Foam
::
parMetisDecomp
::
decompose
(
const
labelList
&
cellToRegion
,
const
pointField
&
regionPoints
,
const
scalarField
&
regionWeights
)
{
FatalErrorIn
(
"labelList parMetisDecomp::decompose"
"("
"const labelList&, "
"const pointField&, "
"const scalarField&"
")"
)
<<
notImplementedMessage
<<
exit
(
FatalError
);
return
labelList
();
}
Foam
::
labelList
Foam
::
parMetisDecomp
::
decompose
(
const
labelListList
&
globalCellCells
,
const
pointField
&
cellCentres
,
const
scalarField
&
cWeights
)
{
FatalErrorIn
(
"labelList parMetisDecomp::decompose"
"("
"const labelListList&, "
"const pointField&, "
"const scalarField&"
")"
)
<<
notImplementedMessage
<<
exit
(
FatalError
);
return
labelList
();
}
// ************************************************************************* //
src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C
View file @
5d93fbe1
...
...
@@ -431,7 +431,7 @@ Foam::autoHexMeshDriver::autoHexMeshDriver
<<
"You have selected decomposition method "
<<
decomposer
.
typeName
<<
" which is not parallel aware."
<<
endl
<<
"Please select one that is (
parMetis,
hierarchical)"
<<
"Please select one that is (hierarchical
, ptscotch
)"
<<
exit
(
FatalError
);
}
...
...
src/parallel/decompose/Allwmake
View file @
5d93fbe1
...
...
@@ -9,7 +9,7 @@ wmake libso metisDecomp
if
[
-d
"
$FOAM_MPI_LIBBIN
"
]
then
(
WM_OPTIONS
=
${
WM_OPTIONS
}
$WM_MPLIB
;
wmake libso ptscotchDecomp
&&
wmake libso parMetisDecomp
)
(
WM_OPTIONS
=
${
WM_OPTIONS
}
$WM_MPLIB
;
wmake libso ptscotchDecomp
)
fi
wmake libso decompositionMethods
...
...
src/parallel/decompose/AllwmakeLnInclude
View file @
5d93fbe1
...
...
@@ -4,7 +4,6 @@ set -x
wmakeLnInclude decompositionMethods
wmakeLnInclude metisDecomp
wmakeLnInclude parMetisDecomp
wmakeLnInclude scotchDecomp
wmakeLnInclude ptscotchDecomp
...
...
src/parallel/decompose/decompositionMethods/Make/options
View file @
5d93fbe1
EXE_INC =
LIB_LIBS = \
/* -L$(FOAM_LIBBIN)/dummy */ \
/* -L$(FOAM_MPI_LIBBIN) */ \
/* -lscotchDecomp */ \
/* -lmetisDecomp */ \
/* -lparMetisDecomp */
LIB_LIBS =
src/parallel/decompose/parMetisDecomp/Make/files
deleted
100644 → 0
View file @
658b7700
parMetisDecomp.C
LIB = $(FOAM_MPI_LIBBIN)/libparMetisDecomp
src/parallel/decompose/parMetisDecomp/Make/options
deleted
100644 → 0
View file @
658b7700
include $(RULES)/mplib$(WM_MPLIB)
EXE_INC = \
$(PFLAGS) $(PINC) \
-I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1/ParMETISLib \
-I$(WM_THIRD_PARTY_DIR)/ParMetis-3.1 \
-I../decompositionMethods/lnInclude \
-I../metisDecomp/lnInclude \
-I../scotchDecomp/lnInclude
LIB_LIBS = \
-L$(FOAM_MPI_LIBBIN) \
-lmetis-parmetis \
-lparmetis
src/parallel/decompose/parMetisDecomp/parMetisDecomp.C
deleted
100644 → 0
View file @
658b7700
This diff is collapsed.
Click to expand it.
src/parallel/decompose/parMetisDecomp/parMetisDecomp.H
deleted
100644 → 0
View file @
658b7700
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::parMetisDecomp
Description
SourceFiles
parMetisDecomp.C
\*---------------------------------------------------------------------------*/
#ifndef parMetisDecomp_H
#define parMetisDecomp_H
#include
"decompositionMethod.H"
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class parMetisDecomp Declaration
\*---------------------------------------------------------------------------*/
class
parMetisDecomp
:
public
decompositionMethod
{
// Private data
const
polyMesh
&
mesh_
;
// Private Member Functions
//- Insert list in front of list.
template
<
class
Type
>
static
void
prepend
(
const
UList
<
Type
>&
,
List
<
Type
>&
);
//- Insert list at end of list.
template
<
class
Type
>
static
void
append
(
const
UList
<
Type
>&
,
List
<
Type
>&
);
label
decompose
(
Field
<
int
>&
xadj
,
Field
<
int
>&
adjncy
,
const
pointField
&
cellCentres
,
Field
<
int
>&
cellWeights
,
Field
<
int
>&
faceWeights
,
const
List
<
int
>&
options
,
List
<
int
>&
finalDecomp
);
//- Disallow default bitwise copy construct and assignment
void
operator
=
(
const
parMetisDecomp
&
);
parMetisDecomp
(
const
parMetisDecomp
&
);
public:
//- Runtime type information
TypeName
(
"parMetis"
);
// Constructors
//- Construct given the decomposition dictionary and mesh
parMetisDecomp
(
const
dictionary
&
decompositionDict
,
const
polyMesh
&
mesh
);
// Destructor
~
parMetisDecomp
()
{}
// Member Functions
//- parMetis handles Foam processor boundaries
virtual
bool
parallelAware
()
const
{
return
true
;
}
//- Return for every coordinate the wanted processor number. Use the
// mesh connectivity (if needed)
// Weights get normalised so the minimum value is 1 before truncation
// to an integer so the weights should be multiples of the minimum
// value. The overall sum of weights might otherwise overflow.
virtual
labelList
decompose
(
const
pointField
&
points
,
const
scalarField
&
pointWeights
);
//- Return for every coordinate the wanted processor number. Gets
// passed agglomeration map (from fine to coarse cells) and coarse cell
// location. Can be overridden by decomposers that provide this
// functionality natively.
// See note on weights above.
virtual
labelList
decompose
(
const
labelList
&
cellToRegion
,
const
pointField
&
regionPoints
,
const
scalarField
&
regionWeights
);
//- Return for every coordinate the wanted processor number. Explicitly
// provided mesh connectivity.
// The connectivity is equal to mesh.cellCells() except for
// - in parallel the cell numbers are global cell numbers (starting
// from 0 at processor0 and then incrementing all through the
// processors)
// - the connections are across coupled patches
// See note on weights above.
virtual
labelList
decompose
(
const
labelListList
&
globalCellCells
,
const
pointField
&
cc
,
const
scalarField
&
cWeights
);
//- Helper to convert mesh connectivity into distributed CSR
static
void
calcMetisDistributedCSR
(
const
polyMesh
&
,
List
<
int
>&
adjncy
,
List
<
int
>&
xadj
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "parMetisDecompTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
src/parallel/decompose/parMetisDecomp/parMetisDecompTemplates.C
deleted
100644 → 0
View file @
658b7700
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include
"parMetisDecomp.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Insert at front of list
template
<
class
Type
>
void
Foam
::
parMetisDecomp
::
prepend
(
const
UList
<
Type
>&
extraLst
,
List
<
Type
>&
lst
)
{
label
nExtra
=
extraLst
.
size
();
// Make space for initial elements
lst
.
setSize
(
lst
.
size
()
+
nExtra
);
for
(
label
i
=
lst
.
size
()
-
1
;
i
>=
nExtra
;
i
--
)
{
lst
[
i
]
=
lst
[
i
-
nExtra
];
}
// Insert at front
forAll
(
extraLst
,
i
)
{
lst
[
i
]
=
extraLst
[
i
];
}
}
// Insert at back of list
template
<
class
Type
>
void
Foam
::
parMetisDecomp
::
append
(
const
UList
<
Type
>&
extraLst
,
List
<
Type
>&
lst
)
{
label
sz
=
lst
.
size
();
// Make space for initial elements
lst
.
setSize
(
sz
+
extraLst
.
size
());
// Insert at back
forAll
(
extraLst
,
i
)
{
lst
[
sz
++
]
=
extraLst
[
i
];
}
}
// ************************************************************************* //
src/parallel/decompose/ptscotchDecomp/Make/options
View file @
5d93fbe1
...
...
@@ -4,9 +4,7 @@ EXE_INC = \
$(PFLAGS) $(PINC) \
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
-I/usr/include/scotch \
/* -I$(LIB_SRC)/parallel/decompose/parMetisDecomp */ \
/* -I$(LIB_SRC)/parallel/decompose/scotchDecomp */ \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-L$(FOAM_MPI_LIBBIN) -lptscotch -lptscotcherrexit
src/parallel/decompose/scotchDecomp/scotchDecomp.C
View file @
5d93fbe1
...
...
@@ -474,7 +474,7 @@ Foam::labelList Foam::scotchDecomp::decompose
{
FatalErrorIn
(
"
parMetis
Decomp::decompose(const labelList&, const pointField&)"
"
scotch
Decomp::decompose(const labelList&, const pointField&)"
)
<<
"Size of cell-to-coarse map "
<<
agglom
.
size
()
<<
" differs from number of cells in mesh "
<<
mesh_
.
nCells
()
<<
exit
(
FatalError
);
...
...
tutorials/incompressible/simpleFoam/motorBike/system/decomposeParDict
View file @
5d93fbe1
...
...
@@ -19,7 +19,7 @@ numberOfSubdomains 6;
method hierarchical;
// method metis;
// method p
arMetis
;
// method p
tscotch
;
simpleCoeffs
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment