tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2018-09-19T09:31:03Zhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/3Delete TypeInfo.h2018-09-19T09:31:03ZJakub KlinkovskýDelete TypeInfo.hThe [TypeInfo.h](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/TypeInfo.h) file is completely useless, use [std::numeric_limits](http://en.cppreference.com/w/cpp/types/numeric_limits) instead.The [TypeInfo.h](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/TypeInfo.h) file is completely useless, use [std::numeric_limits](http://en.cppreference.com/w/cpp/types/numeric_limits) instead.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/5CuBLAS and Cusparse2018-09-04T14:28:02ZVít HanousekCuBLAS and CusparseIf detection of Cublas does not found cublas, compilation faild.
Detection of Cublas and CuSparse depend on /usr/local/cuda, probably -> extremly wrong...If detection of Cublas does not found cublas, compilation faild.
Detection of Cublas and CuSparse depend on /usr/local/cuda, probably -> extremly wrong...https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/6Binary VTK output2020-07-30T12:54:43ZJakub KlinkovskýBinary VTK outputFound this in deal.II: https://github.com/dealii/dealii/blob/1cf12e90abedcf5272eb4c4d916a059c36c7e0c7/source/base/data_out_base.cc#L1269-L1279
```cpp
if (flags.data_binary)
{
stream.write(reinterpret_cast<const char *>...Found this in deal.II: https://github.com/dealii/dealii/blob/1cf12e90abedcf5272eb4c4d916a059c36c7e0c7/source/base/data_out_base.cc#L1269-L1279
```cpp
if (flags.data_binary)
{
stream.write(reinterpret_cast<const char *>(values.data()),
values.size() * sizeof(data));
}
else
{
for (unsigned int i = 0; i < values.size(); ++i)
stream << '\t' << values[i];
stream << '\n';
}
```Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/7Fixed Bug in DistributedGridSynchronizer2018-12-24T13:10:49ZVít HanousekFixed Bug in DistributedGridSynchronizerAfter Tomas's refactorization in commit:
https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/commit/b373967c9f8d108cd12b61a39d502ecbad8403c1#4e57955fa29093af7da385587705802a7e1c7f81
Test GPUDistributedGridIOTest cannot be compiled (nvcc).
It ...After Tomas's refactorization in commit:
https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/commit/b373967c9f8d108cd12b61a39d502ecbad8403c1#4e57955fa29093af7da385587705802a7e1c7f81
Test GPUDistributedGridIOTest cannot be compiled (nvcc).
It was fixed by partial revert of refactorization in commit:
https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/commit/68d3e703452944a5d08d1cb0dc8336eb02e90722
Issue is to find why nvcc has in this Test (only) problem with Tomas's code.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/9double free in TNL::Config::ParameterContainer::~ParameterContainer2019-04-06T13:40:32ZJakub Klinkovskýdouble free in TNL::Config::ParameterContainer::~ParameterContainerThe implementation of the [ParameterContainer](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Config/ParameterContainer.h#L43-104) class is very poor, because it has an implicit `operator=` and a data member which invol...The implementation of the [ParameterContainer](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Config/ParameterContainer.h#L43-104) class is very poor, because it has an implicit `operator=` and a data member which involves raw pointers (`Containers::List< tnlParameterBase* >`), which may lead to double-free.
Test case:
```
#include <TNL/Devices/Host.h>
#include <TNL/Config/ConfigDescription.h>
#include <TNL/Config/ParameterContainer.h>
using namespace TNL;
int
main( int argc, char* argv[] )
{
Config::ParameterContainer parameters;
Config::ConfigDescription conf_desc;
Devices::Host::configSetup( conf_desc );
conf_desc.addEntry< String >( "Dummy", "Dummy parameter.", "" );
if( ! parseCommandLine( argc, argv, conf_desc, parameters ) ) {
conf_desc.printUsage( argv[ 0 ] );
return EXIT_FAILURE;
}
// create a copy of the parameter container
Config::ParameterContainer parametersCopy( parameters );
return EXIT_SUCCESS;
}
```
Compile and run:
```
$ clang++ -std=c++11 -O0 -g -I ~/.local/include -L ~/.local/lib -ltnl test_parameter_container.cpp -o test_parameter_container
$ ./test_parameter_container
double free or corruption (!prev)
Aborted (core dumped)
```
Backtrace:
```
(gdb) where
#0 0x00007f58ffc61d7f in raise () from /usr/lib/libc.so.6
#1 0x00007f58ffc4c672 in abort () from /usr/lib/libc.so.6
#2 0x00007f58ffca4878 in __libc_message () from /usr/lib/libc.so.6
#3 0x00007f58ffcab18a in malloc_printerr () from /usr/lib/libc.so.6
#4 0x00007f58ffcacc5c in _int_free () from /usr/lib/libc.so.6
#5 0x00007f5900165862 in TNL::Config::ParameterContainer::~ParameterContainer() ()
from /home/lahwaacz/.local/lib/libtnl.so.0.1
#6 0x00000000004025db in main (argc=1, argv=0x7fffff0ab188) at test_parameter_container.cpp:26
```Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/10MPI todo list2020-03-28T09:16:19ZJakub KlinkovskýMPI todo listGeneral:
- [x] runtime detection of CUDA-aware MPI
- [x] detection of MPI in cmake using FindMPI (and make it work nice with CUDA...)
- [ ] check that MPI implementation is thread-safe: https://stackoverflow.com/a/11074516
- ~~build con...General:
- [x] runtime detection of CUDA-aware MPI
- [x] detection of MPI in cmake using FindMPI (and make it work nice with CUDA...)
- [ ] check that MPI implementation is thread-safe: https://stackoverflow.com/a/11074516
- ~~build config tags for communicators?~~ (no, communicators will be eventually polymorphic types and their instances will be passed to the data structures)
JK:
- see how `DistributedMesh` is used - correctly it should have a `Communicator` template parameter, but it would propagate to `Grid` (due to its `distrGrid` pointer) and specializations involving grids
- `PDEProblem.h` has `CommunicatorType` and `DistributedMeshType` (they should be combined)Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/11Refactor VectorFieldVTKWriter and VectorFieldGnuplotWriter2019-11-08T14:49:40ZJakub KlinkovskýRefactor VectorFieldVTKWriter and VectorFieldGnuplotWriterThe [VectorFieldVTKWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/VectorFieldVTKWriter.h) and [VectorFieldGnuplotWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/Vecto...The [VectorFieldVTKWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/VectorFieldVTKWriter.h) and [VectorFieldGnuplotWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/VectorFieldGnuplotWriter.h) classes should be refactored analogically to [MeshFunctionVTKWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/MeshFunctionVTKWriter.h) and [MeshFunctionGnuplotWriter](https://jlk.fjfi.cvut.cz/gitlab/mmg/tnl-dev/blob/develop/src/TNL/Functions/MeshFunctionGnuplotWriter.h).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/12tnl-grid-setup does not check command-line arguments correctly2020-03-02T13:28:29ZJakub Klinkovskýtnl-grid-setup does not check command-line arguments correctlyRunning `tnl-grid-setup --dimensions 2` segfaults:
```
Setting real type to ... double
Setting index type to ... int
The program attempts to get unknown parameter size-x
Aborting the program.
Aborted (core dumped)
```Running `tnl-grid-setup --dimensions 2` segfaults:
```
Setting real type to ... double
Setting index type to ... int
The program attempts to get unknown parameter size-x
Aborting the program.
Aborted (core dumped)
```Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/13Move folder DistributedContainers to Containers.2018-12-26T10:59:48ZTomáš OberhuberMove folder DistributedContainers to Containers.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/14Rename Timer::stop() to Timer::pause()2019-03-04T20:49:05ZTomáš OberhuberRename Timer::stop() to Timer::pause()Changing the method name from stop() to pause() might be more intuitive.Changing the method name from stop() to pause() might be more intuitive.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/15Fix neighbors directions in distributed grid2019-01-25T08:59:54ZTomáš OberhuberFix neighbors directions in distributed gridChange directions for referring neighbors in distributed grid as:
- x -> Left, Right
- y -> Bottom,Top
- z -> Rear, FrontChange directions for referring neighbors in distributed grid as:
- x -> Left, Right
- y -> Bottom,Top
- z -> Rear, FrontVít HanousekVít Hanousekhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/18Templated constructor of String should be deleted2018-12-20T20:44:06ZJakub KlinkovskýTemplated constructor of String should be deletedThe following discussions from !10 should be addressed:
- [x] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/merge_requests/10#note_124): (+1 comment)
> This should be a free function, not a ...The following discussions from !10 should be addressed:
- [x] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/merge_requests/10#note_124): (+1 comment)
> This should be a free function, not a constructor (note that there is already `convertToString` which is overloaded for `bool`). At the very least the constructor should be explicit.
- [x] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/merge_requests/10#note_125): (+1 comment)
> The recursion should be avoided by deleting the templated constructor and using the free function `convertToString` explicitly instead. It can be renamed to `toString` or something like that to make it shorter, c.f. [std::to_string](https://en.cppreference.com/w/cpp/string/basic_string/to_string).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/19Installation problm with RPATH2018-12-13T09:28:45ZMatouš FenclInstallation problm with RPATHAn error of RPATH occurred during installation of TNL after software update:
```
...
-- Installing: /home/user/.local/bin/tnl-cuda-arch
CMake Error at src/Tools/cmake_install.cmake:50 (file):
file RPATH_CHANGE could not write new R...An error of RPATH occurred during installation of TNL after software update:
```
...
-- Installing: /home/user/.local/bin/tnl-cuda-arch
CMake Error at src/Tools/cmake_install.cmake:50 (file):
file RPATH_CHANGE could not write new RPATH:
to the file:
/home/user/.local/bin/tnl-cuda-arch
The current RUNPATH is:
/home/user/.openmpi/lib
which does not contain:
/home/user/Documents/tnl-dev-develop/Release/lib:
as was expected.
Call Stack (most recent call first):
src/cmake_install.cmake:45 (include)
cmake_install.cmake:48 (include)
Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1
```
Software after update:
Ubuntu 18.04
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
cmake version 3.13.0-rc3
NVIDIA-SMI 415.13 Driver Version: 415.13 CUDA Version: 10.0
mpirun (Open MPI) 3.1.3Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/20Using RealType (int, long, float, double, ...) when dividing2018-12-13T21:48:44ZLukáš Matthew ČejkaUsing RealType (int, long, float, double, ...) when dividingIn [ChunkedEllpack_imlp.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/blob/develop/src/TNL/Matrices/ChunkedEllpack_impl.h) on lines 177 - 186:
```c
/****
* Compute the chunk size
*/
IndexType maxChunkInSlice( 0 );
...In [ChunkedEllpack_imlp.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/blob/develop/src/TNL/Matrices/ChunkedEllpack_impl.h) on lines 177 - 186:
```c
/****
* Compute the chunk size
*/
IndexType maxChunkInSlice( 0 );
for( IndexType i = sliceBegin; i < sliceEnd; i++ )
maxChunkInSlice = max( maxChunkInSlice,
ceil( ( RealType ) rowLengths[ i ] /
( RealType ) this->rowToChunkMapping[ i ] ) );
TNL_ASSERT( maxChunkInSlice > 0,
std::cerr << " maxChunkInSlice = " << maxChunkInSlice << std::endl );
```
Casting to RealType is used in the ceil function and then the variables are divided.
In the case of RealType being int, this will cause **integer division**, and could possibly return 0, even though ceil() is type double.
Should the variables be cast to Double instead to avoid this?https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/21tnl-benchmark-blas produces wrong log2018-12-14T11:30:17ZTomáš Oberhubertnl-benchmark-blas produces wrong logThe log file generated by tnl-benchmark-blas has wrong format in case of SpMV tests.The log file generated by tnl-benchmark-blas has wrong format in case of SpMV tests.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/22Update String documentation2019-03-04T20:49:29ZTomáš OberhuberUpdate String documentationI have added flag skipEmpty to String::split, it needs to be mentioned in the documentation.I have added flag skipEmpty to String::split, it needs to be mentioned in the documentation.Nina DžugasováNina Džugasováhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/23Probably useless parameter in benchmarkArrayOperations2018-12-20T19:51:12ZTomáš OberhuberProbably useless parameter in benchmarkArrayOperationsThe parameter ```loops``` in Benchmarks/array-operations.h:26
```C++
benchmarkArrayOperations( Benchmark & benchmark,
const int & loops,
const long & size )
```
seems to be useless.The parameter ```loops``` in Benchmarks/array-operations.h:26
```C++
benchmarkArrayOperations( Benchmark & benchmark,
const int & loops,
const long & size )
```
seems to be useless.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/24Add scalar multiplicator parameter to vectorProduct in other sparse matrix fo...2020-03-01T09:48:38ZJakub KlinkovskýAdd scalar multiplicator parameter to vectorProduct in other sparse matrix formatsIn https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/commit/30b25f639627af6c9b5055a901a5fc599e2b46b2, the `multiplicator` parameter was added to the `vectorProduct` method in the Ellpack format to be able to compute `outVector = multipl...In https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/commit/30b25f639627af6c9b5055a901a5fc599e2b46b2, the `multiplicator` parameter was added to the `vectorProduct` method in the Ellpack format to be able to compute `outVector = multiplicator * matrix * inVector` in one step. The parameter should be added to other sparse matrix formats as well.Lukáš Matthew ČejkaLukáš Matthew Čejkahttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/25TYPED_TEST_CASE deprecated according to Google Test2019-03-28T08:59:19ZLukáš Matthew ČejkaTYPED_TEST_CASE deprecated according to Google TestUpon compilation of [Unit Tests](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/tree/develop/src/UnitTests/Matrices) that use TYPED_TEST_CASE, Google Test throws a series of warnings stating that TYPED_TEST_CASE is deprecated and sho...Upon compilation of [Unit Tests](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/tree/develop/src/UnitTests/Matrices) that use TYPED_TEST_CASE, Google Test throws a series of warnings stating that TYPED_TEST_CASE is deprecated and should be replaced with TYPE_TEST_SUITE.
Should TYPED_TEST_CASE be replaced with TYPED_TEST_SUITE?Lukáš Matthew ČejkaLukáš Matthew Čejkahttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/26Code revision2021-12-08T23:24:11ZTomáš OberhuberCode revisionTODO list for the code revison:
* renaming _impl.h files to .hpp
* change boolean return type to exception throwing
- [x] fix exception catching by-reference: #29
- [x] use `ASSERT_NO_THROW( map.save( "multimap-test.tnl" ) );` ins...TODO list for the code revison:
* renaming _impl.h files to .hpp
* change boolean return type to exception throwing
- [x] fix exception catching by-reference: #29
- [x] use `ASSERT_NO_THROW( map.save( "multimap-test.tnl" ) );` instead of `ASSERT_TRUE( map.save( "multimap-test.tnl" ) );` etc. in tests (see https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#exception-assertions)
* change boolean flag style parameters into enum class
* use operators << and >> insteal of File.read and File.write where it makes sense
* [x] add exception `NotImplementedError` and use it instead of codes like this:
```cpp
std::cerr << "Type conversion during saving is not implemented for MIC." << std::endl;
abort();
```
Or this:
```cpp
TNL_ASSERT( false, std::cerr << "TODO: implement" );
```
* [x] Documentation: indicate which functions/methods throw which exceptions
* Remove useless types from the public interface of classes:
- [x] `ThisType` - useless for the outside of the class, and the implementation of methods can simply use the class name
* [x] switch to C++14
----
- [x] String
- [x] Timer
- [x] Object
- [x] change bool save and load to void
- [x] File
- [x] Update examples, add data conversion.
- [x] use TransferBufferSize from Devices::Cuda
- [x] Remove `File::Mode` enum, use [std::ios_base::openmode](https://en.cppreference.com/w/cpp/io/ios_base/openmode) directly
- [x] Remove specific exceptions (`ArrayWrongSize`, `MeshFunctionDataMismatch`, `NotTNLFile`, `ObjectTypeDetectionFailure`, `ObjectTypeMismatch`) - all `save`/`load` methods should throw only `FileSerializationError`/`FileDeserializationError`
- [x] FileName
- [x] Array
- [x] Add method for setting array elements using lambda function
- [x] Copy constructor have to make deep copy - DOES NOT WORK with MultiMap yet
- [x] Add copy constructors from `std::list`, `std::vector` and `std::initializer_list`
- [x] Replace bind methods with ArrayView - after refactoring MeshFunction
- [x] Avoid binding in `Array( const Array&, const Index begin, const Index size );`
- [x] Remove `boundLoad` (used only in `Array` and derived objects, loading via `ArrayView` can be used instead: `array.getView().load( file );`)
- [x] Use `operator<<` and `operator>>` instead of `save` and `load` methods
- [x] Delete `operator bool ()`
- [x] ArrayView
- [x] what about `__cuda_callable__` ArrayView assignment?
- [x] Use `operator<<` and `operator>>` instead of `save` and `load` methods
- [x] StaticVector
- [x] Replace all for loops with static loops, i.e. templated for
- [x] u * v should not be dot product but element-wisi multiplication
- [x] use (u,v) for dot product
- [x] Vector
- [x] `Vector` should have the same serialization type as `Array` so that arrays can be loaded into vectors and vice versa
- [x] Delete methods for vector operations which are used in linear solvers - the replacement in the solvers must be tested carefuly
- [x] Implement DistributedVectorExpressions and DistributedVectorViewExpressions
- [x] On some places the method getView() is used because DistributedVectorExpressions are not implemented yet (mainly linear solvers and BLAS benchmark) - all occurences can be deleted later
- [x] Add constructor from expression template
- [x] Remove MultiVector and MultiArray - after refactoring Cameo - summer 2019
- [x] Parallel reduction
- [x] Use auto in lambdas to avoid volatileReduction - it does not work with CUDA 10.0
- [x] Rewrite multi-reduction with lambdas
- [x] ConfigDescription
- [x] ParameterContainer
- allow any types (currently only `int`, `double`, `bool`, `String`)
- allow easy instantiation without the command-line parser (e.g. to pass a dict from python)
- exceptions when accessing unknown parameters
- [x] Logger
- moved to https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/98
- [x] Pointers
- moved to https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/97
- [x] Matrices
- [x] fix getSerializationType the same way as in Array
- [x] rename the method setCompressedRowLengths to setRowCapacities
- [x] implement sparse matrices using Segments
- [x] implement CSR matrix and Ellpack matrix using the Segments, use existing unit tests for debugging
- [ ] implement set/addRow using VectorView and lambda functions
- [x] implement "Lambda matrix" - the element values are given by a lambda function
- [x] implement constructor from initializer list to DenseMatrix
- [x] implement method for setting elements from initializer list to sparse matrix
- [x] implement constructor and method for setting elements from std::map similar to initializer list to sparse matrix
- [ ] update dense matrix multiplication with the new dense matrix implementation
- [ ] update dense matrix transposition with the new dense matrix implementation
- [x] move methods for matrux coloring outside the matrices
- [ ] finish DenseMatrixView::getRowVectorProduct
- [x] implement opertor == for matrices
- [x] Add constructor of matrix views from vector views
- [x] Allocators
- moved to !33