Commit b8063b9f authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'cleanup/trailing_whitespaces' into 'master'

removed all trailing whitespaces in all git files

Cleanup of all files, i.e. removed all white-spaces at the end of lines

See merge request !3
parents 5f0ca3b5 836978e9
Pipeline #556 failed with stage
in 119 minutes and 8 seconds

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -8,7 +8,7 @@
<body>
<h1> Using AMDiS with cmake </h1>
With this short page, I will show you, how to use the cmake buildsystem with AMDiS. The introduction consists of two main parts:
<ol>
<ol>
<li> <a href="#compiling" > compiling and installing AMDiS with CMake </a ></li>
<li> <a href="#using" > using the cmake installed AMDiS in your project </a ></li>
<li> <a href="#faq" > some frequently asked questions </a ></li>
......@@ -37,7 +37,7 @@ cd ${HOME}/work/amdis_build </pre>
The simplest configuration of AMDiS, i.e. without umfpack and parallelization, only sets the install destination to the directory "${HOME}/programs/". To do this, you have to call cmake with your install destination and the AMDiS source directory as commandline arguments
<pre class="desc" >
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/programs/ ../amdis/AMDiS</pre>
Compilation and installation is the same as with automake/autoconf:
<pre class="desc">
make && make install </pre >
......@@ -80,7 +80,7 @@ and we have to tell cmake, that we need the library amdis and each library amdis
target_link_libraries(fooProg ${AMDIS_LIBRARIES})
</pre >
If cmake does not find AMDiS, you have to set the variable AMDIS_DIR to the directory containing the file AMDiSConfig.cmake. This file resides in
If cmake does not find AMDiS, you have to set the variable AMDIS_DIR to the directory containing the file AMDiSConfig.cmake. This file resides in
<pre class="desc" >
${CMAKE_INSTALL_PREFIX}/share/amdis/
</pre >
......
set(COMPILER_TEST_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/compilerTest)
file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt
file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt
"project(compilerTest)
cmake_minimum_required(VERSION 2.8)
add_definitions(-std=c++11)
......@@ -28,25 +28,25 @@ file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt
# RANGE-BASED FOR LOOPS
add_executable(test_range_based_for test_range_based_for.cpp)
target_link_libraries(test_range_based_for)")
file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_class.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_class.cpp
"template<class... Ts> struct A{}; int main(){A<int, double> a;}")
file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_fct.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_fct.cpp
"template<class... Ts> void foo(Ts... ts){}; int main(){foo(1, 2.0, 3.0f);}")
file(WRITE ${COMPILER_TEST_DIR}/test_alias_templates.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_alias_templates.cpp
"template<class T> struct A{}; template<class T> using B=A<T>; int main(){B<int> b;}")
file(WRITE ${COMPILER_TEST_DIR}/test_decltype.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_decltype.cpp
"int main(){decltype(1) a = 1;}")
file(WRITE ${COMPILER_TEST_DIR}/test_auto.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_auto.cpp
"int main(){auto a = 1;}")
file(WRITE ${COMPILER_TEST_DIR}/test_constexpr.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_constexpr.cpp
"constexpr int foo(){return 1;}; int main(){static constexpr int f = foo();}")
file(WRITE ${COMPILER_TEST_DIR}/test_delegating_constructors.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_delegating_constructors.cpp
"struct A{ A(){} A(int) : A(){} }; int main(){ A a(1);}")
file(WRITE ${COMPILER_TEST_DIR}/test_range_based_for.cpp
file(WRITE ${COMPILER_TEST_DIR}/test_range_based_for.cpp
"int main(){ int vec[10]; for (int& elem : vec) { elem = 1; } }")
set(COMPILER_CXX11_FEATURES "")
try_compile(TEST_VARIADIC_TEMPL_CLASS ${COMPILER_TEST_DIR} ${COMPILER_TEST_DIR} compilerTest test_variadic_templ_class)
......
#!/bin/sh
if test "$1" = "upgrade" ; then
if test "$1" = "upgrade" ; then
exit 0
fi
NEWDIRS_SEMI="@deb_add_dirs@"
......
......@@ -2,7 +2,7 @@ if (ENABLE_PARALLEL_DOMAIN)
option(ENABLE_ZOLTAN "Add support for the Parallel Partitioning suite Zoltan" false)
option(ENABLE_PARALLEL_SOLVERS "Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true)
mark_as_advanced(ENABLE_PARALLEL_SOLVERS)
add_library(amdis_parallel INTERFACE)
target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/DofComm.cc
......@@ -21,14 +21,14 @@ if (ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/ParMetisPartitioner.cc
${SOURCE_DIR}/parallel/StdMpi.cc
)
target_sources(amdis_debug INTERFACE
${SOURCE_DIR}/parallel/ParallelDebug.cc
)
target_compile_definitions(amdis_parallel INTERFACE
HAVE_PARALLEL_DOMAIN_AMDIS=1)
# MPI is required
find_package(MPI REQUIRED)
if (MPI_FOUND)
......@@ -37,15 +37,15 @@ if (ENABLE_PARALLEL_DOMAIN)
target_compile_options(amdis_parallel INTERFACE
${MPI_COMPILE_FLAGS})
endif (MPI_FOUND)
# PETSc library is required
set(PETSC_EXECUTABLE_RUNS ON)
include(find_petsc)
if (PETSc_FOUND)
target_include_directories(amdis_parallel INTERFACE
${PETSC_DIR}/include
${PETSC_DIR}/include
${PETSC_DIR}/${PETSC_ARCH}/include)
# parmetis is required
find_file(PARMETIS_HEADER_FILE "parmetis.h" HINTS ${PETSC_DIR}/include )
if (PARMETIS_HEADER_FILE)
......@@ -54,7 +54,7 @@ if (ENABLE_PARALLEL_DOMAIN)
else()
message(FATAL_ERROR "Could not find ParMetis header file 'parmetis.h'!")
endif (PARMETIS_HEADER_FILE)
# add support for the zoltan library
if (ENABLE_ZOLTAN)
find_file(ZOLTAN_HEADER_FILE "zoltan_cpp.h" HINTS ${PETSC_DIR}/include)
......@@ -64,18 +64,18 @@ if (ENABLE_PARALLEL_DOMAIN)
else()
message(FATAL_ERROR "Could not find Zoltan include file 'zoltan_cpp.h'!")
endif(ZOLTAN_HEADER_FILE)
target_compile_definitions(amdis_parallel INTERFACE HAVE_ZOLTAN=1)
target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/ZoltanPartitioner.cc)
endif (ENABLE_ZOLTAN)
if (ENABLE_BDDCML)
target_compile_definitions(amdis_parallel INTERFACE HAVE_BDDCML=1)
target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/BddcMlSolver.cc)
endif (ENABLE_BDDCML)
# add some more source-files that need petsc
target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/MatrixNnzStructure.cc
......@@ -86,7 +86,7 @@ if (ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/PetscSolverGlobalBlockMatrix.cc
${SOURCE_DIR}/solver/PetscTypes.cc
)
if (ENABLE_PARALLEL_SOLVERS)
target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/PetscSolverFeti.cc
......@@ -103,23 +103,23 @@ if (ENABLE_PARALLEL_DOMAIN)
target_compile_definitions(amdis_parallel INTERFACE
HAVE_PARALLEL_SOLVERS=1)
endif (ENABLE_PARALLEL_SOLVERS)
target_compile_definitions(amdis_parallel INTERFACE
HAVE_PARALLEL_PETSC=1
PETSC_VERSION=${PETSC_VERSION})
target_link_libraries(amdis amdis_parallel ${PETSC_LIBRARIES} blas lapack)
endif (PETSc_FOUND)
# specify how to install this target:
# -----------------------------------
file(GLOB AMDIS_PARALLEL_HEADERS "${SOURCE_DIR}/parallel/*.h")
install(FILES ${AMDIS_PARALLEL_HEADERS} DESTINATION include/amdis/parallel/)
install(FILES
${BASE_DIR}/cmake3/ResolveCompilerPaths.cmake
${BASE_DIR}/cmake3/FindPackageMultipass.cmake
install(FILES
${BASE_DIR}/cmake3/ResolveCompilerPaths.cmake
${BASE_DIR}/cmake3/FindPackageMultipass.cmake
${BASE_DIR}/cmake3/find_petsc.cmake
DESTINATION share/amdis/)
endif (ENABLE_PARALLEL_DOMAIN)
......@@ -2,7 +2,7 @@
set(MUPARSER_SOURCE_DIR ${BASE_DIR}/lib/muparser_v134/src)
set(MUPARSER_INCLUDE_DIR ${BASE_DIR}/lib/muparser_v134/include)
add_library(muparser
add_library(muparser
${MUPARSER_SOURCE_DIR}/muParser.cpp
${MUPARSER_SOURCE_DIR}/muParserBase.cpp
${MUPARSER_SOURCE_DIR}/muParserBytecode.cpp
......@@ -13,7 +13,7 @@ add_library(muparser
${MUPARSER_SOURCE_DIR}/muParserInt.cpp
${MUPARSER_SOURCE_DIR}/muParserTest.cpp
${MUPARSER_SOURCE_DIR}/muParserTokenReader.cpp)
target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR})
if (ENABLE_CXX11)
......
......@@ -14,7 +14,7 @@ macro(test_compile_features RESULT_VAR TARGET SCOPE) # feature1 feature2 feature
else ()
set(DUMMY_FILE ${AMDIS_DIR}/dummy.cc)
endif ()
message(STATUS "Test for cxx11 features for target ${TARGET}")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${_DIR})
file(WRITE ${_DIR}/CMakeLists.txt "
......
This diff is collapsed.
project (mtl4) # GPU version
project (mtl4) # GPU version
cmake_minimum_required(VERSION 2.8)
option(ENABLE_GCOV "enable gnu coverage flags for gnu compiler" OFF)
......@@ -77,4 +77,4 @@ enable_testing()
include(CTest)
set(MTL_IS_CONFIGURED True) # impede double double configuration in libs
add_subdirectory(libs)
add_subdirectory(libs)
This diff is collapsed.
......@@ -2,9 +2,9 @@
Software License for MTL
Copyright (c) 2007-2008 The Trustees of Indiana University.
Copyright (c) 2007-2008 The Trustees of Indiana University.
2008 Dresden University of Technology and the Trustees of Indiana University.
2010 SimuNova UG, www.simunova.com.
2010 SimuNova UG, www.simunova.com.
All rights reserved.
Authors: Peter Gottschling and Andrew Lumsdaine
......
......@@ -11,7 +11,7 @@ See also license.mtl.txt in the distribution.
---------------------------------------------------------------
The Matrix Template Library
Version 4
Version 4
I. Introduction
===============
......
......@@ -9,7 +9,7 @@ def macro_flag(env, flag):
if sys.platform == 'win32' and conf.env['CC'] == 'cl':
return '/D' + flag
else:
return '-D' + flag
return '-D' + flag
# add debugging flags to environment
def add_debug(env):
......@@ -20,7 +20,7 @@ def add_debug(env):
env.Append(CCFLAGS = '-g')
#print macro_flag(env, 'MTL_ASSERT_FOR_THROW')
env.Append(CCFLAGS = macro_flag(env, 'MTL_ASSERT_FOR_THROW'))
def check_g5():
print "platform ", sys.platform
......@@ -38,7 +38,7 @@ def check_g5():
def add_platform_flags(env):
if env['CC'] == 'cl':
# Turn off some warnings: 1. for problems with CRTP 2. with VC's own headers
# Turn off some warnings: 1. for problems with CRTP 2. with VC's own headers
# 3. alleged ambiguos assignment
# I hope we find a cleaner way to get rid of this warning
wd = ' /wd4355 /wd4996 /wd4522'
......@@ -79,10 +79,10 @@ def add_opt(env, opt):
env.Append(CCFLAGS = '-O2')
# env.Append(CCFLAGS = '-pg') # for profiling
# env.Append(LINKFLAGS = '-pg') # for profiling
if env['CC'] != 'cl':
env.Append(CXXFLAGS = conf.env['CCFLAGS'])
def check_no_long_double(conf):
cc = conf.env['CC']
......@@ -117,7 +117,7 @@ def check_for_blas(env):
if blas_path:
print 'adding ' + blas_path + ' to LIBPATH.'
env.Append(LIBPATH = [ blas_path, blas_path + '/lib/' ])
# extra linker flags for blas
blas_ldflags = ARGUMENTS.get('blas_ldflags', '')
if blas_ldflags:
......@@ -137,7 +137,7 @@ def check_for_blas(env):
return myenv
else:
print "Autodetecting BLAS support. See config.log for details!"
########################
# check for acml
myenv = env.Copy()
......@@ -151,7 +151,7 @@ def check_for_blas(env):
myenv = conf.Finish()
if(found_blas == 1):
return myenv
########################
# check for goto
myenv = env.Copy()
......@@ -161,7 +161,7 @@ def check_for_blas(env):
myenv.Append(LIBS=['pthread'])
# extra linker flags for libgoto
# myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.c'])
myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.o']) # not portable !!!
myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.o']) # not portable !!!
# myenv.Library('build/xerbla', 'build/xerbla.c')
# myenv.Append(LIBS=['xerbla'])
# myenv.Append(LIBPATH=['build'])
......@@ -176,7 +176,7 @@ def check_for_blas(env):
myenv = conf.Finish()
if(found_blas == 1):
return myenv
########################
# check for ATLAS
myenv = env.Copy()
......@@ -192,9 +192,9 @@ def check_for_blas(env):
return myenv
return env
###################################
# Add UMFPACK (extremely simplistic)
###################################
......@@ -236,7 +236,7 @@ def check_for_umfpack(env):
env.Append(CPPPATH = [ umfpack_path + '/Include' ])
detected_umfpack(env)
return env
......@@ -351,12 +351,12 @@ if int(ARGUMENTS.get('full_warnings', 0)):
full_warnings = ARGUMENTS.get('full_warnings', 0)
# add user-defined CC flags
# add user-defined CC flags
add_ccflag = ARGUMENTS.get('add_ccflag', '')
if add_ccflag:
env.Append(CCFLAGS = add_ccflag)
# add user-defined CXX flags
# add user-defined CXX flags
add_cxxflag = ARGUMENTS.get('add_cxxflag', '')
if add_cxxflag:
env.Append(CXXFLAGS = add_cxxflag)
......@@ -379,12 +379,12 @@ add_debug(debug_env)
opt = ARGUMENTS.get('opt', 0)
# Add optimization flags and then copy C flags into C++ flags
add_opt(debug_env, 0)
add_opt(debug_env, 0)
add_opt(env, int(opt))
add_opt(opt_env, 1)
add_opt(high_opt_env, 2)
# add user-defined optimization flags
# add user-defined optimization flags
add_optflag = ARGUMENTS.get('add_optflag', '')
if add_optflag:
add_user_opt(env, add_optflag)
......@@ -400,12 +400,12 @@ check = ARGUMENTS.get('check', 0)
Export('env debug_env opt_env high_opt_env check full_warnings')
SConscript(['libs/numeric/mtl/build/SConscript',
'libs/numeric/mtl/test/SConscript',
'libs/numeric/mtl/test_with_optimization/SConscript',
'libs/numeric/mtl/examples/SConscript',
SConscript(['libs/numeric/mtl/build/SConscript',
'libs/numeric/mtl/test/SConscript',
'libs/numeric/mtl/test_with_optimization/SConscript',
'libs/numeric/mtl/examples/SConscript',
'libs/numeric/mtl/experimental/SConscript',
'libs/numeric/mtl/timing/SConscript',
'libs/numeric/linear_algebra/test/SConscript',
'libs/numeric/mtl/timing/SConscript',
'libs/numeric/linear_algebra/test/SConscript',
'libs/numeric/itl/test/SConscript'])
......@@ -33,27 +33,27 @@ class basic_iteration
max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false), my_quite(false), my_suppress(false) { }
basic_iteration(Real nb, int max_iter_, Real t, Real a = Real(0))
: error(0), i(0), norm_r0(nb), max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false),
: error(0), i(0), norm_r0(nb), max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false),
my_quite(false), my_suppress(false) {}
virtual ~basic_iteration() {}
bool check_max()
{
if (i >= max_iter)
if (i >= max_iter)
error= 1, is_finished= true, err_msg= "Too many iterations.";
return is_finished;
}
template <class Vector>
bool finished(const Vector& r)
bool finished(const Vector& r)
{
if (converged(two_norm(r)))
return is_finished= true;
return check_max();
}
bool finished(const Real& r)
bool finished(const Real& r)
{
if (converged(r))
return is_finished= true;
......@@ -61,9 +61,9 @@ class basic_iteration
}
template <typename T>
bool finished(const std::complex<T>& r)
bool finished(const std::complex<T>& r)
{
if (converged(std::abs(r)))
if (converged(std::abs(r)))
return is_finished= true;
return check_max();
}
......@@ -75,8 +75,8 @@ class basic_iteration
bool converged(const Real& r) { resid_= r; return converged(); }
bool converged() const
{
bool converged() const
{
if (norm_r0 == 0)
return resid_ <= atol_; // ignore relative tolerance if |r0| is zero
return resid_ <= rtol_ * norm_r0 || resid_ <= atol_;
......@@ -95,7 +95,7 @@ class basic_iteration
bool is_converged() const { return is_finished && error == 0; }
int iterations() const { return i; }
int max_iterations() const { return max_iter; }
void set_max_iterations(int m) { max_iter= m; }
......@@ -132,7 +132,7 @@ class basic_iteration
error= that.error;
err_msg= that.err_msg;
is_finished= true;
} else
} else
finished(resid_);
}
......
// Software License for MTL
//
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and Andrew Lumsdaine
//
//
// This file is part of the Matrix Template Library2
//
//
// See also license.mtl.txt in the distribution.
#ifndef ITL_CYCLIC_ITERATION_INCLUDE
......@@ -20,7 +20,7 @@ namespace itl {
/// Class for iteration control that cyclically prints residual
template <class Real, class OStream = std::ostream>
class cyclic_iteration : public basic_iteration<Real>
class cyclic_iteration : public basic_iteration<Real>
{
typedef basic_iteration<Real> super;
typedef cyclic_iteration self;
......@@ -29,7 +29,7 @@ namespace itl {
{
if (!this->my_quite && this->i % cycle == 0)
if (multi_print || this->i != last_print) { // Avoid multiple print-outs in same iteration
out << "iteration " << this->i << ": resid " << this->resid()
out << "iteration " << this->i << ": resid " << this->resid()
// << " / " << this->norm_r0 << " = " << this->resid() / this->norm_r0 << " (rel. error)"
<< std::endl;
last_print= this->i;
......@@ -37,7 +37,7 @@ namespace itl {
}
public:
template <class Vector>
cyclic_iteration(const Vector& r0, int max_iter_, Real tol_, Real atol_ = Real(0), int cycle_ = 100,
OStream& out = std::cout)
......@@ -48,12 +48,12 @@ namespace itl {
OStream& out = std::cout)
: super(r0, max_iter_, tol_, atol_), cycle(cycle_), last_print(-1), multi_print(false), out(out)
{}
bool finished() { return super::finished(); }
template <typename T>
bool finished(const T& r)
bool finished(const T& r)
{
bool ret= super::finished(r);
print_resid();
......@@ -61,7 +61,7 @@ namespace itl {
}
inline self& operator++() { ++this->i; return *this; }
inline self& operator+=(int n) { this->i+= n; return *this; }
operator int() const { return error_code(); }
......@@ -72,7 +72,7 @@ namespace itl {
/// Set whether the residual is printed multiple times in iteration
void set_multi_print(bool m) { multi_print= m; }
int error_code() const
int error_code() const
{
if (!this->my_suppress)
out << "finished! error code = " << this->error << '\n'
......
// Software License for MTL
//
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and Andrew Lumsdaine
//
//
// This file is part of the Matrix Template Library
//
//
// See also license.mtl.txt in the distribution.
#ifndef ITL_NOISY_ITERATION_INCLUDE
......@@ -19,7 +19,7 @@
namespace itl {
template <class Real, class OStream = std::ostream>
class noisy_iteration : public cyclic_iteration<Real, OStream>
class noisy_iteration : public cyclic_iteration<Real, OStream>
{
public:
template <class Vector>
......
// Software License for MTL
//
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and Andrew Lumsdaine
//
//
// This file is part of the Matrix Template Library
//
//
// See also license.mtl.txt in the distribution.
#ifndef ITL_ITL_INCLUDE
......
// Software License for MTL
//
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and Andrew Lumsdaine
//
//
// This file is part of the Matrix Template Library
//
//
// See also license.mtl.txt in the distribution.
#ifndef ITL_ITL_FWD_INCLUDE
......@@ -27,7 +27,7 @@ namespace itl {
template <typename PC, typename Vector, bool> struct solver;