tnl-dev issueshttps://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues2020-07-10T13:05:46Zhttps://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áš Jakubechttps://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/56computeCompressedRowLengthsFromMtxFile( ... ) doesn't take account symmetric ...2021-04-13T19:25:53ZMatouš FenclcomputeCompressedRowLengthsFromMtxFile( ... ) doesn't take account symmetric formatFunction computeCompressedRowLengthsFromMtxFile( .. ) doesn't take account symmetric format in matrixReader.h. Computed rowLenghts are too big for ellpackSymmetric.
example:<pre>
/ 1 1 1 1 1 \
| 1 0 0 0 0 |
| 1 0 0 0 0 |
| 1 0 0 0 ...Function computeCompressedRowLengthsFromMtxFile( .. ) doesn't take account symmetric format in matrixReader.h. Computed rowLenghts are too big for ellpackSymmetric.
example:<pre>
/ 1 1 1 1 1 \
| 1 0 0 0 0 |
| 1 0 0 0 0 |
| 1 0 0 0 0 |
\ 1 0 0 0 0 /
</pre>
non-symmetric rowLenghts = 5;
symmetric rowLenghts = 1;
Function should compute only under-diagonal rowLenghts.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/53Bug in analytic functions2019-11-07T13:28:16ZMatouš FenclBug in analytic functionsAnalytic functions as input MeshFunction in Hamilton-Jacobi solver with MPI on GPU give bad values.
Generated function from *tnl-init* is passed into *tnl-direct-eikonal-solver*. TNL devides input MeshFunction into blocks, which number...Analytic functions as input MeshFunction in Hamilton-Jacobi solver with MPI on GPU give bad values.
Generated function from *tnl-init* is passed into *tnl-direct-eikonal-solver*. TNL devides input MeshFunction into blocks, which number depends on number of processes. Devided MeshFunction that we get in file *tnlDirectEikonalProblem_impl.h* in function *Solve()* has invalid values.
Starting script is attached.
[tnl-run-dir-eik-solver](/uploads/f3a60b9e323f9bbecedbf3f23f3f1f9e/tnl-run-dir-eik-solver)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/51Wrappers for STL compatibility2021-04-13T19:30:42ZTomáš OberhuberWrappers for STL compatibilityMake wrappers for easier porting of STL code to TNL. It means, for example, wrapper for TNL::Array which has the same methods as STL vector and so on.Make wrappers for easier porting of STL code to TNL. It means, for example, wrapper for TNL::Array which has the same methods as STL vector and so on.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/45Parallelize segmented prefix-sum with OpenMP2019-08-14T20:39:50ZJakub KlinkovskýParallelize segmented prefix-sum with OpenMPThe implementation of segmented prefix-sum for `Host` is only sequential.The implementation of segmented prefix-sum for `Host` is only sequential.https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/issues/44Extended NDArray operations2021-11-23T19:08:29ZJakub KlinkovskýExtended NDArray operationsAfter !18 the following things remain to be implemented:
## Features
- [ ] implement generic assignment operator
- [x] support any value, device and index types
- [ ] support any permutation
- [ ] support copies to and from...After !18 the following things remain to be implemented:
## Features
- [ ] implement generic assignment operator
- [x] support any value, device and index types
- [ ] support any permutation
- [ ] support copies to and from non-contiguous memory (e.g. subarrays)
- [x] add support for different allocators (c.f. `Array` implementation)
## Applications
- [ ] storage for `VectorField` in TNL
- [ ] subarrays: writing 1D and 2D slices into VTK
## Operations
- [ ] `reduce_along_axis`, `reduce_along_axes` - generalized multireductions - see also https://bitbucket.org/eigen/eigen/src/default/unsupported/Eigen/CXX11/src/Tensor/README.md?at=default&fileviewer=file-view-default#markdown-header-reduction-operations
- [ ] `apply_along_axis` - apply a function to all 1D slices along given axis (challenge: parallelization of outer or inner function)
- Note that unlike [numpy.apply_along_axis](https://docs.scipy.org/doc/numpy/reference/generated/numpy.apply_along_axis.html), the inner function cannot change the array dimension/shape.
- Note that the similar NumPy function, [apply_over_axes](https://docs.scipy.org/doc/numpy/reference/generated/numpy.apply_over_axes.html), is not applicable to NDArray because the slices along different axes have different type so a single function cannot be applied to them. Also, even in NumPy it is interesting only with the change of dimension/shape.
- [ ] reordering of ND arrays along any axis (currently hardcoded in `tnl-mhfem` only for one specific layout of dofs)
- [ ] other [NumPy array manipulation routines](https://docs.scipy.org/doc/numpy/reference/routines.array-manipulation.html) - logical re-shaping and transpose-like operations (i.e. return a view with different sizes or permutation of axes without changing the data)
- [ ] [Eigen geometrical operations on tensors](https://bitbucket.org/eigen/eigen/src/default/unsupported/Eigen/CXX11/src/Tensor/README.md?at=default&fileviewer=file-view-default#markdown-header-geometrical-operations)
## Benchmarks
- [ ] compilation time depending on the number of dimensions, number of ndarrays in code, ...
- [ ] overhead of the indexing calculation for high-dimensional array
- [ ] operations
- [ ] comparison with [RAJA](https://github.com/LLNL/RAJA)
identity perm, set: 1D bandwidth: 9.4718 GB/s, 6D bandwidth: 8.52481 GB/s (9% difference)
identity perm, assign: 1D bandwidth: 11.503 GB/s, 6D bandwidth: 11.0063 GB/s (4.5% loss compared to 1D)
reverse perm, assign: 6D bandwidth: 9.58735 GB/s (13% loss compared to identity 6D)
- [ ] comparison with OpenFOAM - `ScalarField`, `VectorField`, `TensorField`, operations like tensor*vector (locally on mesh cells)Jakub 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ý