Permalink
Browse files

Changes to make compatible with latest Elemental

These are changes to make compatible with the latest Elemental trunk.
This required changing the include paths to the new elemental layout and
renaming ResizeTo to Resize.  I ended up having some of Clique's
ResizeTo's changed to Resize's, but I do not think I caught them all.

Also the examples did not have NestedDissection ifdef'd for parmetis.
Since we are interested in building without parmetis, the ifdef's were
added.
  • Loading branch information...
1 parent a87b2df commit d2e5c1fdef4ab73fca849b64543c88c7cded43fc @kruger kruger committed Feb 7, 2014
View
@@ -1,5 +1,6 @@
# Clique
+
A C++ sparse-direct solver for distributed-memory architectures with an
emphasis on scalable triangular solves and memory usage.
The library was initially released as part of
@@ -8,8 +8,8 @@
http://opensource.org/licenses/BSD-2-Clause
*/
#include "clique.hpp"
-#include "elemental/lapack-like/Norm/Max.hpp"
-#include "elemental/lapack-like/SVD.hpp"
+#include "elemental/lapack-like/props/Norm/Max.hpp"
+#include "elemental/lapack-like/decomp/SVD.hpp"
using namespace cliq;
int
@@ -123,9 +123,14 @@ main( int argc, char* argv[] )
NaturalNestedDissection
( n1, n2, 1, graph, map, sepTree, info, cutoff );
else
+#ifdef HAVE_PARMETIS
NestedDissection
( graph, map, sepTree, info,
sequential, numDistSeps, numSeqSeps, cutoff );
+#else
+ std::cout << "NestedDissection requested but not built with parmetis" << std::endl;
+ return 1;
+#endif
map.FormInverse( inverseMap );
mpi::Barrier( comm );
const double nestedStop = mpi::Time();
@@ -8,8 +8,8 @@
http://opensource.org/licenses/BSD-2-Clause
*/
#include "clique.hpp"
-#include "elemental/lapack-like/Norm/Max.hpp"
-#include "elemental/lapack-like/SVD.hpp"
+#include "elemental/lapack-like/props/Norm/Max.hpp"
+#include "elemental/lapack-like/decomp/SVD.hpp"
using namespace cliq;
int
@@ -132,9 +132,14 @@ main( int argc, char* argv[] )
NaturalNestedDissection
( n1, n2, n3, graph, map, sepTree, info, cutoff );
else
+#ifdef HAVE_PARMETIS
NestedDissection
( graph, map, sepTree, info,
sequential, numDistSeps, numSeqSeps, cutoff );
+#else
+ std::cout << "NestedDissection requested but not built with parmetis" << std::endl;
+ return 1;
+#endif
map.FormInverse( inverseMap );
mpi::Barrier( comm );
const double nestedStop = mpi::Time();
@@ -8,8 +8,8 @@
http://opensource.org/licenses/BSD-2-Clause
*/
#include "clique.hpp"
-#include "elemental/lapack-like/Norm/Max.hpp"
-#include "elemental/lapack-like/SVD.hpp"
+#include "elemental/lapack-like/props/Norm/Max.hpp"
+#include "elemental/lapack-like/decomp/SVD.hpp"
using namespace cliq;
Complex<double> PML( double x, double w, double p, double sigma, double k )
@@ -164,9 +164,14 @@ main( int argc, char* argv[] )
NaturalNestedDissection
( n1, n2, 1, graph, map, sepTree, info, cutoff );
else
+#ifdef HAVE_PARMETIS
NestedDissection
( graph, map, sepTree, info,
sequential, numDistSeps, numSeqSeps, cutoff );
+#else
+ std::cout << "NestedDissection requested but not built with parmetis" << std::endl;
+ return 1;
+#endif
map.FormInverse( inverseMap );
mpi::Barrier( comm );
const double nestedStop = mpi::Time();
@@ -8,8 +8,8 @@
http://opensource.org/licenses/BSD-2-Clause
*/
#include "clique.hpp"
-#include "elemental/lapack-like/Norm/Max.hpp"
-#include "elemental/lapack-like/SVD.hpp"
+#include "elemental/lapack-like/props/Norm/Max.hpp"
+#include "elemental/lapack-like/decomp/SVD.hpp"
using namespace cliq;
Complex<double> PML( double x, double w, double p, double sigma, double k )
@@ -184,9 +184,14 @@ main( int argc, char* argv[] )
NaturalNestedDissection
( n1, n2, n3, graph, map, sepTree, info, cutoff );
else
+#ifdef HAVE_PARMETIS
NestedDissection
( graph, map, sepTree, info,
sequential, numDistSeps, numSeqSeps, cutoff );
+#else
+ std::cout << "NestedDissection requested but not built with parmetis" << std::endl;
+ return 1;
+#endif
map.FormInverse( inverseMap );
mpi::Barrier( comm );
const double nestedStop = mpi::Time();
View
@@ -31,8 +31,10 @@
#include "elemental/blas-like/level3/Trdtrmm.hpp"
#include "elemental/blas-like/level3/Trmm.hpp"
#include "elemental/blas-like/level3/Trsm.hpp"
-#include "elemental/lapack-like/LDL.hpp"
-#include "elemental/lapack-like/TriangularInverse.hpp"
+/** Tx: Updates for new elemental **/
@jedbrown

jedbrown Feb 14, 2014

I don't think this comment belongs in the commit. Nor the commented-out line below.

@kruger

kruger Feb 14, 2014

Owner

Yes -- sorry. I thought that I had caught all of those.

+#include "elemental/lapack-like/factor/LDL.hpp"
+/** #include "elemental/lapack-like/TriangularInverse.hpp" **/
+#include "elemental/lapack-like/funcs/Inverse/Triangular.hpp"
#include "elemental/matrices/Zeros.hpp"
#include "elemental/io.hpp"
@@ -62,8 +62,8 @@ class DistGraph
// For resizing the graph
void Empty();
- void ResizeTo( int numVertices );
- void ResizeTo( int numSources, int numTargets );
+ void Resize( int numVertices );
+ void Resize( int numSources, int numTargets );
// For copying one graph into another
const DistGraph& operator=( const Graph& graph );
@@ -356,11 +356,11 @@ DistGraph::Empty()
}
inline void
-DistGraph::ResizeTo( int numVertices )
-{ ResizeTo( numVertices, numVertices ); }
+DistGraph::Resize( int numVertices )
+{ Resize( numVertices, numVertices ); }
inline void
-DistGraph::ResizeTo( int numSources, int numTargets )
+DistGraph::Resize( int numSources, int numTargets )
{
const int commRank = mpi::CommRank( comm_ );
const int commSize = mpi::CommSize( comm_ );
@@ -64,7 +64,7 @@ class DistMap
// For modifying the size of the map
void Empty();
- void ResizeTo( int numSources );
+ void Resize( int numSources );
// Assignment
const DistMap& operator=( const DistMap& map );
@@ -41,7 +41,7 @@ DistMap::StoreOwners
{
DEBUG_ONLY(CallStackEntry cse("DistMap::StoreOwners"))
SetComm( comm );
- ResizeTo( numSources );
+ Resize( numSources );
const int commSize = mpi::CommSize( comm );
const int blocksize = Blocksize();
const int firstLocalSource = FirstLocalSource();
@@ -375,7 +375,7 @@ DistMap::Empty()
}
inline void
-DistMap::ResizeTo( int numSources )
+DistMap::Resize( int numSources )
{
const int commRank = mpi::CommRank( comm_ );
const int commSize = mpi::CommSize( comm_ );
@@ -46,7 +46,7 @@ class DistMultiVec
// For modifying the size of the multi-vector
void Empty();
- void ResizeTo( int height, int width );
+ void Resize( int height, int width );
// Assignment
const DistMultiVec<T>& operator=( const DistMultiVec<T>& X );
@@ -196,7 +196,7 @@ DistMultiVec<T>::SetComm( mpi::Comm comm )
( commRank<commSize-1 ?
blocksize_ :
height_ - (commSize-1)*blocksize_ );
- multiVec_.ResizeTo( localHeight, width_ );
+ multiVec_.Resize( localHeight, width_ );
}
template<typename T>
@@ -256,7 +256,7 @@ DistMultiVec<T>::Empty()
template<typename T>
inline void
-DistMultiVec<T>::ResizeTo( int height, int width )
+DistMultiVec<T>::Resize( int height, int width )
{
const int commRank = mpi::CommRank( comm_ );
const int commSize = mpi::CommSize( comm_ );
@@ -268,7 +268,7 @@ DistMultiVec<T>::ResizeTo( int height, int width )
( commRank<commSize-1 ?
blocksize_ :
height_ - (commSize-1)*blocksize_ );
- multiVec_.ResizeTo( localHeight, width );
+ multiVec_.Resize( localHeight, width );
}
template<typename T>
@@ -79,7 +79,7 @@ class DistSparseMatrix
// For modifying the size of the matrix
void Empty();
- void ResizeTo( int height, int width );
+ void Resize( int height, int width );
// TODO: operator=
@@ -285,9 +285,9 @@ DistSparseMatrix<T>::Empty()
template<typename T>
inline void
-DistSparseMatrix<T>::ResizeTo( int height, int width )
+DistSparseMatrix<T>::Resize( int height, int width )
{
- distGraph_.ResizeTo( height, width );
+ distGraph_.Resize( height, width );
SwapClear( vals_ );
}
@@ -49,8 +49,8 @@ class Graph
// For resizing the graph
void Empty();
- void ResizeTo( int numVertices );
- void ResizeTo( int numSources, int numTargets );
+ void Resize( int numVertices );
+ void Resize( int numSources, int numTargets );
// For copying one graph into another
const Graph& operator=( const Graph& graph );
@@ -305,11 +305,11 @@ Graph::Empty()
}
inline void
-Graph::ResizeTo( int numVertices )
-{ ResizeTo( numVertices, numVertices ); }
+Graph::Resize( int numVertices )
+{ Resize( numVertices, numVertices ); }
inline void
-Graph::ResizeTo( int numSources, int numTargets )
+Graph::Resize( int numSources, int numTargets )
{
numSources_ = numSources;
numTargets_ = numTargets;
@@ -34,7 +34,7 @@ class MultiVec
// For modifying the size of the multi-vector
void Empty();
- void ResizeTo( int height, int width );
+ void Resize( int height, int width );
// Assignment
const MultiVec<T>& operator=( const MultiVec<T>& X );
@@ -161,8 +161,8 @@ MultiVec<T>::Empty()
template<typename T>
inline void
-MultiVec<T>::ResizeTo( int height, int width )
-{ multiVec_.ResizeTo( height, width ); }
+MultiVec<T>::Resize( int height, int width )
+{ multiVec_.Resize( height, width ); }
template<typename T>
const MultiVec<T>&
@@ -55,7 +55,7 @@ class SparseMatrix
// For modifying the size of the matrix
void Empty();
- void ResizeTo( int height, int width );
+ void Resize( int height, int width );
// For copying one matrix to another
const SparseMatrix<T>& operator=( const SparseMatrix<T>& A );
@@ -267,9 +267,9 @@ SparseMatrix<T>::Empty()
template<typename T>
inline void
-SparseMatrix<T>::ResizeTo( int height, int width )
+SparseMatrix<T>::Resize( int height, int width )
{
- graph_.ResizeTo( height, width );
+ graph_.Resize( height, width );
SwapClear( vals_ );
}
@@ -184,7 +184,7 @@ DistNodalMultiVec<F>::Pull
for( int s=0; s<numLocal; ++s )
{
const SymmNodeInfo& nodeInfo = info.localNodes[s];
- localNodes[s].ResizeTo( nodeInfo.size, width_ );
+ localNodes[s].Resize( nodeInfo.size, width_ );
for( int t=0; t<nodeInfo.size; ++t )
{
const int i = mappedInds[off++];
@@ -199,7 +199,7 @@ DistNodalMultiVec<F>::Pull
const DistSymmNodeInfo& nodeInfo = info.distNodes[s];
DistMatrix<F,VC,STAR>& XNode = distNodes[s-1];
XNode.SetGrid( *nodeInfo.grid );
- XNode.ResizeTo( nodeInfo.size, width_ );
+ XNode.Resize( nodeInfo.size, width_ );
const int localHeight = XNode.LocalHeight();
for( int tLoc=0; tLoc<localHeight; ++tLoc )
{
@@ -227,7 +227,7 @@ DistNodalMultiVec<F>::Push
const int height = rootNode.size + rootNode.off;
const int width = Width();
X.SetComm( comm );
- X.ResizeTo( height, width );
+ X.Resize( height, width );
const int commSize = mpi::CommSize( comm );
const int blocksize = X.Blocksize();
@@ -179,7 +179,7 @@ inline void FrontLDLSquare
// SendRecv to form AL21^T[* ,MR] from S21^T[* ,MC], then conjugate
// if necessary.
AL21Trans_STAR_MR.AlignWith( AL22 );
- AL21Trans_STAR_MR.ResizeTo( AL21.Width(), AL21.Height() );
+ AL21Trans_STAR_MR.Resize( AL21.Width(), AL21.Height() );
{
if( onDiagonal )
{
@@ -65,7 +65,7 @@ inline void DistLowerMultiplyNormal
// Set up a workspace
DistMatrix<T,VC,STAR>& W = front.work1d;
W.SetGrid( grid );
- W.ResizeTo( front.front1dL.Height(), width );
+ W.Resize( front.front1dL.Height(), width );
DistMatrix<T,VC,STAR> WT(grid), WB(grid);
PartitionDown( W, WT, WB, node.size );
WT = X.distNodes[s-1];
@@ -204,7 +204,7 @@ inline void DistLowerMultiplyTranspose
// Set up a copy of the RHS in our workspace.
DistMatrix<T,VC,STAR>& W = front.work1d;
W.SetGrid( grid );
- W.ResizeTo( front.front1dL.Height(), width );
+ W.Resize( front.front1dL.Height(), width );
DistMatrix<T,VC,STAR> WT(grid), WB(grid);
PartitionDown( W, WT, WB, node.size );
Matrix<T>& localXT =
@@ -43,7 +43,7 @@ inline void LocalLowerMultiplyNormal
Matrix<T>& W = L.localFronts[s].work;
// Set up a workspace
- W.ResizeTo( frontL.Height(), width );
+ W.Resize( frontL.Height(), width );
Matrix<T> WT, WB;
PartitionDown( W, WT, WB, node.size );
WT = X.localNodes[s];
@@ -114,7 +114,7 @@ inline void LocalLowerMultiplyTranspose
Matrix<T>& W = L.localFronts[s].work;
// Set up a workspace
- W.ResizeTo( frontL.Height(), width );
+ W.Resize( frontL.Height(), width );
Matrix<T> WT, WB;
PartitionDown( W, WT, WB, node.size );
WT = X.localNodes[s];
Oops, something went wrong.

0 comments on commit d2e5c1f

Please sign in to comment.