tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2018-09-04T14:28:02Zhttps://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/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/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/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/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/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/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/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/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/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/27Fix getType for all matrix formats to print in a consistent form2019-03-05T19:12:56ZLukáš Matthew ČejkaFix getType for all matrix formats to print in a consistent form`getType()` is **inconsistent** across different matrix formats.
For example:
* **CSR** `getType()` gives: `Matrices::CSR< double, Devices::Host >`
* **Ellpack** `getType()` gives: `Matrices::Ellpack< double, Devices::Host, int >`
* ...`getType()` is **inconsistent** across different matrix formats.
For example:
* **CSR** `getType()` gives: `Matrices::CSR< double, Devices::Host >`
* **Ellpack** `getType()` gives: `Matrices::Ellpack< double, Devices::Host, int >`
* **Sliced Ellpack** `getType()` gives: `Matrices::SlicedEllpack< double, Devices::Host >`
Is the correct form
`Matrices::FORMAT_NAME< RealType, Devices::DEVICE_TYPE, IndexType >` ?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/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áš Oberhuberhttps://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/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/29Exceptions should be caught by reference2019-04-19T10:14:16ZJakub KlinkovskýExceptions should be caught by referenceAll exceptions should be caught by reference, not by value. Bug in https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/commit/5fb2f09ff3baf7ea433a586e779a5abd731a9320:
```
In file included from ../src/Tools/tnl-diff.cpp:11:
../src/Tools/t...All exceptions should be caught by reference, not by value. Bug in https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/commit/5fb2f09ff3baf7ea433a586e779a5abd731a9320:
```
In file included from ../src/Tools/tnl-diff.cpp:11:
../src/Tools/tnl-diff.h: In instantiation of ‘bool processFiles(const TNL::Config::ParameterContainer&) [with Mesh = TNL::Meshes::Grid<1, float, TNL::Devices::{anonymous}::Host, int>]’:
../src/Tools/tnl-diff.h:653:75: required from ‘bool resolveGridIndexType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1; Real = float]’
../src/Tools/tnl-diff.h:665:48: required from ‘bool resolveGridRealType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1]’
../src/Tools/tnl-diff.cpp:70:69: required from here
../src/Tools/tnl-diff.h:630:4: warning: catching polymorphic type ‘class std::ios_base::failure’ by value [-Wcatch-value=]
catch( std::ios_base::failure exception )
^~~~~
../src/Tools/tnl-diff.h: In instantiation of ‘bool processFiles(const TNL::Config::ParameterContainer&) [with Mesh = TNL::Meshes::Grid<1, float, TNL::Devices::{anonymous}::Host, long int>]’:
../src/Tools/tnl-diff.h:655:80: required from ‘bool resolveGridIndexType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1; Real = float]’
../src/Tools/tnl-diff.h:665:48: required from ‘bool resolveGridRealType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1]’
../src/Tools/tnl-diff.cpp:70:69: required from here
../src/Tools/tnl-diff.h:630:4: warning: catching polymorphic type ‘class std::ios_base::failure’ by value [-Wcatch-value=]
../src/Tools/tnl-diff.h: In instantiation of ‘bool processFiles(const TNL::Config::ParameterContainer&) [with Mesh = TNL::Meshes::Grid<1, double, TNL::Devices::{anonymous}::Host, int>]’:
../src/Tools/tnl-diff.h:653:75: required from ‘bool resolveGridIndexType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1; Real = double]’
../src/Tools/tnl-diff.h:667:49: required from ‘bool resolveGridRealType(const std::vector<TNL::String>&, const TNL::Config::ParameterContainer&) [with int Dim = 1]’
../src/Tools/tnl-diff.cpp:70:69: required from here
```
Other places should be checked and revised as well.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/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áš Oberhuber