tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2021-11-17T16:39:52Zhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/96Log benchmarks metadata with the JSON format2021-11-17T16:39:52ZJakub KlinkovskýLog benchmarks metadata with the JSON formatThe current `JsonLogging` class writes the metadata only to `std::cout`, but not to the log file.The current `JsonLogging` class writes the metadata only to `std::cout`, but not to the log file.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/93Refactor parameters for linear solvers2021-12-09T02:00:34ZJakub KlinkovskýRefactor parameters for linear solvers- It is not sufficient to create an empty `ParameterContainer`, set a few parameters and pass it to some class -- the user also needs to create a `ConfigDescription` and call `configSetup` on all classes where they want to pass the conta...- It is not sufficient to create an empty `ParameterContainer`, set a few parameters and pass it to some class -- the user also needs to create a `ConfigDescription` and call `configSetup` on all classes where they want to pass the container.
- The user should not be forced to deal with default values. Default values should be taken implicitly when the parameter is missing in the `ParameterContainer`. There are functions like `checkParameter`, `checkParameters` and `checkParameterType`, but they are sparsely used. Most often `getParameter` is called and the program crashes if the parameter is missing.
- The `configSetup` functions are not intuitive, they cannot be used to build a hierarchy. For example, `GMRES::configSetup` does not call `configSetup` from its base class, and even the base class does not call `configSetup` from its base-base-class, so the user needs to call `configSetup` from 3 levels manually, even if they just want to configure _one_ linear solver.
- The parameter `convergence-residue` is set to 0 by default, so the linear solvers will practically never converge by default.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/87Scan only allows vector type2021-08-11T17:13:50ZXuan Thang NguyenScan only allows vector typeScan< Devices::Cuda, Type >::perform only allows vector types but not array.
The main issue seems to be mismatch of type alias, in scan `using RealType = typename Vector::RealType;` is declared.
vector uses the alias `using RealType = ...Scan< Devices::Cuda, Type >::perform only allows vector types but not array.
The main issue seems to be mismatch of type alias, in scan `using RealType = typename Vector::RealType;` is declared.
vector uses the alias `using RealType = Real;`
but
array uses the alias `using ValueType = Value;`
For usage, both mean the same thing but are named differently.
Refactoring of internal type alias should solve the problem.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/86PyTNL works with legacy matrix implementation2021-10-01T12:20:07ZTomáš OberhuberPyTNL works with legacy matrix implementationJakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/83getOrganization() methods in segments have wrong return type2021-11-04T17:35:40ZJakub KlinkovskýgetOrganization() methods in segments have wrong return typeAll `getOrganization()` methods in segments return `bool` instead of `ElementsOrganization`, see e.g. [Ellpack.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Algorithms/Segments/Ellpack.h#L33)All `getOrganization()` methods in segments return `bool` instead of `ElementsOrganization`, see e.g. [Ellpack.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Algorithms/Segments/Ellpack.h#L33)Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/78CUDA reduction does not work with result type whose alignment is not 8, 16, 3...2020-07-10T13:05:48ZJakub KlinkovskýCUDA reduction does not work with result type whose alignment is not 8, 16, 32 or 64 bitsThe implementation relies on `extern __shared__` variables, which are very restricted - see the comment in [SharedMemory.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/aaccf135a29513f270c7f34de3a2bdeeaaf3cfc5/src/TNL/Cuda/S...The implementation relies on `extern __shared__` variables, which are very restricted - see the comment in [SharedMemory.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/aaccf135a29513f270c7f34de3a2bdeeaaf3cfc5/src/TNL/Cuda/SharedMemory.h). There are specializations only for 8, 16, 32 and 64 bit types and it is not possible to make it general for any type, so CUDA reduction does not work for types such as `StaticVector< 5, double >` or general `struct`s whose size may not even be power of 2.
It would be much easier to use static size arrays for the shared memory (i.e. without `extern`). It is possible, since we only launch reduction kernels with a constant block size.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/73Generalize DistributedMeshSynchronizer for faces2020-07-30T12:54:43ZJakub KlinkovskýGeneralize DistributedMeshSynchronizer for facesIf possible, for any subentity topology.
First, faces have to be assigned an owner subdomain. A hypothesis is that this can be done by checking if all subvertices are local (thanks to the way we assign an owner subdomain to vertices).If possible, for any subentity topology.
First, faces have to be assigned an owner subdomain. A hypothesis is that this can be done by checking if all subvertices are local (thanks to the way we assign an owner subdomain to vertices).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/72Simplify interface of loadDistributedMesh and distributeMesh2021-07-01T06:55:30ZJakub KlinkovskýSimplify interface of loadDistributedMesh and distributeMeshThe `loadDistributedMesh` and `distributeMesh` functions were written specifically for the distributed grid, but they don't match the interface of the general distributed mesh.
- only the distributed mesh should be passed to `loadDistri...The `loadDistributedMesh` and `distributeMesh` functions were written specifically for the distributed grid, but they don't match the interface of the general distributed mesh.
- only the distributed mesh should be passed to `loadDistributedMesh`, the local mesh can be obtained with `mesh.getLocalMesh()` (at least for the distributed mesh, distributed grid has an inverse relation with the local grid)
- `distributeMesh` should not be used at all with a general distributed mesh (decomposition is done by `tnl-decompose-mesh`, then it is loaded with `PVTUReader`). Try to merge `distributeMesh` for grids with the overload of `loadDistributedMesh` for grids.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/71Overload functions l2Norm and lpNorm for 1D StaticVector2021-01-08T17:27:33ZJakub KlinkovskýOverload functions l2Norm and lpNorm for 1D StaticVectorFor 1D vectors, the `l2Norm` and `lpNorm` functions are equivalent to taking the absolute value of the 0-th component, so there should be overloads avoiding the expensive calls to `TNL::sqrt` and `TNL::pow`.
Then remove `getVectorLength...For 1D vectors, the `l2Norm` and `lpNorm` functions are equivalent to taking the absolute value of the 0-th component, so there should be overloads avoiding the expensive calls to `TNL::sqrt` and `TNL::pow`.
Then remove `getVectorLength` from [getEntityMeasure.h](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Meshes/Geometry/getEntityMeasure.h#L53-68).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/70Implement parsing of binary data in VTKReader2021-05-13T20:51:06ZJakub KlinkovskýImplement parsing of binary data in VTKReaderThe `VTKReader` (for the legacy VTK format) can read only ASCII data, but `VTKWriter` can write ASCII or binary.The `VTKReader` (for the legacy VTK format) can read only ASCII data, but `VTKWriter` can write ASCII or binary.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/69Implement parsing of ASCII arrays in the XMLVTK class2021-05-13T20:51:05ZJakub KlinkovskýImplement parsing of ASCII arrays in the XMLVTK classThis is not finished in !65.This is not finished in !65.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/67Missing segmentsCount attribute in BiEllpack and ChunkedEllpack2020-05-09T10:05:31ZJakub KlinkovskýMissing segmentsCount attribute in BiEllpack and ChunkedEllpackSee https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Containers/Segments/BiEllpack.hpp#L351-360 and https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Containers/Segments/ChunkedEll...See https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Containers/Segments/BiEllpack.hpp#L351-360 and https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Containers/Segments/ChunkedEllpack.hpp#L304-312Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/66Matrix::operator== does not work2020-05-09T10:08:11ZJakub KlinkovskýMatrix::operator== does not workThe [operator==](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Matrices/Matrix.hpp#L144-159) in `Matrix` uses `getElement` which is not defined in `Matrix`:
```cpp
../src/TNL/Matrices/Matrix.hpp:156:20: e...The [operator==](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices/src/TNL/Matrices/Matrix.hpp#L144-159) in `Matrix` uses `getElement` which is not defined in `Matrix`:
```cpp
../src/TNL/Matrices/Matrix.hpp:156:20: error: ‘const class TNL::Matrices::Matrix<bool, TNL::Devices::Host, int, std::allocator<bool> >’ has no member named ‘getElement’
156 | if( this->getElement( row, column ) != matrix.getElement( row, column ) )
| ~~~~~~^~~~~~~~~~
```Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/65SparseMatrixView::rowVectorProduct is not implemented2020-05-09T10:05:31ZJakub KlinkovskýSparseMatrixView::rowVectorProduct is not implementedSee https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Matrices/SparseMatrixView.hpp#L345-358See https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Matrices/SparseMatrixView.hpp#L345-358Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/64SparseMatrix attributes are not protected2020-06-17T05:59:38ZJakub KlinkovskýSparseMatrix attributes are not protectedSee https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Matrices/SparseMatrix.h#L228-229See https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Matrices/SparseMatrix.h#L228-229Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/62Recording errors into logs2021-11-17T16:39:52ZLukáš Matthew ČejkaRecording errors into logsCurrently, any input into logs consists of hardware information, or Benchmark results.
However, if a Matrix fails to be allocated, there needs to be some sort of way to record this in the logs.Currently, any input into logs consists of hardware information, or Benchmark results.
However, if a Matrix fails to be allocated, there needs to be some sort of way to record this in the logs.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/61absolute value of vector of vertors2020-07-10T13:05:47ZTomáš Jakubecabsolute value of vector of vertorsThis code does not compile.
```c++
TNL::Containers::Vector<TNL::Containers::StaticVector<3,int>, TNL::Devices::Host, size_t> vec;
vec.setSize(2);
vec = TNL::Containers::StaticVector<3,int>{1,-2,3};
TNL::abs(a); // error
...This code does not compile.
```c++
TNL::Containers::Vector<TNL::Containers::StaticVector<3,int>, TNL::Devices::Host, size_t> vec;
vec.setSize(2);
vec = TNL::Containers::StaticVector<3,int>{1,-2,3};
TNL::abs(a); // error
```
The compiler does not see this funciton from the context of function `Abs::evaluate`:
```c++
////
// Abs
template< int Size, typename Real >
__cuda_callable__
auto
abs( const Containers::StaticVector< Size, Real >& a )
{
return Containers::Expressions::StaticUnaryExpressionTemplate< Containers::StaticVector< Size, Real >, Containers::Expressions::Abs >( a );
}
```
and the only visible function from the context is this one.
```c++
template< class T,
std::enable_if_t< ! std::is_unsigned<T>::value, bool > = true>
__cuda_callable__ inline
T abs( const T& n );
```
It does not apply the right function because the function `abs( const Containers::StaticVector< Size, Real >& a )` is in the namespace TNL instead of TNL::Containers as its argument is. Moreover, the `Abs::evaluate` calls `TNL::abs` which does not trigger ADL (argument dependent lookup), see [this](https://stackoverflow.com/questions/12530174/template-function-lookup). By the way that is the reason why operators +,-, etc. works properly. The same problem applies to other expression functions.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/60Addition of vector of static vectors and its RealType static vector2020-07-10T13:05:46ZTomáš JakubecAddition of vector of static vectors and its RealType static vectorThis code does not compile. The compiler tries to use `StaticExpressionTemplate`, thus it fails.
```c++
TNL::Containers::Vector<TNL::Containers::StaticVector<3,double>, TNL::Devices::Host, size_t> Tvec;
Tvec.setSize(1);
Tvec...This code does not compile. The compiler tries to use `StaticExpressionTemplate`, thus it fails.
```c++
TNL::Containers::Vector<TNL::Containers::StaticVector<3,double>, TNL::Devices::Host, size_t> Tvec;
Tvec.setSize(1);
Tvec = TNL::Containers::StaticVector<3,double>{1,2,3};
TNL::Containers::StaticVector<3,double>svec{5,6,7};
Tvec = (2*Tvec) + svec;
```Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/59CMake: skip -march=native -mtune=native for Python bindings2020-01-17T20:36:09ZJakub KlinkovskýCMake: skip -march=native -mtune=native for Python bindingsThis is needed on heterogeneous clusters (e.g. Helios) where several nodes have different CPU architectures.
See https://stackoverflow.com/questions/59733496/cmake-exclude-compile-options-for-one-targetThis is needed on heterogeneous clusters (e.g. Helios) where several nodes have different CPU architectures.
See https://stackoverflow.com/questions/59733496/cmake-exclude-compile-options-for-one-targetJakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/58macro __STRING2020-03-02T13:28:28ZTomáš Jakubecmacro __STRINGUsage of non standard macro `__STRING`. This macro is defined in cdefs.h which is not part of stl.
The definition is really simple:
```c++
#define __STRING(x) #x
```Usage of non standard macro `__STRING`. This macro is defined in cdefs.h which is not part of stl.
The definition is really simple:
```c++
#define __STRING(x) #x
```Tomáš JakubecTomáš Jakubec