-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Pull Request #7755 from trilinos/Trilinos/master_merge_20200731…
…_000610 Automatically Merged using Trilinos Master Merge AutoTester PR Title: Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20200731_000610 branch to master PR Author: trilinos-autotester
- Loading branch information
Showing
35 changed files
with
5,166 additions
and
860 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<ParameterList name="test_params"> | ||
|
||
<ParameterList name="tacho_test.mtx"> | ||
|
||
<!-- Optional parameter, used for debugging and for deciding whether to use epetra --> | ||
<Parameter name="complex" type="bool" value="false"/> | ||
<ParameterList name="Cholmod"> | ||
|
||
<!-- Test Epetra objects --> | ||
<ParameterList name="epetra"> | ||
<!-- A non-list entry for epetra denotes a default run, name, type, and value are arbitrary --> | ||
<Parameter name="defaultrun" type="bool" value="true"/> | ||
</ParameterList> | ||
|
||
<!-- Next test Tpetra objects --> | ||
<ParameterList name="tpetra"> | ||
<!-- these `run*' sublist names are arbitrary --> | ||
<!-- The `Node' parameter is not yet supported --> | ||
<!-- Cholmod does not support float yet. --> | ||
|
||
<ParameterList name="run_double_int"> | ||
<Parameter name="Scalar" type="string" value="double"/> | ||
<Parameter name="LocalOrdinal" type="string" value="int"/> | ||
<Parameter name="GlobalOrdinal" type="string" value="int"/> | ||
</ParameterList> | ||
<ParameterList name="run_double_long_long"> | ||
<Parameter name="Scalar" type="string" value="double"/> | ||
<Parameter name="LocalOrdinal" type="string" value="int"/> | ||
<Parameter name="GlobalOrdinal" type="string" value="long long int"/> | ||
</ParameterList> | ||
</ParameterList> | ||
|
||
<!-- Next test Kokkos objects --> | ||
<ParameterList name="kokkos"> | ||
<!-- these `run*' sublist names are arbitrary --> | ||
<!-- Cholmod does not support float yet. --> | ||
<ParameterList name="run_serial_double"> | ||
<Parameter name="Scalar" type="string" value="double"/> | ||
<Parameter name="LocalOrdinal" type="string" value="int"/> | ||
<Parameter name="Node" type="string" value="serial"/> | ||
</ParameterList> | ||
<ParameterList name="run_cuda_double"> | ||
<Parameter name="Scalar" type="string" value="double"/> | ||
<Parameter name="LocalOrdinal" type="string" value="int"/> | ||
<Parameter name="Node" type="string" value="cuda"/> | ||
</ParameterList> | ||
<ParameterList name="run_cudauvmoff_double"> | ||
<Parameter name="Scalar" type="string" value="double"/> | ||
<Parameter name="LocalOrdinal" type="string" value="int"/> | ||
<Parameter name="Node" type="string" value="cudauvmoff"/> | ||
</ParameterList> | ||
</ParameterList> | ||
|
||
<ParameterList name="solver_params"> | ||
<Parameter name="CholmodInt" type="bool" value="true"/> | ||
<!-- Cholmod cannot be GPU for int, though we can still run inputs with GPU as in the above tests,--> | ||
<Parameter name="useGPU" type="int" value="0"/> | ||
</ParameterList> | ||
</ParameterList> <!-- end Cholmod --> | ||
<ParameterList name="all_solver_params"> | ||
</ParameterList> | ||
</ParameterList> <!-- end cholmod_test.mtx --> | ||
|
||
</ParameterList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
packages/shylu/shylu_node/tacho/example/Tacho_ExampleCombineDataFileToMatrixMarketFile.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#include <Kokkos_Core.hpp> | ||
#include <Kokkos_Random.hpp> | ||
#include <impl/Kokkos_Timer.hpp> | ||
|
||
#include "Tacho_Internal.hpp" | ||
#include "Tacho_CommandLineParser.hpp" | ||
|
||
using namespace Tacho; | ||
|
||
int main (int argc, char *argv[]) { | ||
CommandLineParser opts("This example program combines data file into a single matrix market file"); | ||
|
||
std::string graph_data_file = "graph.dat"; | ||
std::string value_data_file = "value.dat"; | ||
std::string matrix_market_file = "mm-out.mtx"; | ||
|
||
opts.set_option<std::string>("graph-file", "Input graph data file ", &graph_data_file); | ||
opts.set_option<std::string>("value-file", "Input value data file ", &value_data_file); | ||
opts.set_option<std::string>("matrix-market-file", "Output matrixmarket file", &matrix_market_file); | ||
|
||
const bool r_parse = opts.parse(argc, argv); | ||
if (r_parse) return 0; // print help return | ||
|
||
Kokkos::initialize(argc, argv); | ||
|
||
typedef Kokkos::DefaultHostExecutionSpace host_space; | ||
{ | ||
typedef double value_type; | ||
typedef CrsMatrixBase<value_type,host_space> CrsMatrixBaseTypeHost; | ||
|
||
CrsMatrixBaseTypeHost A; | ||
using ordinal_type_array = typename CrsMatrixBaseTypeHost::ordinal_type_array; | ||
using size_type_array = typename CrsMatrixBaseTypeHost::size_type_array; | ||
using value_type_array = typename CrsMatrixBaseTypeHost::value_type_array; | ||
|
||
ordinal_type m(0), nnz(0); | ||
size_type_array ap; | ||
ordinal_type_array aj; | ||
value_type_array ax; | ||
{ | ||
std::ifstream in; | ||
in.open(graph_data_file); | ||
if (!in.good()) { | ||
std::cout << "Failed in open the file: " << graph_data_file << std::endl; | ||
return -1; | ||
} | ||
|
||
in >> m; | ||
ap = size_type_array("ap", m+1); | ||
for (ordinal_type i=0;i<(m+1);++i) | ||
in >> ap(i); | ||
|
||
nnz = ap(m); | ||
aj = ordinal_type_array("aj", nnz); | ||
for (ordinal_type k=0;k<nnz;++k) | ||
in >> aj(k); | ||
} | ||
{ | ||
std::ifstream in; | ||
in.open(value_data_file); | ||
if (!in.good()) { | ||
std::cout << "Failed in open the file: " << value_data_file << std::endl; | ||
return -1; | ||
} | ||
|
||
ax = value_type_array("ax", nnz); | ||
for (ordinal_type k=0;k<nnz;++k) | ||
in >> ax(k); | ||
} | ||
|
||
A.setExternalMatrix(m, m, nnz, ap, aj, ax); | ||
{ | ||
std::ofstream out(matrix_market_file); | ||
MatrixMarket<value_type>::write(out, A); | ||
} | ||
} | ||
Kokkos::finalize(); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.