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
109#elif DFTFE_WITH_DEVICE_LANG_SYCL
113#define MPICHECK(cmd) \
116 dftfe::Int e = cmd; \
117 if (e != MPI_SUCCESS) \
119 printf("Failed: MPI error %s:%d '%d'\n", __FILE__, __LINE__, e); \
120 exit(EXIT_FAILURE); \
std::domain_error DomainError
Definition Exceptions.h:130
void throwException(bool condition, std::string msg="")
std::overflow_error OverflowError
Definition Exceptions.h:134
std::underflow_error UnderflowError
Definition Exceptions.h:135
std::invalid_argument InvalidArgument
Definition Exceptions.h:129
std::length_error LengthError
Definition Exceptions.h:131
std::logic_error LogicError
Definition Exceptions.h:128
std::runtime_error RuntimeError
Definition Exceptions.h:133
std::out_of_range OutOfRangeError
Definition Exceptions.h:132
Definition pseudoPotentialToDftfeConverter.cc:34