tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2020-02-05T09:41:02Zhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/57Bug in VTK export of Grid2020-02-05T09:41:02ZTomáš OberhuberBug in VTK export of GridFor 3D grids, the VTK export does not work. Z dimension of the exported mesh seems to be wrong.For 3D grids, the VTK export does not work. Z dimension of the exported mesh seems to be wrong.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/55Implement nD ParallelFor2021-11-23T19:05:01ZTomáš OberhuberImplement nD ParallelForImplement nD `ParallelFor` using `StaticArray< Dim, Index >` as:
```
template< typename Device, typename Mode >
struct ParallelFor{
template< int Dim,
typename Index,
typename Function,
typen...Implement nD `ParallelFor` using `StaticArray< Dim, Index >` as:
```
template< typename Device, typename Mode >
struct ParallelFor{
template< int Dim,
typename Index,
typename Function,
typename... FunctionArgs >
static void exec( const StaticArray< Dim, Index >& start, const StaticArray< Dim, Index >& end, Function F, FunctionArgs.. args );
}
```https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/54How to compile tutorials.2019-11-28T13:27:39ZTomáš OberhuberHow to compile tutorials.Add information, how to compile tutorials. For example -DHAVE_CUDA is important.Add information, how to compile tutorials. For example -DHAVE_CUDA is important.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/52Meshes todo list2020-07-30T12:54:42ZJakub KlinkovskýMeshes todo list- [x] write tests for `Mesh` traverser
- [x] rewrite `Traverser` using `ParallelFor`
- [x] writer for the XML-based VTK format: see #6
- [x] big mesh refactoring
- mesh pointer added to `MeshEntity`, all topology accessors redirected...- [x] write tests for `Mesh` traverser
- [x] rewrite `Traverser` using `ParallelFor`
- [x] writer for the XML-based VTK format: see #6
- [x] big mesh refactoring
- mesh pointer added to `MeshEntity`, all topology accessors redirected through it to the mesh
- storage of points and subentity orientations moved from `MeshEntity` to `Mesh`
- removed `MeshEntityIndex` - `MeshEntity` always stores its index as the `GlobalIndexType`
- removed entity storage from Mesh - mesh entities can be generated on the fly
- some minor related simplifications, mainly in the mesh initializer
- remove `entityStorage` from the mesh configuration
- [x] `TypeResolver`: `resolveMeshType`, `loadMesh`, `decomposeMesh`:
- [x] better detection of the format (currently based on the file name suffix) (solved by the manual override option)
- [x] file detection is done twice: once for `resolveMeshType`, then again for `loadMesh`
- [x] refactor `MeshFunction` - implement `MeshFunctionView`
- [x] implement `tnl-decompose-mesh` (wrapper tool using Metis)
- [x] output `.pvtu` file
- [x] generate overlaps (ghost cells) for use in `DistributedMesh`
- [x] mesh entity tags
- we need to store at least boundary and ghost entity tags - use bitfield array similar to VTK
- if possible, implement a general interface for user tags (could be stored in the same array, but users would have to respect the boundary and ghost bits)
- [x] implement `PVTUReader`
- [x] implement `DistributedMesh`
- wrapper around `Mesh` - includes local and ghost entities, which are differentiated by a tag
- mapping from local to global indices is easy - separate index arrays (or just for ghost entities, if they are ordered after the local entities - then rank offsets is sufficient for local entities)
- the local mesh should be worked with using local indices (`getEntity`, `getSubentityIndex`, `getSuperentityIndex` etc.), because mapping from global indices to local indices is not easy (ghost entities may be discontinuous, mapping by rank offsets is impossible)
- local index mappings (index arrays for efficient iteration):
- `ghosts`
- `local`
- `ghostNeighbours` (entities which are ghosts on other ranks - for synchronization)
- `localInternal` (not ghosts on any ranks)
- `boundary` (boundary of the local mesh (including overlaps))
- `interior` (interior of the local mesh (including overlaps))
- local mesh decompositions: `all = local + ghosts`, `local = ghostNeighbours + localInternal`, `all = boundary + interior`
- [x] write tests
- [x] implement `DistributedMeshSynchronizer`
- [x] write tests
- [x] implement `forAll`, `forBoundary`, `forInterior` methods like in `NDArray`; also `forLocal`, `forGhost` (lambda function takes just the index, mesh access has to be handled manually)Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/50MpiCommunicator::selectGPU does not work reliably when multiple nodes are sel...2021-06-15T08:12:25ZJakub KlinkovskýMpiCommunicator::selectGPU does not work reliably when multiple nodes are selectedThe computation of "node rank" is problematic - maybe `MPI_Get_processor_name` does not work reliably. Sometimes multiple ranks are assigned the same GPU.The computation of "node rank" is problematic - maybe `MPI_Get_processor_name` does not work reliably. Sometimes multiple ranks are assigned the same GPU.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/49Rename prefix sum methods in vectors to scan2019-11-08T14:49:39ZJakub KlinkovskýRename prefix sum methods in vectors to scanThe former `PrefixSum` class was renamed to `Scan`, but the methods in vector classes (`Vector`, `VectorView`, `DistributedVector` and `DistributedVectorView`) stayed as `prefixSum` and `segmentedPrefixSum` - see e.g. https://mmg-gitlab....The former `PrefixSum` class was renamed to `Scan`, but the methods in vector classes (`Vector`, `VectorView`, `DistributedVector` and `DistributedVectorView`) stayed as `prefixSum` and `segmentedPrefixSum` - see e.g. https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/blob/develop/src/TNL/Containers/Vector.h#L269
While we're renaming things, `exclusiveScan` method should be added as a shortcut for `vector.template scan< TNL::Containers::Algorithms::ScanType::Exclusive >()`. Both methods should be used in the [tutorial](https://mmg-gitlab.fjfi.cvut.cz/doc/tnl/tutorial_03_reduction.html#flexible_scan).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/48Delete setValue in Matrices::Dense::setDimensions.2020-03-03T16:27:01ZTomáš OberhuberDelete setValue in Matrices::Dense::setDimensions.`this->values.setValue(0.0)` should not be there, it just decreases performance. Check other matrix formats for the same issue.`this->values.setValue(0.0)` should not be there, it just decreases performance. Check other matrix formats for the same issue.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/47Replace StaticArray::setValue with StaticArray::operator=2019-09-01T19:26:50ZTomáš OberhuberReplace StaticArray::setValue with StaticArray::operator=`StaticArray::getValue` should be replaced with `operator=` as well as it is in `Array`. I have created static array assignment class in `Containers/Algorithms/StaticArrayAssignment.h`, however, `IsStaticArrayType< T >` does not work for...`StaticArray::getValue` should be replaced with `operator=` as well as it is in `Array`. I have created static array assignment class in `Containers/Algorithms/StaticArrayAssignment.h`, however, `IsStaticArrayType< T >` does not work for integral types since they do not have `T::getSize` (`TypeTraits.h:146`). This should be fixed first.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/46Remove getType() methods2019-11-08T14:49:39ZJakub KlinkovskýRemove getType() methodsThey are not necessary, because `std::type_info::name` either returns a human-readable string (MSVC, IBM, Oracle) or can be demangled (GCC, Clang). See https://en.cppreference.com/w/cpp/types/type_info/nameThey are not necessary, because `std::type_info::name` either returns a human-readable string (MSVC, IBM, Oracle) or can be demangled (GCC, Clang). See https://en.cppreference.com/w/cpp/types/type_info/nameJakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/43Implement distributed prefix-sum with MPI2019-08-17T18:35:47ZJakub KlinkovskýImplement distributed prefix-sum with MPIAny implementation for `DistributedVector` and `DistributedVectorView` is missing.Any implementation for `DistributedVector` and `DistributedVectorView` is missing.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/42Implement parallel prefix-sum with OpenMP2019-08-17T18:35:46ZJakub KlinkovskýImplement parallel prefix-sum with OpenMPThe specialization of `PrefixSum` for host is only sequential, any parallelization is missing.The specialization of `PrefixSum` for host is only sequential, any parallelization is missing.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/41Implement argMin and argMax for DistributedVector and DistributedVectorView2019-08-10T16:30:18ZJakub KlinkovskýImplement argMin and argMax for DistributedVector and DistributedVectorView`argMin` and `argMax` are the only operations which are not yet implemented for `DistributedVector` and `DistributedVectorView`.
The relevant tests are disabled, see [VectorUnaryOperationsTest.h:518](https://mmg-gitlab.fjfi.cvut.cz/gitl...`argMin` and `argMax` are the only operations which are not yet implemented for `DistributedVector` and `DistributedVectorView`.
The relevant tests are disabled, see [VectorUnaryOperationsTest.h:518](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/commit/f9f3959e3b406f714f98d22e8cc27c924ab26e14#a43e13a5e5f5b4ee5190413c9fa76ccb0907496e_401_518).Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/40Optimize scalar product (reduction) on CPU2019-10-12T10:24:07ZTomáš OberhuberOptimize scalar product (reduction) on CPUBenchmarks show that our implementation of scalar product on CPU is very slow.
```
scalar product 400000 CPU 5.4616 0.00109134 N/A
scalar product 400000 CPU ET 4...Benchmarks show that our implementation of scalar product on CPU is very slow.
```
scalar product 400000 CPU 5.4616 0.00109134 N/A
scalar product 400000 CPU ET 4.96865 0.00119962 0.909742
scalar product 400000 CPU BLAS 17.7799 0.000335237 3.25543
```
Since ET (expression templates) and non-ET version behaves almost the same, it seems that even the original implementation before switching to ET was not optimal. We should check the implementation of scalar product in BLAS and improve it.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/39Add variadic template parameter to Reduction for user defined arguments2019-08-11T18:45:06ZTomáš OberhuberAdd variadic template parameter to Reduction for user defined argumentsAdd variadic template parameter to Reduction for user defined arguments. The arguments would be passed to fetcher.Add variadic template parameter to Reduction for user defined arguments. The arguments would be passed to fetcher.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/37Add method ParameterContainer::getList2019-07-14T11:06:49ZTomáš OberhuberAdd method ParameterContainer::getListFetching a list of parameters from the ParameterContainer works as follows now:
```
const auto& list = parameters.getParameter< std::vector< String > >( "list" );
```
It should be replaced with
```
const auto& list = parameters.getLis...Fetching a list of parameters from the ParameterContainer works as follows now:
```
const auto& list = parameters.getParameter< std::vector< String > >( "list" );
```
It should be replaced with
```
const auto& list = parameters.getList< String >( "list" );
```Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/36addEntryEnum does not work for list entry.2019-07-14T11:06:39ZTomáš OberhuberaddEntryEnum does not work for list entry.ConfigDescription crashes when one tries to define entry enum values using adEntryEnum for list entry. For example like this:
```
configDescription.addList< String >( "string-list" );
configDescription.eddEntryEnum< String >( "entry" );...ConfigDescription crashes when one tries to define entry enum values using adEntryEnum for list entry. For example like this:
```
configDescription.addList< String >( "string-list" );
configDescription.eddEntryEnum< String >( "entry" );
```
The problem seems to be on ConfigDescription.h:139 where the entry is being cast to EntryType which is std::vector< String > but not String.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/35Overriding of RealType in vertical expressions2019-08-10T16:22:17ZTomáš OberhuberOverriding of RealType in vertical expressionsThe original implementation o vector operations allowed to do this:
```
using VectorType = Containers::Vector< bool, Devices::Host >;
VectorType v( 100 );
v.setValue( true);
auto a = v.sum< int >();
```
The sumation would be performed ...The original implementation o vector operations allowed to do this:
```
using VectorType = Containers::Vector< bool, Devices::Host >;
VectorType v( 100 );
v.setValue( true);
auto a = v.sum< int >();
```
The sumation would be performed in bool, by default, which would not give correct result. We can, however, simply change it to `int`. In the new implementation, we state
```
a = sum( v );
```
instead. I would like to be able to write `a = sum< int >( v )` but I did not find any way how to do it.
Solution might be `a = sum( ( int ) v )`.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/34Fix comparison operator of ArrayView/VectorView in gtest.2019-07-16T13:44:23ZTomáš OberhuberFix comparison operator of ArrayView/VectorView in gtest.Gtest does not accept (cannot compile) `operator==` for `ArrayView` or `VectorView`. `EXPECT_EQ( u, v )` must be replaced with `EXPECT_TRUE( u == v )`. See for example `ArrayViewTest.h`, `assignmentOperator` test.Gtest does not accept (cannot compile) `operator==` for `ArrayView` or `VectorView`. `EXPECT_EQ( u, v )` must be replaced with `EXPECT_TRUE( u == v )`. See for example `ArrayViewTest.h`, `assignmentOperator` test.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/32CUDA reduction uses the same buffer as input and output array2019-04-15T14:05:36ZTomáš OberhuberCUDA reduction uses the same buffer as input and output arrayIn `TNL/Containers/Algorithms/Reduction_impl.h:139` whel calling `CudaReductionKernelLauncher` we use the same buffer `deviceAux1` as input and output buffer for the reduction. If the CUDA block with index 0 is not the first one to finis...In `TNL/Containers/Algorithms/Reduction_impl.h:139` whel calling `CudaReductionKernelLauncher` we use the same buffer `deviceAux1` as input and output buffer for the reduction. If the CUDA block with index 0 is not the first one to finish its work, its data can be overwritten by other CUDA blocks. We want to avoid allocating of two buffers. Solution might be to increase the size of `deviceAux1` and split into two buffers. We need to check performance when fixing this!Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/30CUDA version installation2019-03-29T16:48:58ZMatouš FenclCUDA version installationTNL installation failure.
CUDA: 10.1
NVIDIA driver: 418.43
cmake: 3.14.0
gcc: 7.3.0
error:
```
/home/maty/Documents/tnl/src/TNL/Atomic.h: In instantiation of ‘T TNL::Atomic<T, TNL::Devices::Cuda>::load() const [with T = int]’:
/home/ma...TNL installation failure.
CUDA: 10.1
NVIDIA driver: 418.43
cmake: 3.14.0
gcc: 7.3.0
error:
```
/home/maty/Documents/tnl/src/TNL/Atomic.h: In instantiation of ‘T TNL::Atomic<T, TNL::Devices::Cuda>::load() const [with T = int]’:
/home/maty/Documents/tnl/src/TNL/Atomic.h:160:12: required from ‘TNL::Atomic<T, TNL::Devices::Cuda>::operator T() const [with T = int]’
/home/maty/Documents/tnl/src/TNL/Matrices/DistributedSpMV.h:117:25: required from ‘void TNL::Matrices::DistributedSpMV<Matrix, Communicator>::updateCommunicationPattern(const MatrixType&, TNL::Matrices$
/tmp/tmpxft_000024e2_00000000-5_tnl-benchmark-distributed-spmv.cudafe1.stub.c:34:531: required from here
/home/maty/Documents/tnl/src/TNL/Atomic.h:154:17: error: passing ‘const TNL::Atomic<int, TNL::Devices::Cuda>’ as ‘this’ argument discards qualifiers [-fpermissive]
return ((Atomic*)this)->fetch_add( 0 );
~~~~~~~~~^~~
/home/maty/Documents/tnl/src/TNL/Atomic.h:202:3: note: in call to ‘T TNL::Atomic<T, TNL::Devices::Cuda>::fetch_add(T) [with T = int]’
T fetch_add( T arg )
^~~~~~~~~
CMake Error at tnl-benchmark-distributed-spmv-cuda_generated_tnl-benchmark-distributed-spmv.cu.o.Debug.cmake:279 (message):
Error generating file
/home/maty/Documents/tnl/Debug/src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir//./tnl-benchmark-distributed-spmv-cuda_generated_tnl-benchmark-distributed-spmv.cu.o
src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir/build.make:543: recipe for target 'src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir/tnl-benchmark-dist$
make[2]: *** [src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir/tnl-benchmark-distributed-spmv-cuda_generated_tnl-benchmark-distributed-spmv.cu.o] Error 1
CMakeFiles/Makefile2:2676: recipe for target 'src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir/all' failed
make[1]: *** [src/Benchmarks/DistSpMV/CMakeFiles/tnl-benchmark-distributed-spmv-cuda.dir/all] Error 2
```
Originally Atomic.h:153 with same error but code:
return const_cast<Atomic*>(this)->fetch_add( 0 );Tomáš OberhuberTomáš Oberhuber