20#ifndef dftfeExceptions_h
21#define dftfeExceptions_h
82#undef DFTFE_AssertWithMsg
84#if defined(DFTFE_DISABLE_ASSERT) || \
85 (!defined(DFTFE_ENABLE_ASSERT) && defined(NDEBUG))
87# define DFTFE_Assert(expr) ((void)0)
88# define DFTFE_AssertWithMsg(expr, msg) ((void)0)
90#elif defined(DFTFE_ENABLE_ASSERT) && defined(NDEBUG)
95# define DFTFE_Assert(expr) assert(expr)
96# define DFTFE_AssertWithMsg(expr, msg) assert((expr) && (msg))
100# define DFTFE_Assert(expr) assert(expr)
101# define DFTFE_AssertWithMsg(expr, msg) assert((expr) && (msg))
105#ifdef DFTFE_WITH_DEVICE_LANG_CUDA
107#elif DFTFE_WITH_DEVICE_LANG_HIP
111#define MPICHECK(cmd) \
115 if (e != MPI_SUCCESS) \
117 printf("Failed: MPI error %s:%d '%d'\n", __FILE__, __LINE__, e); \
118 exit(EXIT_FAILURE); \
std::domain_error DomainError
Definition Exceptions.h:129
void throwException(bool condition, std::string msg="")
std::overflow_error OverflowError
Definition Exceptions.h:133
std::underflow_error UnderflowError
Definition Exceptions.h:134
std::invalid_argument InvalidArgument
Definition Exceptions.h:128
std::length_error LengthError
Definition Exceptions.h:130
std::logic_error LogicError
Definition Exceptions.h:127
std::runtime_error RuntimeError
Definition Exceptions.h:132
std::out_of_range OutOfRangeError
Definition Exceptions.h:131
Definition pseudoPotentialToDftfeConverter.cc:34