Skip to content
Snippets Groups Projects
Commit fa82db44 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

New tool tnl-quickstart was added.

parent aaea7cc7
No related branches found
No related tags found
No related merge requests found
...@@ -101,10 +101,10 @@ bool tnlIterativeSolver< Real, Index> :: nextIteration() ...@@ -101,10 +101,10 @@ bool tnlIterativeSolver< Real, Index> :: nextIteration()
solverMonitor->refresh(); solverMonitor->refresh();
} }
if( std::isnan( this->getResidue() || if( std::isnan( this->getResidue() ) ||
this->getIterations() > this->getMaxIterations() || this->getIterations() > this->getMaxIterations() ||
( this->getResidue() > this->getDivergenceResidue() && this->getIterations() > this->minIterations ) ) || ( this->getResidue() > this->getDivergenceResidue() && this->getIterations() > this->minIterations ) ||
( this->getResidue() < this->getConvergenceResidue() && this->getIterations() > this->minIterations ) ) ( this->getResidue() < this->getConvergenceResidue() && this->getIterations() > this->minIterations ) )
return false; return false;
return true; return true;
} }
......
group IO
{
string input-file(!) [Input binary file name.];
string input-mtx-file("") [Input mtx file name.];
string log-file("") [Log file name.];
string matrix-stats-file("") [File for matrix statistics like size number of non-zero elements.];
real stop-time(3.0) [How many seconds shell we iterate SpMV.];
integer verbose(1) [Verbose mode.];
},[Arguments describing input and output data.];
group solver
{
string device("host") [On what device the solver will run. Can be host or cuda.];
string solver-name(!) [Set matrix solver for benchmarking. It can be sor, cg, bicgstab, tfqmr, gmres. ];
string solver-class("tnl") [Choose other library of solvers. It can be tnl or petsc.];
real max-residue(1.0e-6) [Set what residue we want to achieve.];
integer gmres-restarting(20) [Set restarting for GMRES method.];
real sor-omega(1.0) [Omega parameter for the SOR method. Can be 0--2.];
},[Arguments describing the solver.];
\ No newline at end of file
group IO
{
string input-mtx-file(!) [Input mtx file name.];
string input-file("") [Input binary file name.];
string pdf-file("") [PDF file with matrix pattern.];
string log-file("") [Log file name.];
string precision("double") [Precision of the arithmetics.];
real stop-time(3.0) [How many seconds shell we iterate SpMV.];
integer max-iterations(100) [Maximum number of SpMV repetitions.];
bool format-test( no ) [Turn on/off test of matrix formats.];
integer verbose(1) [Verbose mode.];
},[Arguments describing input and output data.];
\ No newline at end of file
add_subdirectory (src) add_subdirectory (src)
add_subdirectory (share) add_subdirectory (share)
add_subdirectory (tnl-quickstart)
CONFIGURE_FILE( "tnl-compile.in" "${PROJECT_TOOLS_PATH}/tnl-compile" ) CONFIGURE_FILE( "tnl-compile.in" "${PROJECT_TOOLS_PATH}/tnl-compile" @ONLY )
CONFIGURE_FILE( "tnl-link.in" "${PROJECT_TOOLS_PATH}/tnl-link" ) CONFIGURE_FILE( "tnl-link.in" "${PROJECT_TOOLS_PATH}/tnl-link" @ONLY )
INSTALL( FILES ${PROJECT_TOOLS_PATH}/tnl-compile INSTALL( FILES ${PROJECT_TOOLS_PATH}/tnl-compile
${PROJECT_TOOLS_PATH}/tnl-link ${PROJECT_TOOLS_PATH}/tnl-link
......
#!/usr/bin/env bash #!/usr/bin/env bash
echo -I@CMAKE_INSTALL_PREFIX@/include/tnl-@tnlVersion@ DEBUG_FLAGS = "-DNDEBUG -march=native"
\ No newline at end of file CUDA_FLAGS = ""
for option in "$@"
do
case $option in
--cuda ) CUDA_FLAGS="-DHAVE_CUDA -DHAVE_NOT_CXX11 `tnl-cuda-arch`" ;;
--debug ) DEBUG_FLAGS="-g -O0"
esac
done
echo -I@CMAKE_INSTALL_PREFIX@/include/tnl-@tnlVersion@ ${CUDA_FLAGS}
\ No newline at end of file
#!/usr/bin/env bash #!/usr/bin/env bash
echo -L@CMAKE_INSTALL_PREFIX@/lib -ltnl-@tnlVersion@ DEBUG=""
\ No newline at end of file
for option in "$@"
do
case $option in
--debug ) DEBUG="-dbg"
esac
done
echo -L@CMAKE_INSTALL_PREFIX@/lib -ltnl${DEBUG}-@tnlVersion@
\ No newline at end of file
INSTALL( FILES tnl-quickstart
tnl-quickstart.py
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
\ No newline at end of file
#!/usr/bin/env bash
tnl-quickstart.py
\ No newline at end of file
#! /usr/bin/python
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
__author__ = "oberhuber"
__date__ = "$May 6, 2015 8:40:59 PM$"
def generateMakefile( solverName ):
file = open( "Makefile", "w" )
file.write( "")
file.close()
print( "TNL Quickstart -- solver generator")
print( "----------------------------------")
projectName = input( "Project name: (whitespace characters are allowed)" )
solverName = input( "Solver name: (whitespace characters are NOT allowed)" )
generateMakefile( solverName )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment