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