llnl / llnl/axom

Improve SLIC macros when axom is configured with CUDA

Open
#178 2 comments 0 reactions 1 assignee Claimed by @bmhan12 View on GitHub
GPU Slic Testing TPL
Dominant language
C++
Stars
196
Forks
34
Avg merge
4d 1h
Merged PRs (30d)
11

Description

A recent PR (https://github.com/LLNL/axom/pull/156) adds preliminary support for ``slic`` macros when ``axom`` is configured with ``cuda`` support.

Specifically, it converts all calls to ``SLIC_ASSERT*`` and ``SLIC_CHECK*`` to a CUDA ``assert``, and drops the message.

There are several improvements/upgrades that we should consider adding in the near future:
- [ ] Unit tests that specifically test the ``slic`` macros in different spaces (host vs. device) and configurations (e.g. raja, cuda, openmp, ...)
- [ ] CUDA assert should only be called on devices that support this.
See: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#assertion
- [ ] ``SLIC_CHECK`` should respect the ``axom::slic::debug::checksAreErrors`` flag
- [ ] Support should be added for ``SLIC_ERROR*``. This should respect the ``slic::isAbortOnErrorsEnabled()`` flag
- [ ] Support should be added for ``SLIC_WARNING*``. This should respect the ``slic::isAbortOnWarningsEnabled()`` flag
- [ ] We should consider how we can support the ``*_MSG`` variants of the ``slic`` macros. E.g. perhaps we cannot support the full ``ostream`` operator within these messsages, but we might be able to support a simpler ``printf``-style output
- [ ] We should consider if/how we can support simple message output (e.g. via ``SLIC_INFO``) within kernels. One idea would be to just ``printf`` the message. The team has discussed another idea brought up by a user to have errors trigger predefined message (currently tracked by JIRA issue ATK-1299).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.