tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2022-07-03T19:38:32Zhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/101Update tnl-decompose-mesh for polyhedral meshes2022-07-03T19:38:32ZJakub KlinkovskýUpdate tnl-decompose-mesh for polyhedral meshesWe need to collect also faces on each subdomain and add them to the mesh builder.We need to collect also faces on each subdomain and add them to the mesh builder.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/100JSON log transform script not working2022-02-24T20:37:58ZLukáš Matthew ČejkaJSON log transform script not workingBenchmark logs produced by the [run-tnl-benchmark-spmv](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/run-tnl-benchmark-spmv) script fail to be parsed by the JSON parser script [tnl-spmv-benchma...Benchmark logs produced by the [run-tnl-benchmark-spmv](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/run-tnl-benchmark-spmv) script fail to be parsed by the JSON parser script [tnl-spmv-benchmark-make-tables-json.py](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/tnl-spmv-benchmark-make-tables-json.py) with the following error:
```
Parsing input file....
Traceback (most recent call last):
File "tnl-spmv-benchmark-make-tables-json.py", line 956, in <module>
d = json.load(f)
File "/usr/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 444)
```
**How to reproduce:**
1. If you don't have any matrices set up in the script directory, ten you can briefly run the [get-matrices](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/get-matrices) script to download some into used folder "scripts/mtx_matrices".
2. Run spmv benchmarks using the [run-tnl-benchmark-spmv](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/run-tnl-benchmark-spmv) script.
3. Convert the benchmark JSON logs using the tnl-spmv-benchmark-make-tables-json.py](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Benchmarks/scripts/tnl-spmv-benchmark-make-tables-json.py) script.
**Expected behaviour:**
- The python script will convert the log file containing JSON results of benchmarks to an html file.
**Actual behaviour:**
- The python script fails since the logs are not a valid JSON as a whole, rather, every line is a valid JSON on its own (source: @klinkovsky).
**Notes:**
- Loading the entire JSON from the logs won't work, each line will have to be parsed separately.
For example:
```
data = []
for line in open("sparse-matrix-benchmark.log").readlines():
data.append(json.loads(line))
```
- When working with tables in Python, @klinkovsky recommends to use the Pandas library. Specifically, to load logs to Pandas dataframe, the following function can be used: [link to file](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/Python/BenchmarkLogs.py#L40-54).
- Example log file: [sparse-matrix-benchmark.log](/uploads/e1eb86b965fc9a7692d8c3bdd4cf7402/sparse-matrix-benchmark.log).https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/99Configurable SolverMonitor2021-12-09T04:48:09ZJakub KlinkovskýConfigurable SolverMonitorThe `SolverMonitor` class should be more configurable for different types of applications. The interface could be similar to the [BenchmarkResult](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Benchmarks/Bench...The `SolverMonitor` class should be more configurable for different types of applications. The interface could be similar to the [BenchmarkResult](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Benchmarks/Benchmarks.h#L28-60) class used for configuring benchmarks.Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/98Structured logger for solvers2021-11-25T19:46:53ZJakub KlinkovskýStructured logger for solvers- the `TNL::Logger` class should be structured, i.e. like the inverse of the `ParameterContainer`
- then it will be possible to make serialization classes (JSON, yaml or pretty-format) or let it pass to Python
- idea: the `writeProlog` m...- the `TNL::Logger` class should be structured, i.e. like the inverse of the `ParameterContainer`
- then it will be possible to make serialization classes (JSON, yaml or pretty-format) or let it pass to Python
- idea: the `writeProlog` method just serializes `ParameterContainer` into `Logger`, it should be possible to do that automatically
- some logging library like [spdlog](https://github.com/gabime/spdlog) or [Easylogging++](https://github.com/muflihun/easyloggingpp) could be used
(moved from #26)Jakub KlinkovskýJakub Klinkovskýhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/97Allocators and smart pointers2021-11-25T19:45:45ZJakub KlinkovskýAllocators and smart pointers- add `Allocator` to smart pointers
(moved from #26)- add `Allocator` to smart pointers
(moved from #26)Jakub KlinkovskýJakub Klinkovskýhttps://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/95Fix getSerializationType() methods in segments2021-10-28T20:31:50ZJakub KlinkovskýFix getSerializationType() methods in segmentsThe following discussions from !105 should be addressed:
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1902):
> FIXME
- [ ] @klinkovsky started a [discussion...The following discussions from !105 should be addressed:
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1902):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1903):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1904):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1905):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1906):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1907):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1908):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1909):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1910):
> FIXME
- [ ] @klinkovsky started a [discussion](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/merge_requests/105#note_1911):
> FIXMEhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/94Refactor SpMV kernels using CudaBlockReduceShfl::warpReduce2021-09-28T20:35:56ZJakub KlinkovskýRefactor SpMV kernels using CudaBlockReduceShfl::warpReduceVarious SpMV kernels have "inlined" code for parallel reduction across warp, e.g. [EllpackCudaReductionKernelFull](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView...Various SpMV kernels have "inlined" code for parallel reduction across warp, e.g. [EllpackCudaReductionKernelFull](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView.hpp#L48-53). They should call [CudaBlockReduceShfl::warpReduce](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Algorithms/detail/CudaReductionKernel.h#L187-203) instead.Tomáš OberhuberTomáš Oberhuberhttps://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/92Sparse matrices with 64-bit indices for addressing values, but 32-bit storage...2021-09-28T19:29:14ZJakub KlinkovskýSparse matrices with 64-bit indices for addressing values, but 32-bit storage for column indicesE.g. PE has a matrix 471526400 x 471526400 with 3099301688 non-zeros. A 64-bit type is necessary to address the non-zero values and column indices in the global arrays, but we can store the column indices as 32-bit only. This would save ...E.g. PE has a matrix 471526400 x 471526400 with 3099301688 non-zeros. A 64-bit type is necessary to address the non-zero values and column indices in the global arrays, but we can store the column indices as 32-bit only. This would save about 25% of space (`double` + `int` vs `double` + `long int`).
See also https://github.com/pyamg/pyamg/issues/277Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/91Segments: "compute" parameter is not checked always2021-09-28T19:24:14ZJakub KlinkovskýSegments: "compute" parameter is not checked always- BiEllpack: `compute` seems to be checked correctly
- ChunkedEllpack: `compute` seems to be checked correctly
- Ellpack: `compute` is checked only in the general cases ([1](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/ma...- BiEllpack: `compute` seems to be checked correctly
- ChunkedEllpack: `compute` seems to be checked correctly
- Ellpack: `compute` is checked only in the general cases ([1](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView.hpp#L410), [2](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView.hpp#L427)), but not in the CUDA specializations ([3](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView.hpp#L44-46), [4](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/EllpackView.hpp#L79-81))
- SlicedEllpack: `compute` is not checked at all: [1](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp#L347-349), [2](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp#L364-366)
- CSR:
- Adaptive: `compute` is not checked: [1](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRAdaptiveKernelView.hpp#L83-125)
- Hybrid: `compute` is checked in the [multivector kernel](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRHybridKernel.hpp#L112), but not in the [hybrid kernel](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRHybridKernel.hpp#L52-55)
- Light: `compute` is checked in the [multivector kernel](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRLightKernel.hpp#L316-320), but not in the [other kernels](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRLightKernel.hpp#L50-252)
- Scalar: `compute` seems to be checked correctly
- Vector: `compute` is not checked: [1](https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/TO/matrices-adaptive-csr/src/TNL/Algorithms/Segments/Kernels/CSRVectorKernel.hpp#L57-61)
Obviously we don't have any tests for this feature. But do we have some benchmark which proves that this optimization helps in some cases?Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/90Refactor contains and containsOnlyValue2021-08-02T12:51:12ZJakub KlinkovskýRefactor contains and containsOnlyValue- `contains` should be changed to `find` (c.f. [std::find](https://en.cppreference.com/w/cpp/algorithm/find))
- `containsOnlyValue` should be generalized to have similar interface like `std::all_of`, `std::any_of`, `std::none_of`: https:...- `contains` should be changed to `find` (c.f. [std::find](https://en.cppreference.com/w/cpp/algorithm/find))
- `containsOnlyValue` should be generalized to have similar interface like `std::all_of`, `std::any_of`, `std::none_of`: https://en.cppreference.com/w/cpp/algorithm/all_any_none_of
- maybe we should add `operator==` for comparing an array/vector with a scalar/ValueTypehttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/89Sorting TODO2021-07-19T07:44:19ZTomáš OberhuberSorting TODOTODO for Quicksort:
- [ ] refactoring the code of implementation
- [ ] there is a fixed type `int` instead of `Index`
- [ ] I have splitted the code between `Quicksort` and `Quicksorter` because Quicksorter cannot have static metod ...TODO for Quicksort:
- [ ] refactoring the code of implementation
- [ ] there is a fixed type `int` instead of `Index`
- [ ] I have splitted the code between `Quicksort` and `Quicksorter` because Quicksorter cannot have static metod `sort` - `Value` and `Device` must be types of the class not the method `sort`. If we can refactor `Quicksorter` so that it is easier to use, we can merge `Quicksort` and `Quicksorter` togther.
- [ ] `TNL/Algorithms/Sorting/details` contains several files with helper functions and kernels for Quicksort like `quicksort_kernel.h`, `quicksort_1Block.h`, `reduction.h` etc. We should check them for duplicities and rename them or merge them.
- [ ] implementation for devices `Sequential` () and `Host` ( or even `Rocm` )
TODO for bitonic sort:
- [ ] refactoring
- [ ] port for Rocm
General TODO:
- [ ] we do not have inplace sort that could be used with lambda functions for `Host`
- [ ] refactoring and extension of unit tests
- [ ] fetch CUDA samples from git repo - https://github.com/NVIDIA/cuda-samples - instead of relying on local installationhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/88SegmentsPrinter::print does not work on GPU2021-06-06T09:12:52ZTomáš OberhuberSegmentsPrinter::print does not work on GPUThe lambda function `fetch` in `SegmentsPrinter::print` causes CUDA kernel crash when it is called (`SegmentsPrinting.h:76`). It is not handled properly probably by the `SegmentsPrinter`. The same lambda function works well in function `...The lambda function `fetch` in `SegmentsPrinter::print` causes CUDA kernel crash when it is called (`SegmentsPrinting.h:76`). It is not handled properly probably by the `SegmentsPrinter`. The same lambda function works well in function `printSegments` (`SegmentsPrinting.h:121`). This can be tested for example using `Examples/Algorithms/Segments/SegmentsExample_General.cu` by replacing (line 39)
```
printSegments( segments, fetch, std::cout )
```
with
```
std::cout << segments.print( fetch ) << std::endl;
```Tomáš OberhuberTomáš Oberhuberhttps://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/85Assignment of symmetric and general sparse matrices does not work2021-02-04T21:26:42ZTomáš OberhuberAssignment of symmetric and general sparse matrices does not workOnly lower part and diagonal of the symmetric matrix is assigned to the general one.Only lower part and diagonal of the symmetric matrix is assigned to the general one.Tomáš OberhuberTomáš Oberhuberhttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/84Assertions for correct definitions of lambda functions2021-02-04T21:27:49ZTomáš OberhuberAssertions for correct definitions of lambda functionsBased on the following concept
https://en.cppreference.com/w/cpp/types/is_invocable (C++-17)
https://www.boost.org/doc/libs/develop/libs/callable_traits/doc/html/callable_traits/reference.html#callable_traits.reference.ref_is_invocabl...Based on the following concept
https://en.cppreference.com/w/cpp/types/is_invocable (C++-17)
https://www.boost.org/doc/libs/develop/libs/callable_traits/doc/html/callable_traits/reference.html#callable_traits.reference.ref_is_invocable (boost in C++-11)
methods accepting lambda fucntions should check them by static_assert if they have correct definition of parameters.Tomáš OberhuberTomáš Oberhuberhttps://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/82VectorOfStaticVectorsTestCuda: unspecified launch failure in the CUDA reducti...2020-10-31T11:17:20ZJakub KlinkovskýVectorOfStaticVectorsTestCuda: unspecified launch failure in the CUDA reduction kernel with StaticVector valuesThere are compiler warnings like
```
[292/351] Building NVCC (Device) object src/UnitTests/Containers/CMakeFiles/VectorOfStaticVectorsTestCuda.dir/VectorOfStaticVectorsTestCuda_generated_VectorOfStaticVectorsTestCuda.cu.o
/tmp/rexe_klink...There are compiler warnings like
```
[292/351] Building NVCC (Device) object src/UnitTests/Containers/CMakeFiles/VectorOfStaticVectorsTestCuda.dir/VectorOfStaticVectorsTestCuda_generated_VectorOfStaticVectorsTestCuda.cu.o
/tmp/rexe_klinkovsky/tnl/src/TNL/Algorithms/CudaReductionKernel.h(60): warning #3126-D: calling a __host__ function from a __host__ __device__ function is not allowed
detected during:
instantiation of "auto TNL::Algorithms::CudaReductionFunctorWrapper(Reduction &&, Arg1 &&, Arg2 &&) [with Reduction=const std::plus<void> &, Arg1=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>> &, Arg2=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>]"
(95): here
instantiation of "void TNL::Algorithms::CudaReductionKernel<blockSize,Result,DataFetcher,Reduction,Index>(Result, DataFetcher, Reduction, Index, Index, Result *) [with blockSize=256, Result=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, DataFetcher=lambda [](int)->TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, Reduction=std::plus<void>, Index=int]"
(512): here
instantiation of "int TNL::Algorithms::CudaReductionKernelLauncher<Index, Result>::launch(Index, Index, const Reduction &, DataFetcher &, const Result &, Result *) [with Index=int, Result=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, DataFetcher=lambda [](int)->TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, Reduction=std::plus<void>]"
(378): here
instantiation of "Result TNL::Algorithms::CudaReductionKernelLauncher<Index, Result>::finish(const Reduction &, const Result &) [with Index=int, Result=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, Reduction=std::plus<void>]"
/tmp/rexe_klinkovsky/tnl/src/TNL/Algorithms/Reduction.hpp(368): here
instantiation of "Result TNL::Algorithms::Reduction<TNL::Devices::Cuda>::reduce(Index, Index, const ReductionOperation &, DataFetcher &, const Result &) [with Index=int, Result=TNL::Containers::Expressions::RemoveET<std::decay_t<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>, TNL::Containers::Expressions::Addition, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>>>, ReductionOperation=std::plus<void>, DataFetcher=lambda [](IndexType)->TNL::Containers::Expressions::StaticBinaryExpressionTemplate<TNL::Containers::StaticVector<3, int>, TNL::Containers::StaticVector<3, short>, TNL::Containers::Expressions::Multiplication, TNL::Containers::Expressions::VectorExpressionVariable, TNL::Containers::Expressions::VectorExpressionVariable>]"
/tmp/rexe_klinkovsky/tnl/src/TNL/Containers/Expressions/VerticalOperations.h(122): here
[ 7 instantiation contexts not shown ]
implicit generation of "testing::internal::TestFactoryImpl<TestClass>::~TestFactoryImpl() [with TestClass=binary_tests::VectorBinaryOperationsTest_scalarProduct_Test<binary_tests::Pair<TNL::Containers::Vector<TNL::Containers::StaticVector<3, int>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, int>>>, TNL::Containers::Vector<TNL::Containers::StaticVector<3, short>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, short>>>>>]"
/tmp/rexe_klinkovsky/tnl/Release/googletest-src/googletest/include/gtest/internal/gtest-internal.h(742): here
instantiation of class "testing::internal::TestFactoryImpl<TestClass> [with TestClass=binary_tests::VectorBinaryOperationsTest_scalarProduct_Test<binary_tests::Pair<TNL::Containers::Vector<TNL::Containers::StaticVector<3, int>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, int>>>, TNL::Containers::Vector<TNL::Containers::StaticVector<3, short>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, short>>>>>]"
/tmp/rexe_klinkovsky/tnl/Release/googletest-src/googletest/include/gtest/internal/gtest-internal.h(742): here
implicit generation of "testing::internal::TestFactoryImpl<TestClass>::TestFactoryImpl() [with TestClass=binary_tests::VectorBinaryOperationsTest_scalarProduct_Test<binary_tests::Pair<TNL::Containers::Vector<TNL::Containers::StaticVector<3, int>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, int>>>, TNL::Containers::Vector<TNL::Containers::StaticVector<3, short>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, short>>>>>]"
/tmp/rexe_klinkovsky/tnl/Release/googletest-src/googletest/include/gtest/internal/gtest-internal.h(742): here
instantiation of class "testing::internal::TestFactoryImpl<TestClass> [with TestClass=binary_tests::VectorBinaryOperationsTest_scalarProduct_Test<binary_tests::Pair<TNL::Containers::Vector<TNL::Containers::StaticVector<3, int>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, int>>>, TNL::Containers::Vector<TNL::Containers::StaticVector<3, short>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, short>>>>>]"
/tmp/rexe_klinkovsky/tnl/Release/googletest-src/googletest/include/gtest/internal/gtest-internal.h(742): here
instantiation of "__nv_bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char *, const testing::internal::CodeLocation &, const char *, const char *, int, const std::vector<std::string, std::allocator<std::string>> &) [with Fixture=binary_tests::VectorBinaryOperationsTest, TestSel=testing::internal::TemplateSel<binary_tests::VectorBinaryOperationsTest_scalarProduct_Test>, Types=binary_tests::gtest_type_params_VectorBinaryOperationsTest_]"
/tmp/rexe_klinkovsky/tnl/src/UnitTests/Containers/VectorBinaryOperationsTest.h(618): here
```
And when the test is executed, it fails with
```
1/95 Test #32: VectorOfStaticVectorsTestCuda .................Child aborted***Exception: 4.78 sec
[==========] Running 130 tests from 8 test suites.
[----------] Global test environment set-up.
[----------] 19 tests from VectorBinaryOperationsTest/0, where TypeParam = binary_tests::Pair<TNL::Containers::Vector<TNL::Containers::StaticVector<3, int>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, int> > >, TNL::Containers::Vector<TNL::Containers::StaticVector<3, short>, TNL::Devices::Cuda, int, TNL::Allocators::Cuda<TNL::Containers::StaticVector<3, short> > > >
[ RUN ] VectorBinaryOperationsTest/0.EQ
[ OK ] VectorBinaryOperationsTest/0.EQ (4029 ms)
[ RUN ] VectorBinaryOperationsTest/0.NE
[ OK ] VectorBinaryOperationsTest/0.NE (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.LT
[ OK ] VectorBinaryOperationsTest/0.LT (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.GT
[ OK ] VectorBinaryOperationsTest/0.GT (1 ms)
[ RUN ] VectorBinaryOperationsTest/0.LE
[ OK ] VectorBinaryOperationsTest/0.LE (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.GE
[ OK ] VectorBinaryOperationsTest/0.GE (1 ms)
[ RUN ] VectorBinaryOperationsTest/0.addition
[ OK ] VectorBinaryOperationsTest/0.addition (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.subtraction
[ OK ] VectorBinaryOperationsTest/0.subtraction (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.multiplication
[ OK ] VectorBinaryOperationsTest/0.multiplication (1 ms)
[ RUN ] VectorBinaryOperationsTest/0.division
[ OK ] VectorBinaryOperationsTest/0.division (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.assignment
[ OK ] VectorBinaryOperationsTest/0.assignment (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.add_assignment
[ OK ] VectorBinaryOperationsTest/0.add_assignment (1 ms)
[ RUN ] VectorBinaryOperationsTest/0.subtract_assignment
[ OK ] VectorBinaryOperationsTest/0.subtract_assignment (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.multiply_assignment
[ OK ] VectorBinaryOperationsTest/0.multiply_assignment (1 ms)
[ RUN ] VectorBinaryOperationsTest/0.divide_assignment
[ OK ] VectorBinaryOperationsTest/0.divide_assignment (0 ms)
[ RUN ] VectorBinaryOperationsTest/0.scalarProduct
terminate called after throwing an instance of 'TNL::Exceptions::CudaRuntimeError'
what(): CUDA ERROR 719 (cudaErrorLaunchFailure): unspecified launch failure.
Source: line 81 in /tmp/rexe_klinkovsky/tnl/src/TNL/Allocators/Cuda.h: unspecified launch failure
```Jakub KlinkovskýJakub Klinkovský