Skip to content

Commit

Permalink
shylubasker: remove unused code
Browse files Browse the repository at this point in the history
resolve compilation errors with printRHS and printSOL
  • Loading branch information
ndellingwood committed Oct 30, 2024
1 parent 09758e9 commit b1229c2
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 62 deletions.
2 changes: 0 additions & 2 deletions packages/shylu/shylu_node/basker/src/shylubasker_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,6 @@ namespace BaskerNS
void printMTX(std::string fname, BASKER_MATRIX &M);
void printMTX(std::string fname, BASKER_MATRIX &M, BASKER_BOOL off);
void readMTX(std::string fname, BASKER_MATRIX &M);
int printRHS();
int printSOL();
void printTree();

BASKER_INLINE
Expand Down
4 changes: 0 additions & 4 deletions packages/shylu/shylu_node/basker/src/shylubasker_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2307,10 +2307,6 @@ namespace BaskerNS
printU();
printUMTX();
std::cout << "U printed" << std::endl;
//printRHS();
std::cout << "RHS printed" << std::endl;
//printSOL();
std::cout << "SOL printed" << std::endl;
//printTree();
std::cout << "Tree printed" << std::endl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ namespace BaskerNS
BASKER_INLINE
void atomic_barrier_fanout(volatile Int &value, const Int l_size)
{
Kokkos::atomic_inc(&(value))
Kokkos::atomic_inc(&(value));
while(value < l_size)
{
BASKER_NO_OP;
Expand Down
55 changes: 0 additions & 55 deletions packages/shylu/shylu_node/basker/src/shylubasker_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1472,61 +1472,6 @@ namespace BaskerNS
}//end readMTX()


//Print out RHS RHS.txt
template<class Int, class Entry, class Exe_Space>
int Basker<Int,Entry,Exe_Space>::printRHS()
{
if(solve_flag == false)
{return -1;}

FILE *fp;
fp = fopen("RHS.txt", "w");

//over each row
for(Int r = 0; r < A.nrow; r++)
{
//over each column NOTE: come back to
//for(Int k = 0; k < rhs.size(); k++)
for(Int k = 0; k < 1; k++)
{
//fprintf(fp, "%ld %ld %f, ", (long)r, (long)gperm[r], rhs[k][r]);
fprintf(fp, "%ld %ld %.16e, ", (long)r, (long)gperm[r], rhs[k][r]);
}//end over each column
fprintf(fp, "\n");
}//end over each row

fclose(fp);

return 0;
}//end printRHS()

//Print solution SOL.txt
template <class Int, class Entry, class Exe_Space>
int Basker<Int,Entry,Exe_Space>::printSOL()
{
if(solve_flag == false)
{return -1;}

FILE *fp;
fp = fopen("SOL.txt", "w");

//over each row
for(Int r = 0; r < A.nrow; r++)
{
//over each column Note: come back to
//for(Int k = 0; k < rhs.size(); k++)
for(Int k = 0 ; k < 1; k++)
{
fprintf(fp, "%ld %ld %f, ", (long)r, (long)gperm[r], sol[k][r]);
}//end over each column
fprintf(fp, "\n");
}//end over each row

fclose(fp);

return 0;
}//end printSOL()

//Prints the given tree into a file to analyze
template<class Int, class Entry, class Exe_Space>
void Basker<Int,Entry,Exe_Space>::printTree()
Expand Down

0 comments on commit b1229c2

Please sign in to comment.