30 static bool init =
false;
31 static bool rank_verbosity =
false;
32 static char *rank_verbosity_env =
getenv(
"QUDA_RANK_VERBOSITY");
34 if (!
init && rank_verbosity_env) {
35 std::stringstream rank_list(rank_verbosity_env);
38 while (rank_list >> rank_) {
39 if (
comm_rank() == rank_ || rank_ == -1) rank_verbosity =
true;
40 if (rank_list.peek() ==
',') rank_list.ignore();
43 rank_verbosity =
comm_rank() == 0 ? true :
false;
47 return rank_verbosity;
52 static bool init =
false;
56 char *enable_tuning =
getenv(
"QUDA_ENABLE_TUNING");
57 if (!enable_tuning ||
strcmp(enable_tuning,
"0")!=0) {
80 static std::stack<QudaVerbosity>
vstack;
88 warningQuda(
"Verbosity stack contains %u elements. Is there a missing popVerbosity() somewhere?",
89 static_cast<unsigned int>(
vstack.size()));
96 errorQuda(
"popVerbosity() called with empty stack");
void setOutputFile(FILE *outfile)
QudaTune getTuning()
Query whether autotuning is enabled or not. Default is enabled but can be overridden by setting QUDA_...
void pushVerbosity(QudaVerbosity verbosity)
void setOutputPrefix(const char *prefix)
int strcmp(const char *__s1, const char *__s2)
static char prefix_[MAX_PREFIX_SIZE]
static std::stack< QudaVerbosity > vstack
static const int MAX_BUFFER_SIZE
char * strncpy(char *__dst, const char *__src, size_t __n)
void setVerbosity(QudaVerbosity verbosity)
static QudaVerbosity verbosity_
QudaVerbosity getVerbosity()
enum QudaVerbosity_s QudaVerbosity
static char buffer_[MAX_BUFFER_SIZE]
bool getRankVerbosity()
This function returns true if the calling rank is enabled for verbosity (e.g., whether printQuda and ...
char * getenv(const char *)
static const size_t MAX_PREFIX_SIZE