Skip to content

Commit

Permalink
Merge pull request #1431 from LLNL/bugfix/han12/slic_rank_info
Browse files Browse the repository at this point in the history
Add unit testing for Slic ranks and rank counts
  • Loading branch information
bmhan12 authored Oct 7, 2024
2 parents 7a295f3 + 34a2444 commit e5dcbaa
Show file tree
Hide file tree
Showing 5 changed files with 561 additions and 108 deletions.
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/

### Fixed
- Added a guard for sidre-related mint API usage in a quest example
- Removed `std::ends` usage from `SLIC_ASSERT`,`SLIC_ASSERT_MSG`,`SLIC_CHECK`,
and `SLIC_CHECK_MSG` macros that prevented Lumberjack from combining
messages.


## [Version 0.10.0] - Release date 2024-09-27
Expand Down
5 changes: 5 additions & 0 deletions src/axom/core/utilities/FileUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ void getDirName(std::string& dir, const std::string& path);
* \param filename The name of the file.
* \return 0 on success, -1 on failure. errno can obtain more information
* about the failure.
*
* \note On Windows, this function calls _unlink() and will fail if there are
* any open file handles to the specified file.
* On Linux, this function calls unlink() and will succeed even if
* there are open file handles to the specified file.
*/
int removeFile(const std::string& filename);

Expand Down
78 changes: 39 additions & 39 deletions src/axom/slic/interface/slic_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Assert: " << #EXP << std::ends; \
__oss << "Failed Assert: " << #EXP; \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnErrorsEnabled()) \
{ \
Expand All @@ -365,19 +365,19 @@
* \endcode
*
*/
#define SLIC_ASSERT_MSG(EXP, msg) \
do \
{ \
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Assert: " << #EXP << std::endl << msg << std::ends; \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnErrorsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
#define SLIC_ASSERT_MSG(EXP, msg) \
do \
{ \
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Assert: " << #EXP << std::endl << msg; \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnErrorsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
} while(axom::slic::detail::false_value)

///@}
Expand Down Expand Up @@ -427,7 +427,7 @@
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Check: " << #EXP << std::ends; \
__oss << "Failed Check: " << #EXP; \
if(axom::slic::debug::checksAreErrors) \
{ \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
Expand Down Expand Up @@ -463,30 +463,30 @@
* \endcode
*
*/
#define SLIC_CHECK_MSG(EXP, msg) \
do \
{ \
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Check: " << #EXP << std::endl << msg << std::ends; \
if(axom::slic::debug::checksAreErrors) \
{ \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnErrorsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
else \
{ \
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnWarningsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
} \
#define SLIC_CHECK_MSG(EXP, msg) \
do \
{ \
if(!(EXP)) \
{ \
std::ostringstream __oss; \
__oss << "Failed Check: " << #EXP << std::endl << msg; \
if(axom::slic::debug::checksAreErrors) \
{ \
axom::slic::logErrorMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnErrorsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
else \
{ \
axom::slic::logWarningMessage(__oss.str(), __FILE__, __LINE__); \
if(axom::slic::isAbortOnWarningsEnabled()) \
{ \
axom::slic::abort(); \
} \
} \
} \
} while(axom::slic::detail::false_value)

/// @}
Expand Down
Loading

0 comments on commit e5dcbaa

Please sign in to comment.