Skip to content
Snippets Groups Projects
Commit f2719992 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix verb for blackbox builds

parent 5f09de86
No related branches found
No related tags found
No related merge requests found
// $Id: Main.cpp,v 1.12 2001-11-19 09:29:18 geuzaine Exp $ // $Id: Main.cpp,v 1.13 2001-12-05 10:17:51 geuzaine Exp $
#include <signal.h> #include <signal.h>
#include "ParUtil.h" #include "ParUtil.h"
...@@ -165,7 +165,7 @@ void Msg(int level, char *fmt, ...){ ...@@ -165,7 +165,7 @@ void Msg(int level, char *fmt, ...){
switch(level){ switch(level){
case DIRECT : case DIRECT :
if(ParUtil::Instance()->master()) if(CTX.verbosity >=2 && ParUtil::Instance()->master())
vfprintf(stdout, fmt, args); fprintf(stdout, "\n"); vfprintf(stdout, fmt, args); fprintf(stdout, "\n");
break; break;
...@@ -173,7 +173,7 @@ void Msg(int level, char *fmt, ...){ ...@@ -173,7 +173,7 @@ void Msg(int level, char *fmt, ...){
case FATAL1 : case FATAL1 :
case FATAL2 : case FATAL2 :
case FATAL3 : case FATAL3 :
fprintf(stderr,"On processor %d : ",ParUtil::Instance()->rank()); fprintf(stderr,"On processor %d : ", ParUtil::Instance()->rank());
fprintf(stderr, FATAL_STR); fprintf(stderr, FATAL_STR);
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
abort = 1 ; abort = 1 ;
...@@ -183,31 +183,31 @@ void Msg(int level, char *fmt, ...){ ...@@ -183,31 +183,31 @@ void Msg(int level, char *fmt, ...){
case GERROR1 : case GERROR1 :
case GERROR2 : case GERROR2 :
case GERROR3 : case GERROR3 :
fprintf(stderr,"On processor %d : ",ParUtil::Instance()->rank()); fprintf(stderr,"On processor %d : ", ParUtil::Instance()->rank());
fprintf(stderr, ERROR_STR); fprintf(stderr, ERROR_STR);
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
abort = 1 ;
break ; break ;
case WARNING : case WARNING :
case WARNING1 : case WARNING1 :
case WARNING2 : case WARNING2 :
case WARNING3 : case WARNING3 :
fprintf(stderr,"On processor %d : ",ParUtil::Instance()->rank()); if(CTX.verbosity >= 1){
fprintf(stderr, WARNING_STR); fprintf(stderr,"On processor %d : ", ParUtil::Instance()->rank());
vfprintf(stderr, fmt,args); fprintf(stderr, "\n"); fprintf(stderr, WARNING_STR);
vfprintf(stderr, fmt,args); fprintf(stderr, "\n");
}
break; break;
case PARSER_ERROR : case PARSER_ERROR :
if(ParUtil::Instance()->master()) if(ParUtil::Instance()->master()){
{ fprintf(stderr, PARSER_ERROR_STR);
fprintf(stderr, PARSER_ERROR_STR); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); }
}
break ; break ;
case PARSER_INFO : case PARSER_INFO :
if(CTX.verbosity == 5 && ParUtil::Instance()->master()){ if(CTX.verbosity >= 2 && ParUtil::Instance()->master()){
fprintf(stderr, PARSER_INFO_STR); fprintf(stderr, PARSER_INFO_STR);
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
} }
...@@ -217,14 +217,14 @@ void Msg(int level, char *fmt, ...){ ...@@ -217,14 +217,14 @@ void Msg(int level, char *fmt, ...){
case DEBUG1 : case DEBUG1 :
case DEBUG2 : case DEBUG2 :
case DEBUG3 : case DEBUG3 :
if(ParUtil::Instance()->master() && CTX.verbosity > 2){ if(CTX.verbosity >= 3 && ParUtil::Instance()->master()){
fprintf(stderr, DEBUG_STR); fprintf(stderr, DEBUG_STR);
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
} }
break; break;
default : default :
if(ParUtil::Instance()->master() && CTX.verbosity > 0){ if(CTX.verbosity >= 1 && ParUtil::Instance()->master()){
fprintf(stderr, INFO_STR); fprintf(stderr, INFO_STR);
vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); vfprintf(stderr, fmt, args); fprintf(stderr, "\n");
} }
......
...@@ -304,11 +304,7 @@ StringXNumber GeneralOptions_Number[] = { ...@@ -304,11 +304,7 @@ StringXNumber GeneralOptions_Number[] = {
"Z-axis translation (in model units)" }, "Z-axis translation (in model units)" },
#ifdef _BLACKBOX
{ F|O, "Verbosity" , opt_general_verbosity , 0. ,
#else
{ F|O, "Verbosity" , opt_general_verbosity , 2. , { F|O, "Verbosity" , opt_general_verbosity , 2. ,
#endif
"Level of information printed during processing (0=no information)" }, "Level of information printed during processing (0=no information)" },
{ F|O, "ZoomFactor" , opt_general_zoom_factor , 1.1 , { F|O, "ZoomFactor" , opt_general_zoom_factor , 1.1 ,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment