Tpetra: CrsMatrix: added override of default impl of RowMatrix::add.

CrsMatrix now overrides the default implementation of RowMatrix:add.
For now, the override only differs in that it ensures the returned
RowMatrix is actually a CrsMatrix of the same type as *this (including
the fifth template parameter).  The default implementation in
RowMatrix does return a CrsMatrix, but it assumes the default fifth
template parameter of CrsMatrix.  Returning a CrsMatrix of the same
type as *this avoids potential downstream issues with dynamic casts
failing.  We plan to optimize CrsMatrix::add more later.
Tpetra: Directory: Added latent implementation of sparse Map fix.

This commit includes a latent (not yet compiling, enabled via
HAVE_TPETRA_DIRECTORY_SPARSE_MAP_FIX) fix of Bug 5822.  The fix does
_not_ compile yet, due to possible circular header dependencies.  I've
left the code in so that I can try to resolve the header issues in
later commits.

Build/Test Cases Summary
Enabled Packages: Tpetra, Belos, Ifpack2, Xpetra, MueLu
0) MPI_DEBUG => Test case MPI_DEBUG was not run! => Does not affect push readiness! (-1.00 min)
1) SERIAL_RELEASE => Test case SERIAL_RELEASE was not run! => Does not affect push readiness! (-1.00 min)
2) MPI_DEBUG_SS => passed: passed=173,notpassed=0 (13.35 min)
3) SERIAL_RELEASE_SS => passed: passed=156,notpassed=0 (32.08 min)
4) MPI_RELEASE_SS => passed: passed=172,notpassed=0 (37.68 min)
5) SERIAL_DEBUG_SS => passed: passed=157,notpassed=0 (9.42 min)
Other local commits for this build/test group: 2fa57c4
Removing std:: from std::snprintf.

According to PGI compilers on Hopper, and Google, snprintf is
not part of std namespace. This was the only occurence in
Trilinos.
Allow project override of ${PROJECT_NAME}_GENERATE_EXPORT_FILE_DEPENDENCIES (Trilinos #5917)

Had to change the logic to allow project export dependencies to be at project
level independent of if default export files are enabled or not.

Build/Test Cases Summary
Enabled Packages: TrilinosFramework, Teuchos, RTOp
Disabled Packages: CTrilinos,ForTrilinos,PyTrilinos,Didasko,Mesquite,Phdmesh,Pliris,Claps
0) MPI_DEBUG => passed: passed=237,notpassed=0 (2.12 min)
1) SERIAL_RELEASE => passed: passed=230,notpassed=0 (1.38 min)
Fixed more compile warnings as errors issues
1- PQJagged now can handle any number of parts. PQJagged Algorithm does not require
the partitioning array (such that 43,12,44). If this input is not provided,
the algorithm will determine the part numbers itself for the desired output
part number which can be a prime number too. However if this partitioning array
is provided, the array will be used instead.

2- Force Binary and Force Linear search parameters are removed from MJ, as Binary search
seems to dominate the linear search in all cases. The parameter settings for force binary
and force linear should be removed in this case, otherwise it will throw a run-time exception.

3- PQJaggedTest now accepts an xml parameter file as input. It can be run with the following line.
./Zoltan2_pqJaggedTest.exe O=1 F=paramm.txt PF=mj_parameters.xml
(See paramm.txt and mj_parameters in test/partition folder)
The old command line options are still kept, and any provided command line
option will overwrite on the parameter list. Providing P=3,3,3 will
overwrite the part array given in mj_parameters.xml.
MueLu: Removed declaration of sources as headers

Only the dummy file mac.cpp is affected by the change.
It is no longer copied to the include directory of the Trilinos
installation.
MueLu: Added optional dependence on ThyraTpetraAdapters

This package is required to build the forthcoming Thyra wrapper code for
the Tpetra adapters.
MueLu: Added Thyra adapter for MueLu/Tpetra

The current implementation is not optimally efficient since it always
allocates a new MueLu preconditioner each time the Thyra wrapper is
initialized and discards any already existing instance without
attempting to reuse it.

The necessary support for such an optimization is missing in the Tpetra
adapter code.
MueLu: Worked around missing explicit instantiation

A pre-generated header file including both declarations and definitions
is provided so that template instantiation is always done implicitly
even if explicit instantiation has been requested for the MueLu package.
MueLu: Added Stratimikos registration helper
Zoltan2: PQjagged shortcut when partitioning to 1.
Zoltan2 PQJagged more shortcuts when partitioning to 1.
Merge branch 'master' of software.sandia.gov:/space/git/Trilinos
Merge branch 'master' of software.sandia.gov:/space/git/Trilinos
Zoltan2 pqJagged included vector stl library.
Tpetra: Fixed multiple-include-protection macros.

Tpetra_Details_FixedHashTable_decl.hpp had the wrong "multiple include
protection" macros.  They duplicated those of
Tpetra_HashTable_decl.hpp.  This was causing build errors when using
both header files, because the contents of the file weren't getting
included.  This commit fixes the macros.
Tpetra: Fix for Bug 5822 (sparse Map bug).

This commit fixes (or at least claims to fix) Bug 5822 (the memory
usage issue with sparse Maps).  My next commit will add a critical
test which exercises the fix.  The fix compiles now and all the
currently enabled tests pass, including downstream packages.

The fix works by deciding on each process how to store the Directory
information (the mapping from Directory Map LID to input Map PID and
LID).  Before, the Directory always used two arrays (one for input Map
PIDs and one for input Map LIDs), which may be sparsely populated in a
sparse Map's Directory.  Now, the Directory decides at run time that
if the Directory information is too sparse, it uses two hash tables
instead of two arrays.  Some processes may use arrays and other
processes might use hash tables.  If the Map is not sparse enough, no
process will use hash tables.  Hash tables are slower but take less
space, so this is a trade-off between memory usage and look-up speed.
Tpetra: Enabled & fixed tests for fix for Bug 5822 (sparse Maps bug).

Bug 5822 is an issue with excessive memory usage for sparse Maps
(where the global range of GIDs is much larger than the actual number
of GIDs in the Map).

The tests now build and run even if Teuchos' support for "long long"
is not enabled.  If long long is enabled, the tests only run if
sizeof(long long) >= 8; if long long is disabled, the tests only run
if sizeof(long) >= 8.  The tests pass trivially if long long (or long,
if Teuchos' support for long long is off) has size < 8 bytes.  This is
reasonable because plenty of platforms (e.g., 64-bit Linux) have
either 64-bit long long or 64-bit long, so the tests will get
sufficient coverage.

The two tests for Bug 5822 now actually exercise the bug fix.  Since
this test was written, Map was changed to create its Directory only on
demand, when getRemoteIndexList is called for the first time.  This
means that just creating the Map does not suffice to exercise the (fix
for the) bug.  The test now calls getRemoteIndexList and tests the
results for correctness.  Both tests now pass on my workstation.

Whether the fix is enabled is governed by a macro defined at the top
of Tpetra_DirectoryImpl_decl.hpp.  The macro is enabled by default,
which means that the fix is enabled.  See the comments at the top of
that header file to see how to disable the fix at compile time.

Build/Test Cases Summary
Enabled Packages: Tpetra, Belos, Ifpack2, Xpetra, MueLu
0) MPI_DEBUG => Test case MPI_DEBUG was not run! => Does not affect push readiness! (-1.00 min)
1) SERIAL_RELEASE => Test case SERIAL_RELEASE was not run! => Does not affect push readiness! (-1.00 min)
2) MPI_DEBUG_SS => passed: passed=174,notpassed=0 (12.82 min)
3) SERIAL_RELEASE_SS => passed: passed=155,notpassed=0 (25.62 min)
4) MPI_RELEASE_SS => passed: passed=173,notpassed=0 (32.64 min)
5) SERIAL_DEBUG_SS => passed: passed=156,notpassed=0 (9.35 min)
Other local commits for this build/test group: 613dccd, c13137c
Intrepid MiniTensor: Created base class TensorBase to consolidate
and reuse code.