ASCOT5
Loading...
Searching...
No Matches
Macros | Enumerations | Variables
print.h File Reference

Macros for printing console output. More...

#include <stdio.h>

Go to the source code of this file.

Macros

#define print_out(v, ...)   { if(VERBOSE_LEVEL >= (v)) printf(__VA_ARGS__); }
 Print to standard output.
 
#define print_out0(v, rank, root, ...)
 Print to standard output only for root process.
 
#define print_err(...)   fprintf(stderr,__VA_ARGS__)
 Print to standard error.
 

Enumerations

enum  VERBOSE_RANK { VERBOSE_DEBUG = 2 , VERBOSE_NORMAL = 1 , VERBOSE_MINIMAL = 0 , VERBOSE_IO = 1 }
 Versbosity levels and definitions. More...
 

Variables

const char VERBOSE_LEVEL
 Verbose level.
 

Detailed Description

Macros for printing console output.

Definition in file print.h.

Macro Definition Documentation

◆ print_out

#define print_out ( v,
... )   { if(VERBOSE_LEVEL >= (v)) printf(__VA_ARGS__); }

Print to standard output.

Definition at line 31 of file print.h.

◆ print_out0

#define print_out0 ( v,
rank,
root,
... )
Value:
{ \
if(VERBOSE_LEVEL >= (v) &&(rank)==(root)) printf(__VA_ARGS__); }
const char VERBOSE_LEVEL
Verbose level.
Definition print.c:10

Print to standard output only for root process.

Definition at line 36 of file print.h.

◆ print_err

#define print_err ( ...)    fprintf(stderr,__VA_ARGS__)

Print to standard error.

Definition at line 42 of file print.h.

Enumeration Type Documentation

◆ VERBOSE_RANK

Versbosity levels and definitions.

DEBUG, NORMAL, and MINIMAL are levels that can be specified and the rest are used to specify to which levels operations belongs to.

Enumerator
VERBOSE_DEBUG 

For debugging purposes

VERBOSE_NORMAL 

For normal output

VERBOSE_MINIMAL 

Only print version and simulation status

VERBOSE_IO 

Flag for IO operations

Definition at line 16 of file print.h.

Variable Documentation

◆ VERBOSE_LEVEL

const char VERBOSE_LEVEL
extern

Verbose level.

Verbose level.

Definition at line 10 of file print.c.