|
#define | _GNU_SOURCE |
|
#define | _sc_const const |
| Portable way to work with really old compilers without const.
|
|
#define | _sc_restrict restrict |
| Portable way to work with really old compilers without restrict.
|
|
#define | SC_CALC_VERSION(major, minor, patchlevel) (((major) * 1000 + (minor)) * 1000 + (patchlevel)) |
| Test for gcc version without features.h.
|
|
#define | SC_GCC_VERSION SC_CALC_VERSION (0, 0, 0) |
| Assemble GCC version using a 1000-per-digit scheme.
|
|
#define | SC_NOCOUNT_MALLOC |
|
#define | SC_NOCOUNT_REFCOUNT |
|
#define | SC_NOCOUNT_LOGINDENT |
|
#define | __STDC_LIMIT_MACROS |
| Activate C99 limit macros for older C++ compilers.
|
|
#define | __STDC_CONSTANT_MACROS |
| Activate C99 constant macros for older C++ compilers.
|
|
#define | _USE_MATH_DEFINES |
|
#define | M_E 2.71828182845904523536 |
|
#define | M_LOG2E 1.44269504088896340736 |
|
#define | M_LOG10E 0.434294481903251827651 |
|
#define | M_LN2 0.693147180559945309417 |
|
#define | M_LN10 2.30258509299404568402 |
|
#define | M_PI 3.14159265358979323846 |
|
#define | M_PI_2 1.57079632679489661923 |
|
#define | M_PI_4 0.785398163397448309616 |
|
#define | M_1_PI 0.318309886183790671538 |
|
#define | M_2_PI 0.636619772367581343076 |
|
#define | M_2_SQRTPI 1.12837916709551257390 |
|
#define | M_SQRT2 1.41421356237309504880 |
|
#define | M_SQRT1_2 0.707106781186547524401 |
|
#define | SC_INIT_COMM_CLEAN |
| Indicate that we do not modify the communicator in sc_init.
|
|
#define | SC_NOARGS |
| For compatibility of varargs with C++.
|
|
#define | SC_EPS 2.220446049250313e-16 |
| Define machine epsilon for the double type.
|
|
#define | SC_1000_EPS (1000. * 2.220446049250313e-16) |
| Define 1000 times the machine epsilon for the double type.
|
|
#define | SC_NOOP() ((void) (0)) |
| A macro to do and return nothing as an expression.
|
|
#define | SC_ABORT(s) sc_abort_verbose (__FILE__, __LINE__, (s)) |
|
#define | SC_ABORT_NOT_REACHED() SC_ABORT ("Unreachable code") |
|
#define | SC_CHECK_ABORT(q, s) ((q) ? (void) 0 : SC_ABORT (s)) |
|
#define | SC_CHECK_MPI(r) SC_CHECK_ABORT ((r) == sc_MPI_SUCCESS, "MPI error") |
|
#define | SC_ABORTF(fmt, ...) sc_abort_verbosef (__FILE__, __LINE__, (fmt), __VA_ARGS__) |
|
#define | SC_CHECK_ABORTF(q, fmt, ...) ((q) ? (void) 0 : SC_ABORTF (fmt, __VA_ARGS__)) |
|
#define | SC_ABORT1(fmt, a) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a)) |
|
#define | SC_ABORT2(fmt, a, b) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a), (b)) |
|
#define | SC_ABORT3(fmt, a, b, c) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a), (b), (c)) |
|
#define | SC_ABORT4(fmt, a, b, c, d) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a), (b), (c), (d)) |
|
#define | SC_ABORT5(fmt, a, b, c, d, e) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a), (b), (c), (d), (e)) |
|
#define | SC_ABORT6(fmt, a, b, c, d, e, f) sc_abort_verbosef (__FILE__, __LINE__, (fmt), (a), (b), (c), (d), (e), (f)) |
|
#define | SC_CHECK_ABORT1(q, fmt, a) ((q) ? (void) 0 : SC_ABORT1 ((fmt), (a))) |
|
#define | SC_CHECK_ABORT2(q, fmt, a, b) ((q) ? (void) 0 : SC_ABORT2 ((fmt), (a), (b))) |
|
#define | SC_CHECK_ABORT3(q, fmt, a, b, c) ((q) ? (void) 0 : SC_ABORT3 ((fmt), (a), (b), (c))) |
|
#define | SC_CHECK_ABORT4(q, fmt, a, b, c, d) ((q) ? (void) 0 : SC_ABORT4 ((fmt), (a), (b), (c), (d))) |
|
#define | SC_CHECK_ABORT5(q, fmt, a, b, c, d, e) ((q) ? (void) 0 : SC_ABORT5 ((fmt), (a), (b), (c), (d), (e))) |
|
#define | SC_CHECK_ABORT6(q, fmt, a, b, c, d, e, f) ((q) ? (void) 0 : SC_ABORT6 ((fmt), (a), (b), (c), (d), (e), (f))) |
|
#define | SC_ASSERT(c) SC_NOOP () |
|
#define | SC_EXECUTE_ASSERT_FALSE(expression) do { (void) (expression); } while (0) |
|
#define | SC_EXECUTE_ASSERT_TRUE(expression) do { (void) (expression); } while (0) |
|
#define | SC_ALLOC(t, n) (t *) sc_malloc (sc_package_id, (n) * sizeof(t)) |
|
#define | SC_ALLOC_ZERO(t, n) |
|
#define | SC_REALLOC(p, t, n) |
|
#define | SC_STRDUP(s) sc_strdup (sc_package_id, (s)) |
|
#define | SC_FREE(p) sc_free (sc_package_id, (p)) |
|
#define | SC_ALIGN_UP(x, n) ( ((n) <= 0) ? (x) : ((x) + (n) - 1) / (n) * (n) ) |
|
#define | SC_ARG_ALIGN(p, t, n) SC_NOOP () |
|
#define | SC_ATTR_ALIGN(n) |
|
#define | SC_BZERO(p, n) ((void) memset ((p), 0, (n) * sizeof (*(p)))) |
| Sets n elements of a memory range to zero. More...
|
|
#define | SC_MIN(a, b) (((a) < (b)) ? (a) : (b)) |
|
#define | SC_MAX(a, b) (((a) > (b)) ? (a) : (b)) |
|
#define | SC_SQR(a) ((a) * (a)) |
|
#define | SC_LOG2_8(x) (sc_log2_lookup_table[(x)]) |
|
#define | SC_LOG2_16(x) |
|
#define | SC_LOG2_32(x) |
|
#define | SC_LOG2_64(x) |
|
#define | SC_ROUNDUP2_32(x) (((x) <= 0) ? 0 : (1 << (SC_LOG2_32 ((x) - 1) + 1))) |
|
#define | SC_ROUNDUP2_64(x) (((x) <= 0) ? 0 : (1LL << (SC_LOG2_64 ((x) - 1LL) + 1))) |
|
#define | SC_LC_GLOBAL 1 |
| log only for master process
|
|
#define | SC_LC_NORMAL 2 |
| log for every process
|
|
#define | SC_LP_DEFAULT (-1) |
| Selects the SC default threshold.
|
|
#define | SC_LP_ALWAYS 0 |
| Log absolutely everything.
|
|
#define | SC_LP_TRACE 1 |
| Prefix file and line number.
|
|
#define | SC_LP_DEBUG 2 |
| Any information on the internal state.
|
|
#define | SC_LP_VERBOSE 3 |
| Information on conditions, decisions.
|
|
#define | SC_LP_INFO 4 |
| Most relevant things a function is doing.
|
|
#define | SC_LP_STATISTICS 5 |
| Important for consistency/performance.
|
|
#define | SC_LP_PRODUCTION 6 |
| A few lines at most for a major api function.
|
|
#define | SC_LP_ESSENTIAL 7 |
| Log a few lines max per program.
|
|
#define | SC_LP_ERROR 8 |
| Log errors only. More...
|
|
#define | SC_LP_SILENT 9 |
| Never log anything. More...
|
|
#define | SC_LP_THRESHOLD SC_LP_INFO |
| The log priority for the sc package.
|
|
#define | SC_GEN_LOG(package, category, priority, s) |
|
#define | SC_GLOBAL_LOG(p, s) SC_GEN_LOG (sc_package_id, SC_LC_GLOBAL, (p), (s)) |
|
#define | SC_LOG(p, s) SC_GEN_LOG (sc_package_id, SC_LC_NORMAL, (p), (s)) |
|
#define | SC_GEN_LOGF(package, category, priority, fmt, ...) |
|
#define | SC_GLOBAL_LOGF(p, fmt, ...) SC_GEN_LOGF (sc_package_id, SC_LC_GLOBAL, (p), (fmt), __VA_ARGS__) |
|
#define | SC_LOGF(p, fmt, ...) SC_GEN_LOGF (sc_package_id, SC_LC_NORMAL, (p), (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_TRACE(s) SC_GLOBAL_LOG (SC_LP_TRACE, (s)) |
|
#define | SC_GLOBAL_LDEBUG(s) SC_GLOBAL_LOG (SC_LP_DEBUG, (s)) |
|
#define | SC_GLOBAL_VERBOSE(s) SC_GLOBAL_LOG (SC_LP_VERBOSE, (s)) |
|
#define | SC_GLOBAL_INFO(s) SC_GLOBAL_LOG (SC_LP_INFO, (s)) |
|
#define | SC_GLOBAL_STATISTICS(s) SC_GLOBAL_LOG (SC_LP_STATISTICS, (s)) |
|
#define | SC_GLOBAL_PRODUCTION(s) SC_GLOBAL_LOG (SC_LP_PRODUCTION, (s)) |
|
#define | SC_GLOBAL_ESSENTIAL(s) SC_GLOBAL_LOG (SC_LP_ESSENTIAL, (s)) |
|
#define | SC_GLOBAL_LERROR(s) SC_GLOBAL_LOG (SC_LP_ERROR, (s)) |
|
#define | SC_GLOBAL_TRACEF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_TRACE, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_LDEBUGF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_DEBUG, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_VERBOSEF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_VERBOSE, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_INFOF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_INFO, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_STATISTICSF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_STATISTICS, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_PRODUCTIONF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_PRODUCTION, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_ESSENTIALF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_ESSENTIAL, (fmt), __VA_ARGS__) |
|
#define | SC_GLOBAL_LERRORF(fmt, ...) SC_GLOBAL_LOGF (SC_LP_ERROR, (fmt), __VA_ARGS__) |
|
#define | SC_TRACE(s) SC_LOG (SC_LP_TRACE, (s)) |
|
#define | SC_LDEBUG(s) SC_LOG (SC_LP_DEBUG, (s)) |
|
#define | SC_VERBOSE(s) SC_LOG (SC_LP_VERBOSE, (s)) |
|
#define | SC_INFO(s) SC_LOG (SC_LP_INFO, (s)) |
|
#define | SC_STATISTICS(s) SC_LOG (SC_LP_STATISTICS, (s)) |
|
#define | SC_PRODUCTION(s) SC_LOG (SC_LP_PRODUCTION, (s)) |
|
#define | SC_ESSENTIAL(s) SC_LOG (SC_LP_ESSENTIAL, (s)) |
|
#define | SC_LERROR(s) SC_LOG (SC_LP_ERROR, (s)) |
|
#define | SC_TRACEF(fmt, ...) SC_LOGF (SC_LP_TRACE, (fmt), __VA_ARGS__) |
|
#define | SC_LDEBUGF(fmt, ...) SC_LOGF (SC_LP_DEBUG, (fmt), __VA_ARGS__) |
|
#define | SC_VERBOSEF(fmt, ...) SC_LOGF (SC_LP_VERBOSE, (fmt), __VA_ARGS__) |
|
#define | SC_INFOF(fmt, ...) SC_LOGF (SC_LP_INFO, (fmt), __VA_ARGS__) |
|
#define | SC_STATISTICSF(fmt, ...) SC_LOGF (SC_LP_STATISTICS, (fmt), __VA_ARGS__) |
|
#define | SC_PRODUCTIONF(fmt, ...) SC_LOGF (SC_LP_PRODUCTION, (fmt), __VA_ARGS__) |
|
#define | SC_ESSENTIALF(fmt, ...) SC_LOGF (SC_LP_ESSENTIAL, (fmt), __VA_ARGS__) |
|
#define | SC_LERRORF(fmt, ...) SC_LOGF (SC_LP_ERROR, (fmt), __VA_ARGS__) |
|
#define | _SC_TOSTRING(x) #x |
| Macros used to convert a macro definition such as the point version or some other numerical literal to a string.
|
|
#define | SC_TOSTRING(x) _SC_TOSTRING(x) |
| Macros used to convert a macro definition such as the point version or some other numerical literal to a string.
|
|
|
void | SC_ABORTF (const char *fmt,...) |
|
void | SC_CHECK_ABORTF (int success, const char *fmt,...) |
|
void | SC_GEN_LOGF (int package, int category, int priority, const char *fmt,...) |
|
void | SC_GLOBAL_LOGF (int priority, const char *fmt,...) |
|
void | SC_LOGF (int priority, const char *fmt,...) |
|
void | SC_GLOBAL_TRACEF (const char *fmt,...) |
|
void | SC_GLOBAL_LDEBUGF (const char *fmt,...) |
|
void | SC_GLOBAL_VERBOSEF (const char *fmt,...) |
|
void | SC_GLOBAL_INFOF (const char *fmt,...) |
|
void | SC_GLOBAL_STATISTICSF (const char *fmt,...) |
|
void | SC_GLOBAL_PRODUCTIONF (const char *fmt,...) |
|
void | SC_GLOBAL_ESSENTIALF (const char *fmt,...) |
|
void | SC_GLOBAL_LERRORF (const char *fmt,...) |
|
void | SC_TRACEF (const char *fmt,...) |
|
void | SC_LDEBUGF (const char *fmt,...) |
|
void | SC_VERBOSEF (const char *fmt,...) |
|
void | SC_INFOF (const char *fmt,...) |
|
void | SC_STATISTICSF (const char *fmt,...) |
|
void | SC_PRODUCTIONF (const char *fmt,...) |
|
void | SC_ESSENTIALF (const char *fmt,...) |
|
void | SC_LERRORF (const char *fmt,...) |
|
void * | sc_malloc (int package, size_t size) |
|
void * | sc_calloc (int package, size_t nmemb, size_t size) |
|
void * | sc_realloc (int package, void *ptr, size_t size) |
|
char * | sc_strdup (int package, const char *s) |
|
void | sc_free (int package, void *ptr) |
|
int | sc_memory_status (int package) |
|
void | sc_memory_check (int package) |
|
int | sc_memory_check_noerr (int package) |
| Return error count or zero if all is ok.
|
|
int | sc_int_compare (const void *v1, const void *v2) |
|
int | sc_int8_compare (const void *v1, const void *v2) |
|
int | sc_int16_compare (const void *v1, const void *v2) |
|
int | sc_int32_compare (const void *v1, const void *v2) |
|
int | sc_int64_compare (const void *v1, const void *v2) |
|
int | sc_double_compare (const void *v1, const void *v2) |
|
int | sc_atoi (const char *nptr) |
| Safe version of the standard library atoi (3) function. More...
|
|
long | sc_atol (const char *nptr) |
| Safe version of the standard library atol (3) function. More...
|
|
void | sc_set_log_defaults (FILE *log_stream, sc_log_handler_t log_handler, int log_threshold) |
| Controls the default SC log behavior. More...
|
|
void | sc_set_abort_handler (sc_abort_handler_t abort_handler) |
| Set the default SC abort behavior. More...
|
|
void | sc_log (const char *filename, int lineno, int package, int category, int priority, const char *msg) |
| The central log function to be called by all packages. More...
|
|
void | sc_logf (const char *filename, int lineno, int package, int category, int priority, const char *fmt,...) |
|
void | sc_logv (const char *filename, int lineno, int package, int category, int priority, const char *fmt, va_list ap) |
|
void | sc_log_indent_push_count (int package, int count) |
| Add spaces to the start of a package's default log format.
|
|
void | sc_log_indent_pop_count (int package, int count) |
| Remove spaces from the start of a package's default log format.
|
|
void | sc_log_indent_push (void) |
| Add one space to the start of sc's default log format.
|
|
void | sc_log_indent_pop (void) |
| Remove one space from the start of a sc's default log format.
|
|
void | sc_abort (void) |
| Print a stack trace, call the abort handler and then call abort ().
|
|
void | sc_abort_verbose (const char *filename, int lineno, const char *msg) |
| Print a message to stderr and then call sc_abort ().
|
|
void | sc_abort_verbosef (const char *filename, int lineno, const char *fmt,...) |
| Print a message to stderr and then call sc_abort ().
|
|
void | sc_abort_verbosev (const char *filename, int lineno, const char *fmt, va_list ap) |
| Print a message to stderr and then call sc_abort ().
|
|
void | sc_abort_collective (const char *msg) |
| Collective abort where only root prints a message.
|
|
int | sc_package_register (sc_log_handler_t log_handler, int log_threshold, const char *name, const char *full) |
| Register a software package with SC. More...
|
|
int | sc_package_is_registered (int package_id) |
| Query whether an identifier matches a registered package. More...
|
|
void | sc_package_lock (int package_id) |
| Acquire a pthread mutex lock. More...
|
|
void | sc_package_unlock (int package_id) |
| Release a pthread mutex lock. More...
|
|
void | sc_package_set_verbosity (int package_id, int log_priority) |
| Set the logging verbosity of a registered package. More...
|
|
void | sc_package_set_abort_alloc_mismatch (int package_id, int set_abort) |
| Set the unregister behavior of sc_package_unregister(). More...
|
|
void | sc_package_unregister (int package_id) |
| Unregister a software package with SC. More...
|
|
void | sc_package_print_summary (int log_priority) |
| Print a summary of all packages registered with SC. More...
|
|
void | sc_init (sc_MPI_Comm mpicomm, int catch_signals, int print_backtrace, sc_log_handler_t log_handler, int log_threshold) |
| Sets the global program identifier (e.g. More...
|
|
int | sc_is_initialized (void) |
| Return whether SC has been initialized or not. More...
|
|
int | sc_get_package_id (void) |
| Query SC's own package identity. More...
|
|
void | sc_finalize (void) |
| Unregisters all packages, runs the memory check, removes the signal handlers and resets sc_identifier and sc_root_*. More...
|
|
int | sc_finalize_noabort (void) |
| Unregisters all packages, runs the memory check, removes the signal handlers and resets sc_identifier and sc_root_*. More...
|
|
int | sc_is_root (void) |
| Identify the root process. More...
|
|
void | sc_strcopy (char *dest, size_t size, const char *src) |
| Provide a string copy function. More...
|
|
void | sc_snprintf (char *str, size_t size, const char *format,...) |
| Wrap the system snprintf function, allowing for truncation. More...
|
|
const char * | sc_version (void) |
| Return the full version of libsc. More...
|
|
int | sc_version_major (void) |
| Return the major version of libsc. More...
|
|
int | sc_version_minor (void) |
| Return the minor version of libsc. More...
|
|
int | sc_have_zlib (void) |
| Return a boolean indicating whether zlib has been configured. More...
|
|
int | sc_have_json (void) |
| Return whether we have found a JSON library at configure time. More...
|
|