changes to library and settings
This commit is contained in:
parent
c4069006ac
commit
eafe626e71
10 changed files with 58 additions and 101 deletions
1
ThirdParty/AllClean.stage2
vendored
1
ThirdParty/AllClean.stage2
vendored
|
@ -54,6 +54,7 @@ uninstallPackage openmpi-1.4.1
|
|||
uninstallPackage openmpi-1.4.3
|
||||
uninstallPackage openmpi-1.5
|
||||
uninstallPackage openmpi-1.6.3
|
||||
uninstallPackage openmpi-1.6.5
|
||||
|
||||
echo
|
||||
echo ========================================
|
||||
|
|
2
ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec
vendored
2
ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec
vendored
|
@ -98,6 +98,8 @@ Patch0: metis-5.0pre2_patch_darwin
|
|||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||
|
||||
[ -n "$WM_CXX" ] && export OMPI_CXX="$WM_CXX"
|
||||
|
||||
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||
|
||||
%ifos darwin
|
||||
|
|
4
ThirdParty/rpmBuild/SPECS/openmpi-1.6.5.spec
vendored
4
ThirdParty/rpmBuild/SPECS/openmpi-1.6.5.spec
vendored
|
@ -67,13 +67,13 @@
|
|||
|
||||
%define buildroot %{_topdir}/BUILD/%{name}-%{version}-root
|
||||
|
||||
BuildRoot: %{buildroot}
|
||||
BuildRoot: %{buildroot}
|
||||
Summary: openmpi
|
||||
License: Unkown
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
URL: http://www.open-mpi.org/software/ompi/v1.6/downloads
|
||||
URL: http://www.open-mpi.org/software/ompi/v1.6/downloads
|
||||
Source: %url/%{name}-%{version}.tar.gz
|
||||
Prefix: %{_prefix}
|
||||
Group: Development/Tools
|
||||
|
|
|
@ -101,6 +101,8 @@ Patch1: ParMetis-3.1.1.patch
|
|||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||
|
||||
[ -n "$WM_CXX" ] && export OMPI_CXX="$WM_CXX"
|
||||
|
||||
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
|
||||
make config
|
||||
make -j $WM_NCOMPPROCS
|
||||
|
@ -108,11 +110,11 @@ Patch1: ParMetis-3.1.1.patch
|
|||
|
||||
%install
|
||||
# Manual installation
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include/ParMETISLib
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/include
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_installPrefix}/lib
|
||||
|
||||
cp metis/include/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include
|
||||
cp include/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include
|
||||
cp metis/libmetis/*.h $RPM_BUILD_ROOT/%{_installPrefix}/include/ParMETISLib
|
||||
|
||||
cp build/*/libparmetis/lib* $RPM_BUILD_ROOT/%{_installPrefix}/lib
|
||||
cp build/*/libmetis/lib* $RPM_BUILD_ROOT/%{_installPrefix}/lib
|
|
@ -414,14 +414,14 @@ endif
|
|||
|
||||
# Metis library if available
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ( $?METIS_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS/etc/metis-5.0pre2.csh
|
||||
if ( $?METIS_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh
|
||||
endif
|
||||
|
||||
# ParMetis library if available
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ( $?PARMETIS_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS/etc/ParMetis-3.1.1.csh
|
||||
if ( $?PARMETIS_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh
|
||||
endif
|
||||
|
||||
# ParMGridGen library if available
|
||||
|
@ -439,8 +439,8 @@ endif
|
|||
|
||||
# Scotch library if available
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if ( $?SCOTCH_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS/etc/scotch-5.1.10b.csh
|
||||
if ( $?SCOTCH_SYSTEM == 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ) then
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.csh
|
||||
endif
|
||||
|
||||
# Switch on the hoard memory allocator if available
|
||||
|
|
|
@ -484,16 +484,16 @@ export MPI_BUFFER_SIZE
|
|||
|
||||
# Load Metis library
|
||||
# ~~~~~~~~~~~~~~~~~~
|
||||
[ -z "$METIS_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.0pre2/platforms/$WM_OPTIONS/etc/metis-5.0pre2.sh
|
||||
[ -z "$METIS_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.sh
|
||||
}
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " METIS_DIR is initialized to: $METIS_DIR"
|
||||
|
||||
|
||||
# Load ParMetis library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~
|
||||
[ -z "$PARMETIS_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMetis-3.1.1/platforms/$WM_OPTIONS/etc/ParMetis-3.1.1.sh
|
||||
[ -z "$PARMETIS_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.sh
|
||||
}
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMETIS_DIR is initialized to: $PARMETIS_DIR"
|
||||
|
||||
|
@ -503,7 +503,7 @@ export MPI_BUFFER_SIZE
|
|||
[ -z "$PARMGRIDGEN_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/ParMGridGen-1.0/platforms/$WM_OPTIONS/etc/ParMGridGen-1.0.sh
|
||||
}
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMGRIDGEN_DIR is initialized to: $PARMGRIDGEN_DIR"
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMGR IDGEN_DIR is initialized to: $PARMGRIDGEN_DIR"
|
||||
|
||||
|
||||
# Load Libccmio library
|
||||
|
@ -516,8 +516,8 @@ export MPI_BUFFER_SIZE
|
|||
|
||||
# Load Scotch library
|
||||
# ~~~~~~~~~~~~~~~~~~~
|
||||
[ -z "$SCOTCH_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-5.1.10b/platforms/$WM_OPTIONS/etc/scotch-5.1.10b.sh
|
||||
[ -z "$SCOTCH_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ] && {
|
||||
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.sh
|
||||
}
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"
|
||||
|
||||
|
|
|
@ -3,6 +3,4 @@ EXE_INC =
|
|||
LIB_LIBS = \
|
||||
-L$(FOAM_LIBBIN)/dummy \
|
||||
-L$(FOAM_MPI_LIBBIN) \
|
||||
-lscotchDecomp \
|
||||
-lmetisDecomp \
|
||||
-lparMetisDecomp
|
||||
-lscotchDecomp
|
||||
|
|
|
@ -5,6 +5,4 @@ EXE_INC = \
|
|||
|
||||
LIB_LIBS = \
|
||||
-L$(FOAM_LIBBIN)/dummy \
|
||||
-L$(METIS_LIB_DIR) -lmetis \
|
||||
-L$(METIS_LIB_DIR) -lGKlib
|
||||
|
||||
-L$(METIS_LIB_DIR) -lmetis
|
||||
|
|
|
@ -62,9 +62,6 @@ Foam::label Foam::metisDecomp::decompose
|
|||
List<int>& finalDecomp
|
||||
)
|
||||
{
|
||||
// C style numbering
|
||||
int numFlag = 0;
|
||||
|
||||
// Method of decomposition
|
||||
// recursive: multi-level recursive bisection (default)
|
||||
// k-way: multi-level k-way
|
||||
|
@ -207,96 +204,57 @@ Foam::label Foam::metisDecomp::decompose
|
|||
int edgeCut = 0;
|
||||
|
||||
// Vertex weight info
|
||||
int wgtFlag = 0;
|
||||
int* vwgtPtr = NULL;
|
||||
int* adjwgtPtr = NULL;
|
||||
|
||||
if (cellWeights.size())
|
||||
{
|
||||
vwgtPtr = cellWeights.begin();
|
||||
wgtFlag += 2; // Weights on vertices
|
||||
}
|
||||
if (faceWeights.size())
|
||||
{
|
||||
adjwgtPtr = faceWeights.begin();
|
||||
wgtFlag += 1; // Weights on edges
|
||||
}
|
||||
|
||||
int one = 1;
|
||||
|
||||
if (method == "recursive")
|
||||
{
|
||||
if (processorWeights.size())
|
||||
{
|
||||
METIS_WPartGraphRecursive
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
adjwgtPtr, // no edgeweights
|
||||
&wgtFlag,
|
||||
&numFlag,
|
||||
&nProcs,
|
||||
processorWeights.begin(),
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
METIS_PartGraphRecursive
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
adjwgtPtr, // no edgeweights
|
||||
&wgtFlag,
|
||||
&numFlag,
|
||||
&nProcs,
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
METIS_PartGraphRecursive
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
&one,
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
NULL,
|
||||
adjwgtPtr, // no edgeweights
|
||||
&nProcs,
|
||||
processorWeights.begin(),
|
||||
NULL,
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (processorWeights.size())
|
||||
{
|
||||
METIS_WPartGraphKway
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
adjwgtPtr, // no edgeweights
|
||||
&wgtFlag,
|
||||
&numFlag,
|
||||
&nProcs,
|
||||
processorWeights.begin(),
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
METIS_PartGraphKway
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
adjwgtPtr, // no edgeweights
|
||||
&wgtFlag,
|
||||
&numFlag,
|
||||
&nProcs,
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
METIS_PartGraphKway
|
||||
(
|
||||
&numCells, // num vertices in graph
|
||||
&one,
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
NULL,
|
||||
adjwgtPtr, // no edgeweights
|
||||
&nProcs,
|
||||
processorWeights.begin(),
|
||||
NULL,
|
||||
options.begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin()
|
||||
);
|
||||
}
|
||||
|
||||
return edgeCut;
|
||||
|
|
|
@ -2,7 +2,6 @@ include $(RULES)/mplib$(WM_MPLIB)
|
|||
|
||||
EXE_INC = \
|
||||
$(PFLAGS) $(PINC) \
|
||||
-I$(PARMETIS_INCLUDE_DIR)/ParMETISLib \
|
||||
-I$(PARMETIS_INCLUDE_DIR) \
|
||||
-I../decompositionMethods/lnInclude \
|
||||
-I../metisDecomp/lnInclude \
|
||||
|
@ -10,5 +9,4 @@ EXE_INC = \
|
|||
|
||||
LIB_LIBS = \
|
||||
-L$(FOAM_MPI_LIBBIN) \
|
||||
-L$(PARMETIS_LIB_DIR) -lmetis-parmetis \
|
||||
-L$(PARMETIS_LIB_DIR) -lparmetis
|
||||
|
|
Reference in a new issue